X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fmenu%2FTMenu.java;h=165d951b283df63b8d18b818f1a2534a78676b24;hb=7c870d89433346ccb5505f8f9ba62d3fc18fe996;hp=56cbad5be6661425575ea9039f2392f785b03405;hpb=8caf0d51b8930199bd593aced424d9e4a8c4c092;p=fanfix.git diff --git a/src/jexer/menu/TMenu.java b/src/jexer/menu/TMenu.java index 56cbad5..165d951 100644 --- a/src/jexer/menu/TMenu.java +++ b/src/jexer/menu/TMenu.java @@ -128,7 +128,7 @@ public final class TMenu extends TWindow { public void draw() { CellAttributes background = getTheme().getColor("tmenu"); - assert (getAbsoluteActive()); + assert (isAbsoluteActive()); // Fill in the interior background for (int i = 0; i < getHeight(); i++) { @@ -221,7 +221,7 @@ public final class TMenu extends TWindow { // See if we should activate a different menu item for (TWidget widget: getChildren()) { - if ((mouse.getMouse1()) + if ((mouse.isMouse1()) && (widget.mouseWouldHit(mouse)) ) { // Activate this menu item @@ -276,14 +276,14 @@ public final class TMenu extends TWindow { } // Switch to a menuItem if it has an mnemonic - if (!keypress.getKey().getIsKey() - && !keypress.getKey().getAlt() - && !keypress.getKey().getCtrl()) { + if (!keypress.getKey().isFnKey() + && !keypress.getKey().isAlt() + && !keypress.getKey().isCtrl()) { for (TWidget widget: getChildren()) { TMenuItem item = (TMenuItem) widget; if ((item.getMnemonic() != null) && (Character.toLowerCase(item.getMnemonic().getShortcut()) - == Character.toLowerCase(keypress.getKey().getCh())) + == Character.toLowerCase(keypress.getKey().getChar())) ) { // Send an enter keystroke to it activate(item); @@ -295,7 +295,7 @@ public final class TMenu extends TWindow { // Dispatch the keypress to an active widget for (TWidget widget: getChildren()) { - if (widget.getActive()) { + if (widget.isActive()) { widget.handleEvent(keypress); return; }