Add bank-related widget ids, scripts and varbits

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Co-authored-by: Abex <mii7303@gmail.com>
This commit is contained in:
raiyni
2018-10-04 15:33:37 +02:00
committed by Tomas Slusny
parent 7d69924c54
commit 16e43a3ae2
7 changed files with 67 additions and 4 deletions

View File

@@ -45,6 +45,13 @@ public final class ScriptID
*/
public static final int CHATBOX_INPUT = 96;
/**
* Layouts the bank widgets
*
* Takes 13 widget ids of various parts of the bank interface
*/
public static final int BANK_LAYOUT = 277;
/**
* Closes the chatbox input
* <ul>

View File

@@ -42,6 +42,8 @@ public enum VarClientInt
*/
TOOLTIP_VISIBLE(2),
INPUT_TYPE(5),
MEMBERSHIP_STATUS(103),
WORLD_MAP_SEARCH_FOCUSED(190);

View File

@@ -34,7 +34,8 @@ import lombok.Getter;
@Getter
public enum VarClientStr
{
CHATBOX_TYPED_TEXT(1);
CHATBOX_TYPED_TEXT(1),
INPUT_TEXT(22);
private final int index;
}

View File

@@ -409,6 +409,8 @@ public enum Varbits
*/
CORP_DAMAGE(999),
CURRENT_BANK_TAB(4150),
WORLDHOPPER_FAVROITE_1(4597),
WORLDHOPPER_FAVROITE_2(4598);

View File

@@ -0,0 +1,43 @@
/*
* Copyright (c) 2018, Ron Young <https://github.com/raiyni>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.api.vars;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import net.runelite.api.VarClientInt;
/**
* An enumeration of input types for {@link VarClientInt#INPUT_TYPE}.
*/
@Getter
@RequiredArgsConstructor
public enum InputType
{
RUNELITE(-2),
NONE(0),
SEARCH(11);
private final int type;
}

View File

@@ -196,10 +196,14 @@ public class WidgetID
static class Bank
{
static final int ITEM_CONTAINER = 12;
static final int BANK_CONTAINER = 1;
static final int INVENTORY_ITEM_CONTAINER = 3;
static final int BANK_TITLE_BAR = 4;
static final int BANK_ITEM_COUNT = 5;
static final int CONTENT_CONTAINER = 9;
static final int ITEM_CONTAINER = 12;
static final int SEARCH_BUTTON_BACKGROUND = 39;
static final int INCINERATOR = 45;
static final int INCINERATOR_CONFIRM = 46;
}
static class GrandExchange

View File

@@ -119,10 +119,14 @@ public enum WidgetInfo
CLAN_CHAT_NAME(WidgetID.CLAN_CHAT_GROUP_ID, WidgetID.ClanChat.NAME),
CLAN_CHAT_OWNER(WidgetID.CLAN_CHAT_GROUP_ID, WidgetID.ClanChat.OWNER),
BANK_CONTAINER(WidgetID.BANK_GROUP_ID, WidgetID.Bank.BANK_CONTAINER),
BANK_SEARCH_BUTTON_BACKGROUND(WidgetID.BANK_GROUP_ID, WidgetID.Bank.SEARCH_BUTTON_BACKGROUND),
BANK_ITEM_CONTAINER(WidgetID.BANK_GROUP_ID, WidgetID.Bank.ITEM_CONTAINER),
BANK_INVENTORY_ITEMS_CONTAINER(WidgetID.BANK_INVENTORY_GROUP_ID, WidgetID.Bank.INVENTORY_ITEM_CONTAINER),
BANK_TITLE_BAR(WidgetID.BANK_GROUP_ID, WidgetID.Bank.BANK_TITLE_BAR),
BANK_ITEM_COUNT(WidgetID.BANK_GROUP_ID, WidgetID.Bank.BANK_ITEM_COUNT),
BANK_INCINERATOR(WidgetID.BANK_GROUP_ID, WidgetID.Bank.INCINERATOR),
BANK_INCINERATOR_CONFIRM(WidgetID.BANK_GROUP_ID, WidgetID.Bank.INCINERATOR_CONFIRM),
BANK_CONTENT_CONTAINER(WidgetID.BANK_GROUP_ID, WidgetID.Bank.CONTENT_CONTAINER),
GRAND_EXCHANGE_WINDOW_CONTAINER(WidgetID.GRAND_EXCHANGE_GROUP_ID, WidgetID.GrandExchange.WINDOW_CONTAINER),
GRAND_EXCHANGE_OFFER_CONTAINER(WidgetID.GRAND_EXCHANGE_GROUP_ID, WidgetID.GrandExchange.OFFER_CONTAINER),