Constructor and Description |
---|
MouseSwt()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionPressed(int click,
EventAction action)
Add an action that will be triggered on pressed state.
|
void |
addActionReleased(int click,
EventAction action)
Add an action that will be triggered on released state.
|
int |
getClick() |
MouseClickSwt |
getClicker()
Get the click handler.
|
MouseMoveSwt |
getMover()
Get the movement handler.
|
int |
getMoveX() |
int |
getMoveY() |
int |
getOnScreenX()
Get location on screen x.
|
int |
getOnScreenY()
Get location on screen y.
|
int |
getX() |
int |
getY() |
boolean |
hasClicked(int click) |
boolean |
hasClickedOnce(int click) |
boolean |
hasMoved() |
void |
setConfig(com.b3dgs.lionengine.Config config)
Set the config.
|
void |
update(double extrp) |
public void setConfig(com.b3dgs.lionengine.Config config)
config
- The config.public MouseClickSwt getClicker()
public MouseMoveSwt getMover()
public void addActionPressed(int click, EventAction action)
Mouse
Alternative usage with classic programming style can be achieved with InputDevicePointer.hasClicked(int)
or
InputDevicePointer.hasClickedOnce(int)
.
addActionPressed
in interface Mouse
click
- The action key.action
- The action reference.public void addActionReleased(int click, EventAction action)
Mouse
Alternative usage with classic programming style can be achieved with InputDevicePointer.hasClicked(int)
or
InputDevicePointer.hasClickedOnce(int)
.
addActionReleased
in interface Mouse
click
- The action key.action
- The action reference.public int getOnScreenX()
Mouse
getOnScreenX
in interface Mouse
public int getOnScreenY()
Mouse
getOnScreenY
in interface Mouse
public int getX()
getX
in interface com.b3dgs.lionengine.io.InputDevicePointer
public int getY()
getY
in interface com.b3dgs.lionengine.io.InputDevicePointer
public int getMoveX()
getMoveX
in interface com.b3dgs.lionengine.io.InputDevicePointer
public int getMoveY()
getMoveY
in interface com.b3dgs.lionengine.io.InputDevicePointer
public int getClick()
getClick
in interface com.b3dgs.lionengine.io.InputDevicePointer
public boolean hasClicked(int click)
hasClicked
in interface com.b3dgs.lionengine.io.InputDevicePointer
public boolean hasClickedOnce(int click)
hasClickedOnce
in interface com.b3dgs.lionengine.io.InputDevicePointer
public boolean hasMoved()
hasMoved
in interface com.b3dgs.lionengine.io.InputDevicePointer
public void update(double extrp)
update
in interface com.b3dgs.lionengine.Updatable
Copyright © 2017 Byron 3D Games Studio. All rights reserved.