Adventure updates / bugfixes

This commit is contained in:
jjayers99
2023-08-11 11:35:12 -04:00
parent 1288f5d6d3
commit 4c5d74ba22
13 changed files with 2259 additions and 9 deletions

View File

@@ -332,6 +332,14 @@ public class UIScene extends Scene {
public boolean keyPressed(int keycode) {
Selectable selection = getSelected();
if (KeyBinding.Use.isPressed(keycode)) {
if (selection != null) {
selection.onPressDown(this);
return true;
}
}
ui.pressDown(keycode);
if (stage.getKeyboardFocus() instanceof SelectBox) {
SelectBox box = (SelectBox) stage.getKeyboardFocus();
@@ -343,10 +351,11 @@ public class UIScene extends Scene {
return false;
}
}
if (KeyBinding.Use.isPressed(keycode)) {
if (selection != null)
selection.onPressDown(this);
if (KeyBinding.Back.isPressed(keycode) && selection != null){
selection.onDeSelect();
stage.setKeyboardFocus(null);
}
if (KeyBinding.ScrollUp.isPressed(keycode)) {
Actor focus = stage.getScrollFocus();

View File

@@ -94,8 +94,8 @@ public abstract class FContainer extends FDisplayObject {
@Override
public void setSize(float width, float height) {
if (getWidth() == width && getHeight() == height) { return; }
//called with (0,0) when app minimized, if set then causes errors with layouts loaded before restoring focus
if ((getWidth() == width && getHeight() == height) || width == 0.0 || height == 0.0) { return; }
super.setSize(width, height);
doLayout(width, height);
}