Class SpellCastingGroundContainerMouseState
java.lang.Object
games.stendhal.client.gui.MouseHandler
games.stendhal.client.gui.spellcasting.GroundContainerMouseState
games.stendhal.client.gui.spellcasting.SpellCastingGroundContainerMouseState
- All Implemented Interfaces:
MouseListener,MouseMotionListener,EventListener
State of the GroundContainer that is switched to, when a spell is selected.
- Author:
- madmetzger
-
Field Summary
Fields inherited from class games.stendhal.client.gui.spellcasting.GroundContainerMouseState
MENU_OFFSET -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new SpellCastingGroundContainerMouseState acting on a given GroundContainer -
Method Summary
Modifier and TypeMethodDescriptionGet cursor for a point.protected voidonDragStart(Point point) Called when mouse dragging starts.protected booleanonMouseClick(Point point) Called on left mouse single click.protected booleanonMouseDoubleClick(Point point) Called on left double click.protected voidonMouseRightClick(Point point) Called on right mouse single click.voidSets the previously selected spell, which will be casted on click on an entityvoidMethods inherited from class games.stendhal.client.gui.spellcasting.GroundContainerMouseState
mousePressedMethods inherited from class games.stendhal.client.gui.MouseHandler
isCtrlDown, isShiftDown, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseReleased
-
Constructor Details
-
SpellCastingGroundContainerMouseState
Create a new SpellCastingGroundContainerMouseState acting on a given GroundContainer- Parameters:
ground- the GroundContainer
-
-
Method Details
-
switchState
public void switchState()- Specified by:
switchStatein classGroundContainerMouseState
-
onMouseClick
Description copied from class:MouseHandlerCalled on left mouse single click.- Specified by:
onMouseClickin classMouseHandler- Parameters:
point- location- Returns:
trueif the click was handled
-
onMouseDoubleClick
Description copied from class:MouseHandlerCalled on left double click.- Specified by:
onMouseDoubleClickin classMouseHandler- Parameters:
point- location- Returns:
trueif the click was handled
-
onMouseRightClick
Description copied from class:MouseHandlerCalled on right mouse single click.- Specified by:
onMouseRightClickin classMouseHandler- Parameters:
point- location
-
onDragStart
Description copied from class:MouseHandlerCalled when mouse dragging starts.- Specified by:
onDragStartin classMouseHandler- Parameters:
point- location
-
setSpell
Sets the previously selected spell, which will be casted on click on an entity- Parameters:
spell- the selected spell
-
getCursor
Description copied from class:GroundContainerMouseStateGet cursor for a point.- Specified by:
getCursorin classGroundContainerMouseState- Returns:
- cursor
-