mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Adventure updates / bugfixes
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user