menus: add widgetmenuoption constructor for widgetid

This is for pluginhub plugins which want to add a managed custom menu for a widget with no corresponding widgetinfo
This commit is contained in:
Adam
2021-03-22 19:53:01 -04:00
parent e7f50433a3
commit d629d422f7
3 changed files with 42 additions and 37 deletions

View File

@@ -24,11 +24,12 @@
*/
package net.runelite.api.events;
import javax.annotation.Nullable;
import lombok.Data;
import net.runelite.api.widgets.WidgetInfo;
/**
* A MenuManager widget menu was clicked. This event is NOT fired for non-MenuManager menu options
* A MenuManager widget menu was clicked. This event is fired only for MenuManager managed custom menus.
*/
@Data
public class WidgetMenuOptionClicked
@@ -42,7 +43,12 @@ public class WidgetMenuOptionClicked
*/
private String menuTarget;
/**
* The type of widget that was clicked.
* The WidgetInfo of the widget that was clicked, if available.
*/
@Nullable
private WidgetInfo widget;
/**
* The widget id of the widget that was clicked.
*/
private int widgetId;
}