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
ConstructorDescriptionCreate a new SpellCastingGroundContainerMouseState acting on a given GroundContainer -
Method Summary
Modifier and TypeMethodDescriptionGet cursor for a point.protected void
onDragStart(Point point)
Called when mouse dragging starts.protected boolean
onMouseClick(Point point)
Called on left mouse single click.protected boolean
onMouseDoubleClick(Point point)
Called on left double click.protected void
onMouseRightClick(Point point)
Called on right mouse single click.void
Sets the previously selected spell, which will be casted on click on an entityvoid
Methods inherited from class games.stendhal.client.gui.spellcasting.GroundContainerMouseState
mousePressed
Methods 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:
switchState
in classGroundContainerMouseState
-
onMouseClick
Description copied from class:MouseHandler
Called on left mouse single click.- Specified by:
onMouseClick
in classMouseHandler
- Parameters:
point
- location- Returns:
true
if the click was handled
-
onMouseDoubleClick
Description copied from class:MouseHandler
Called on left double click.- Specified by:
onMouseDoubleClick
in classMouseHandler
- Parameters:
point
- location- Returns:
true
if the click was handled
-
onMouseRightClick
Description copied from class:MouseHandler
Called on right mouse single click.- Specified by:
onMouseRightClick
in classMouseHandler
- Parameters:
point
- location
-
onDragStart
Description copied from class:MouseHandler
Called when mouse dragging starts.- Specified by:
onDragStart
in 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:GroundContainerMouseState
Get cursor for a point.- Specified by:
getCursor
in classGroundContainerMouseState
- Returns:
- cursor
-