ScriptEvent: import op, opbase, and source

This commit is contained in:
Ron Young
2018-10-24 09:10:36 -05:00
committed by Tomas Slusny
parent 02d814f6a6
commit fcb1029b0d
2 changed files with 36 additions and 1 deletions

View File

@@ -24,6 +24,8 @@
*/
package net.runelite.api;
import net.runelite.api.widgets.Widget;
public interface ScriptEvent
{
int MOUSE_X = -2147483647;
@@ -35,5 +37,28 @@ public interface ScriptEvent
int WIDGET_TARGET_INDEX = -2147483641;
int KEY_CODE = -2147483640;
int KEY_CHAR = -2147483639;
String NAME = "event_opbase";
String NAME = "event_opbase";
/**
* Gets the widget of the event.
*
* @return the widget
* @see net.runelite.api.widgets.Widget
*/
Widget getSource();
/**
* Gets the menu index of the event
*
* @return the index
*/
int getOp();
/**
* Gets the target of the menu option
*
* @return the target
* @see net.runelite.api.events.MenuOptionClicked
*/
String getOpbase();
}

View File

@@ -25,6 +25,7 @@
package net.runelite.rs.api;
import net.runelite.api.ScriptEvent;
import net.runelite.api.widgets.Widget;
import net.runelite.mapping.Import;
public interface RSScriptEvent extends ScriptEvent
@@ -34,4 +35,13 @@ public interface RSScriptEvent extends ScriptEvent
@Import("params")
void setArguments(Object[] args);
@Import("source")
Widget getSource();
@Import("op")
int getOp();
@Import("opbase")
String getOpbase();
}