diff options
Diffstat (limited to 'ardor3d-ui/src/main')
-rw-r--r-- | ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIHud.java | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIHud.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIHud.java index 1eae2d2..0ece8fa 100644 --- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIHud.java +++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/UIHud.java @@ -3,7 +3,7 @@ * * This file is part of Ardor3D. * - * Ardor3D is free software: you can redistribute it and/or modify it + * Ardor3D is free software: you can redistribute it and/or modify it * under the terms of its license which may be found in the accompanying * LICENSE file or at <http://www.ardor3d.com/LICENSE>. */ @@ -60,7 +60,7 @@ public class UIHud extends Node { /** * The logical layer used by this UI to receive input events. */ - private final LogicalLayer _logicalLayer = new LogicalLayer(); + protected final LogicalLayer _logicalLayer = new LogicalLayer(); /** * The single tooltip used by this hud - lazy inited @@ -71,8 +71,8 @@ public class UIHud extends Node { * Internal flag indicating whether the last input event was consumed by the UI. This is used to decide if we will * forward the event to the next LogicalLayer. */ - private boolean _mouseInputConsumed; - private boolean _keyInputConsumed; + protected boolean _mouseInputConsumed; + protected boolean _keyInputConsumed; /** * Flag used to determine if we should use mouse input when mouse is grabbed. Defaults to true. @@ -166,7 +166,7 @@ public class UIHud extends Node { /** * Add the given component to this hud. - * + * * @param component * the component to add */ @@ -180,7 +180,7 @@ public class UIHud extends Node { /** * Remove the given component from the hud - * + * * @param component * the component to remove */ @@ -226,7 +226,7 @@ public class UIHud extends Node { /** * Reorder the components so that the given component is drawn last and is therefore "on top" of any others. - * + * * @param component * the component to bring to front */ @@ -238,7 +238,7 @@ public class UIHud extends Node { /** * Look for a UIComponent at the given screen coordinates. If no pickable component is at that location, null is * returned. - * + * * @param x * the x screen coordinate * @param y @@ -372,7 +372,7 @@ public class UIHud extends Node { /** * Add the given drag listener to this hud. Expired WeakReferences are also cleaned. - * + * * @param listener * the listener to add */ @@ -389,7 +389,7 @@ public class UIHud extends Node { /** * Remove any matching drag listener from this hud. Expired WeakReferences are also cleaned. - * + * * @param listener * the listener to remove * @return true if at least one "equal" DragListener was found in the pool of listeners and removed. @@ -410,7 +410,7 @@ public class UIHud extends Node { /** * Add the given hud listener to this hud. - * + * * @param listener * the listener to add */ @@ -420,7 +420,7 @@ public class UIHud extends Node { /** * Remove any matching hud listener from this hud. - * + * * @param listener * the listener to remove * @return true if at least one "equal" HudListener was found in the pool of listeners and removed. @@ -473,7 +473,7 @@ public class UIHud extends Node { /** * Convenience method for setting up the UI's connection to the Ardor3D input system, along with a forwarding * address for input events that the UI does not care about. - * + * * @param canvas * the canvas to register with * @param physicalLayer @@ -498,7 +498,7 @@ public class UIHud extends Node { if (!_keyInputConsumed) { // nothing consumed forwardTo.getApplier() - .checkAndPerformTriggers(forwardTo.getTriggers(), source, states, tpf); + .checkAndPerformTriggers(forwardTo.getTriggers(), source, states, tpf); } else { // only key state consumed final TwoInputStates forwardingState = new TwoInputStates(states.getPrevious(), @@ -530,7 +530,7 @@ public class UIHud extends Node { /** * Set up our logical layer with a trigger that hands input to the UI and saves whether it was "consumed". */ - private void setupLogicalLayer() { + protected void setupLogicalLayer() { _logicalLayer.registerTrigger(new InputTrigger(new Predicate<TwoInputStates>() { public boolean apply(final TwoInputStates arg0) { // always trigger this. @@ -544,7 +544,7 @@ public class UIHud extends Node { })); } - private boolean offerKeyInputToUI(final TwoInputStates inputStates) { + protected boolean offerKeyInputToUI(final TwoInputStates inputStates) { boolean consumed = false; final InputState current = inputStates.getCurrent(); @@ -587,12 +587,12 @@ public class UIHud extends Node { /** * Parse a given set of input states for UI events and pass these events to the UI components contained in this hud. - * + * * @param inputStates * our two InputState objects, detailing a before and after snapshot of the input system. * @return true if a UI element consumed the event described by inputStates. */ - private boolean offerMouseInputToUI(final TwoInputStates inputStates) { + protected boolean offerMouseInputToUI(final TwoInputStates inputStates) { boolean consumed = false; final InputState current = inputStates.getCurrent(); @@ -639,7 +639,7 @@ public class UIHud extends Node { /** * Handle mouse presses. - * + * * @param button * the button that was pressed. * @param currentIS @@ -689,7 +689,7 @@ public class UIHud extends Node { /** * Handle mouse releases. - * + * * @param button * the button that was release. * @param currentIS @@ -724,7 +724,7 @@ public class UIHud extends Node { /** * Handle movement events. - * + * * @param mouseX * the new x position of the mouse * @param mouseY @@ -771,7 +771,7 @@ public class UIHud extends Node { /** * Handle wheel events. - * + * * @param wheelDx * the change in wheel position. * @param currentIS @@ -790,7 +790,7 @@ public class UIHud extends Node { /** * Handle key presses. - * + * * @param key * the pressed key * @param currentIS @@ -807,7 +807,7 @@ public class UIHud extends Node { /** * Handle key held (pressed down over more than one input update cycle.) - * + * * @param key * the held key * @param currentIS @@ -824,7 +824,7 @@ public class UIHud extends Node { /** * Handle key releases. - * + * * @param key * the released key * @param currentIS |