net.nexttext.behaviour.control
Class OnMouseReleasedOver
java.lang.Object
net.nexttext.behaviour.AbstractAction
net.nexttext.behaviour.control.Condition
net.nexttext.behaviour.control.OnMouseDepressed
net.nexttext.behaviour.control.OnMouseReleased
net.nexttext.behaviour.control.OnMouseReleasedOver
- All Implemented Interfaces:
- Action
public class OnMouseReleasedOver
- extends OnMouseReleased
A Condition which is true when a mouse button is released over a TextObject
i.e. a single true result is returned if the button was down and got released
on top of the given TextObject.
Constructor Summary |
OnMouseReleasedOver(Action trueAction)
Creates an OnMouseReleasedOver which performs the given Action when the
mouse button 1 is released. |
OnMouseReleasedOver(int buttonToCheck,
Action trueAction)
Creates an OnMouseReleasedOver which performs the given Action when the
selected mouse button is released. |
Method Summary |
boolean |
condition(TextObject to)
Checks whether or not the selected mouse button is released over the TextObject. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OnMouseReleasedOver
public OnMouseReleasedOver(Action trueAction)
- Creates an OnMouseReleasedOver which performs the given Action when the
mouse button 1 is released.
- Parameters:
trueAction
- the Action to perform when the mouse button 1 is released
OnMouseReleasedOver
public OnMouseReleasedOver(int buttonToCheck,
Action trueAction)
- Creates an OnMouseReleasedOver which performs the given Action when the
selected mouse button is released.
- Parameters:
buttonToCheck
- the mouse button to considertrueAction
- the Action to perform when the selected mouse button is released
condition
public boolean condition(TextObject to)
- Checks whether or not the selected mouse button is released over the TextObject.
- Overrides:
condition
in class OnMouseReleased
- Parameters:
to
- the TextObject to consider
- Returns:
- the outcome of the condition