Add shift click customization to menu swapper plugin

This commit is contained in:
Kamiel
2018-03-30 22:14:20 -04:00
committed by Adam
parent 194dadd030
commit f9c0a12a1a
9 changed files with 595 additions and 17 deletions

View File

@@ -81,4 +81,22 @@ public interface ItemComposition
* @return true if stackable, false otherwise
*/
boolean isStackable();
/**
* Returns the menu actions the item has in a players' inventory
*
* @return the inventory menu actions
*/
String[] getInventoryActions();
/**
* Returns the menu action index of the shift-click action
*
* @return menu index of the shift-click action
*/
int getShiftClickActionIndex();
void setShiftClickActionIndex(int shiftclickActionIndex);
void resetShiftClickActionIndex();
}

View File

@@ -207,16 +207,19 @@ public class WidgetID
static class FixedViewport
{
static final int INVENTORY_TAB = 51;
static final int PRAYER_TAB = 53;
}
static class ResizableViewport
{
static final int INVENTORY_TAB = 54;
static final int PRAYER_TAB = 56;
}
static class ResizableViewportBottomLine
{
static final int INVENTORY_TAB = 51;
static final int PRAYER_TAB = 53;
}

View File

@@ -114,11 +114,14 @@ public enum WidgetInfo
LOGIN_CLICK_TO_PLAY_SCREEN(WidgetID.LOGIN_CLICK_TO_PLAY_GROUP_ID, 0),
FIXED_VIEWPORT(WidgetID.FIXED_VIEWPORT_GROUP_ID, WidgetID.Viewport.FIXED_VIEWPORT),
FIXED_VIEWPORT_INVENTORY_TAB(WidgetID.FIXED_VIEWPORT_GROUP_ID, WidgetID.FixedViewport.INVENTORY_TAB),
FIXED_VIEWPORT_PRAYER_TAB(WidgetID.FIXED_VIEWPORT_GROUP_ID, WidgetID.FixedViewport.PRAYER_TAB),
MINIMAP_WIDGET(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.Viewport.MINIMAP_WIDGET),
RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.Viewport.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX),
RESIZABLE_VIEWPORT_INVENTORY_TAB(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.INVENTORY_TAB),
RESIZABLE_VIEWPORT_PRAYER_TAB(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.PRAYER_TAB),
RESIZABLE_VIEWPORT_BOTTOM_LINE(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.Viewport.RESIZABLE_VIEWPORT_BOTTOM_LINE),
RESIZABLE_VIEWPORT_BOTTOM_LINE_INVENTORY_TAB(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewportBottomLine.INVENTORY_TAB),
RESIZABLE_VIEWPORT_BOTTOM_LINE_PRAYER_TAB(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewportBottomLine.PRAYER_TAB),
PRAYER_THICK_SKIN(WidgetID.PRAYER_GROUP_ID, WidgetID.Prayer.THICK_SKIN),