Merge pull request #9756 from abextm/widget-picker

WidgetInspector: Add widget picker
This commit is contained in:
Adam
2019-09-21 15:27:37 -04:00
committed by GitHub
8 changed files with 453 additions and 104 deletions

View File

@@ -38,6 +38,7 @@ import net.runelite.api.hooks.Callbacks;
import net.runelite.api.hooks.DrawCallbacks;
import net.runelite.api.vars.AccountType;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetConfig;
import net.runelite.api.widgets.WidgetInfo;
import org.slf4j.Logger;
@@ -1671,6 +1672,11 @@ public interface Client extends GameEngine
*/
int getIf1DraggedItemIndex();
/**
* Is a widget is in target mode?
*/
boolean getSpellSelected();
/**
* Sets if a widget is in target mode
*/
@@ -1696,4 +1702,9 @@ public interface Client extends GameEngine
* Returns the max item index + 1 from cache
*/
int getItemCount();
/**
* Makes all widgets behave as if they are {@link WidgetConfig#WIDGET_USE_TARGET}
*/
void setAllWidgetsAreOpTargetable(boolean value);
}

View File

@@ -230,6 +230,11 @@ public enum MenuAction
*/
WIDGET_DEFAULT(57),
/**
* Casting a spell / op target on a widget
*/
SPELL_CAST_ON_WIDGET(58),
/**
* Menu action triggered by examining an object.
*/

View File

@@ -1564,6 +1564,7 @@ public final class SpriteID
public static final int MOBILE_FUNCTION_MODE_DISABLED = 1624;
public static final int MOBILE_YELLOW_TOUCH_ANIMATION_1 = 1625;
public static final int MOBILE_YELLOW_TOUCH_ANIMATION_2 = 1626;
public static final int MOBILE_FINGER_ON_INTERFACE = 1653;
/* Unmapped: 1627~1701 */
public static final int BUTTON_FRIENDS = 1702;
public static final int BUTTON_IGNORES = 1703;