Hotfixed custom renderables and Hider

Man, flat render code is a huge mess
This commit is contained in:
OLEGSHA 2021-09-10 20:38:42 +03:00
parent 05b1c73fbc
commit 782b3ef553
Signed by: OLEGSHA
GPG Key ID: E57A4B08D64AFF7A
2 changed files with 13 additions and 3 deletions

View File

@ -191,7 +191,8 @@ public class RenderTarget {
assembleCurrentClipFromFaces();
float depth = this.depth--;
Mat4 transform = new Mat4().translate(0, 0, depth).mul(getTransform());
final float kostyl = 1e-2f;
Mat4 transform = new Mat4().translate(0, 0, depth).scale(1, 1, kostyl).mul(getTransform());
assembled.add(new Clip(maskStack, transform, renderable));
}

View File

@ -39,12 +39,21 @@ public class Hider extends Component {
}
@Override
protected void handleInput(Input input) {
public void dispatchInput(Input input) {
if (shouldHide.getAsBoolean()) {
return;
}
super.handleInput(input);
super.dispatchInput(input);
}
@Override
public synchronized Component findFocused() {
if (shouldHide.getAsBoolean()) {
return null;
}
return super.findFocused();
}
@Override