Add mappings for checkClick, mouseCanvasHoverX/Y
- Add mappings to use checkClick, mouseCanvasHover X and Y from runescape-client - Add methods to set them to runelite-api Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -368,6 +368,23 @@ public interface Client extends GameEngine
|
||||
*/
|
||||
int getMouseCurrentButton();
|
||||
|
||||
/**
|
||||
* Schedules checking of current region tile for next frame, so ${@link Client#getSelectedSceneTile()} ()} will
|
||||
* return actual value.
|
||||
*
|
||||
* @param checkClick when true next frame selected region tile will be updated
|
||||
*/
|
||||
void setCheckClick(boolean checkClick);
|
||||
|
||||
/**
|
||||
* Sets current mouse hover position. This value is automatically updated only when right-clicking in game.
|
||||
* Setting this value together with ${@link Client#setCheckClick(boolean)} will update ${@link Client#getSelectedSceneTile()} ()}
|
||||
* for next frame.
|
||||
*
|
||||
* @param position current mouse hover position
|
||||
*/
|
||||
void setMouseCanvasHoverPosition(Point position);
|
||||
|
||||
/**
|
||||
* Gets the currently selected tile (ie. last right clicked tile).
|
||||
*
|
||||
|
||||
@@ -237,6 +237,14 @@ public abstract class RSClientMixin implements RSClient
|
||||
return AccountType.NORMAL;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public void setMouseCanvasHoverPosition(final Point position)
|
||||
{
|
||||
setMouseCanvasHoverPositionX(position.getX());
|
||||
setMouseCanvasHoverPositionY(position.getY());
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public Tile getSelectedSceneTile()
|
||||
|
||||
@@ -129,6 +129,16 @@ public interface RSClient extends RSGameEngine, Client
|
||||
@Import("gameState")
|
||||
int getRSGameState();
|
||||
|
||||
@Import("checkClick")
|
||||
@Override
|
||||
void setCheckClick(boolean checkClick);
|
||||
|
||||
@Import("mouseX2")
|
||||
void setMouseCanvasHoverPositionX(int x);
|
||||
|
||||
@Import("mouseY2")
|
||||
void setMouseCanvasHoverPositionY(int y);
|
||||
|
||||
@Import("mouseCurrentButton")
|
||||
@Override
|
||||
int getMouseCurrentButton();
|
||||
|
||||
Reference in New Issue
Block a user