project: upstream

project: upstream
This commit is contained in:
xKylee
2020-04-28 23:54:49 +01:00
7 changed files with 36 additions and 132 deletions

View File

@@ -72,8 +72,16 @@ public final class AnimationID
public static final int FLETCHING_STRING_YEW_LONGBOW = 6688;
public static final int FLETCHING_STRING_MAGIC_SHORTBOW = 6683;
public static final int FLETCHING_STRING_MAGIC_LONGBOW = 6689;
public static final int FLETCHING_ATTACH_FEATHERS_TO_ARROWSHAFT = 8481;
public static final int FLETCHING_ATTACH_BOLT_TIPS_TO_BRONZE_BOLT = 8472;
public static final int FLETCHING_ATTACH_BOLT_TIPS_TO_IRON_BROAD_BOLT = 8473;
public static final int FLETCHING_ATTACH_BOLT_TIPS_TO_BLURITE_BOLT = 8474;
public static final int FLETCHING_ATTACH_BOLT_TIPS_TO_STEEL_BOLT = 8475;
public static final int FLETCHING_ATTACH_BOLT_TIPS_TO_MITHRIL_BOLT = 8476;
public static final int FLETCHING_ATTACH_BOLT_TIPS_TO_ADAMANT_BOLT = 8477;
public static final int FLETCHING_ATTACH_BOLT_TIPS_TO_RUNE_BOLT = 8478;
public static final int FLETCHING_ATTACH_BOLT_TIPS_TO_DRAGON_BOLT = 8479;
public static final int FLETCHING_ATTACH_HEADS = 8480;
public static final int FLETCHING_ATTACH_FEATHERS_TO_ARROWSHAFT = 8481;
public static final int GEM_CUTTING_OPAL = 890;
public static final int GEM_CUTTING_JADE = 891;
public static final int GEM_CUTTING_REDTOPAZ = 892;
@@ -122,8 +130,8 @@ public final class AnimationID
public static final int FISHING_BAREHAND_CAUGHT_TUNA_1 = 6710;
public static final int FISHING_BAREHAND_CAUGHT_TUNA_2 = 6711;
public static final int FISHING_PEARL_ROD = 8188;
public static final int FISHING_PEARL_FLY_ROD = 8189;
public static final int FISHING_PEARL_BARBARIAN_ROD = 8190;
public static final int FISHING_PEARL_FLY_ROD = 8192;
public static final int FISHING_PEARL_BARBARIAN_ROD = 8193;
public static final int FISHING_PEARL_OILY_ROD = 6932;
public static final int MINING_BRONZE_PICKAXE = 625;
public static final int MINING_IRON_PICKAXE = 626;

View File

@@ -311,4 +311,10 @@ public final class ScriptID
*/
@ScriptArguments(integer = 16)
public static final int BANKMAIN_SEARCH_REFRESH = 283;
/**
* Called to update the PVP widget (wilderness level/protection)
*/
@ScriptArguments(integer = 3)
public static final int PVP_WIDGET_BUILDER = 388;
}

View File

@@ -324,6 +324,7 @@ public class WidgetID
static final int DEPOSIT_EQUIPMENT = 42;
static final int INCINERATOR = 44;
static final int INCINERATOR_CONFIRM = 45;
static final int EQUIPMENT_CONTENT_CONTAINER = 66;
static final int EQUIPMENT_BUTTON = 107;
}

View File

@@ -160,6 +160,7 @@ public enum WidgetInfo
BANK_DEPOSIT_EQUIPMENT(WidgetID.BANK_GROUP_ID, WidgetID.Bank.DEPOSIT_EQUIPMENT),
BANK_DEPOSIT_INVENTORY(WidgetID.BANK_GROUP_ID, WidgetID.Bank.DEPOSIT_INVENTORY),
BANK_TAB_CONTAINER(WidgetID.BANK_GROUP_ID, WidgetID.Bank.TAB_CONTAINER),
BANK_EQUIPMENT_CONTAINER(WidgetID.BANK_GROUP_ID, WidgetID.Bank.EQUIPMENT_CONTENT_CONTAINER),
BANK_EQUIPMENT_BUTTON(WidgetID.BANK_GROUP_ID, WidgetID.Bank.EQUIPMENT_BUTTON),
BANK_ITEM_COUNT_TOP(WidgetID.BANK_GROUP_ID, WidgetID.Bank.ITEM_COUNT_TOP),
BANK_ITEM_COUNT_BAR(WidgetID.BANK_GROUP_ID, WidgetID.Bank.ITEM_COUNT_BAR),

View File

@@ -106,7 +106,7 @@ public class ChatboxTextInput extends ChatboxInput implements KeyListener, Mouse
private Runnable onClose = null;
@Getter
private Consumer<String> onDone = null;
private Predicate<String> onDone = null;
@Getter
private Consumer<String> onChanged = null;
@@ -235,6 +235,20 @@ public class ChatboxTextInput extends ChatboxInput implements KeyListener, Mouse
}
public ChatboxTextInput onDone(Consumer<String> onDone)
{
this.onDone = (s) ->
{
onDone.accept(s);
return true;
};
return this;
}
/**
* Called when the user attempts to close the input by pressing enter
* Return false to cancel the close
*/
public ChatboxTextInput onDone(Predicate<String> onDone)
{
this.onDone = onDone;
return this;
@@ -750,9 +764,9 @@ public class ChatboxTextInput extends ChatboxInput implements KeyListener, Mouse
break;
case KeyEvent.VK_ENTER:
ev.consume();
if (onDone != null)
if (onDone != null && !onDone.test(getValue()))
{
onDone.accept(getValue());
return;
}
chatboxPanelManager.close();
return;

View File

@@ -1 +0,0 @@
1DC252B93DF0D948329C4EAD151FA9406A17D3CF2C5C3EC0317BF4DCD1B3811A

View File

@@ -1,125 +0,0 @@
.id 388
.int_stack_count 1
.string_stack_count 0
.int_var_count 3
.string_var_count 0
invoke 384
istore 1
invoke 1138
istore 2
iload 2
iconst 1
if_icmpeq LABEL8
jump LABEL80
LABEL8:
get_varp 1676
iconst 4
if_icmpgt LABEL12
jump LABEL31
LABEL12:
iload 1
iconst 0
if_icmpgt LABEL16
jump LABEL27
LABEL16:
get_varbit 5954
iconst 1
if_icmpeq LABEL20
jump LABEL27
LABEL20:
sconst "Level: "
iload 1
tostring
join_string 2
iload 0
if_settext
jump LABEL30
LABEL27:
sconst "Deadman"
iload 0
if_settext
LABEL30:
jump LABEL79
LABEL31:
get_varbit 4965
iconst 0
if_icmpgt LABEL35
jump LABEL45
LABEL35:
sconst "Protection"
iload 0
if_settext
iconst 0
iconst 13
iconst 1
iconst 2
iload 0
if_setposition
jump LABEL79
LABEL45:
iload 1
iconst 0
if_icmpgt LABEL49
jump LABEL60
LABEL49:
get_varbit 5954
iconst 1
if_icmpeq LABEL53
jump LABEL60
LABEL53:
sconst "Level: "
iload 1
tostring
join_string 2
iload 0
if_settext
jump LABEL79
LABEL60:
get_varc_int 78
iconst 1
if_icmpeq LABEL64
jump LABEL68
LABEL64:
sconst "Guarded"
iload 0
if_settext
jump LABEL79
LABEL68:
get_varc_int 78
iconst 2
if_icmpeq LABEL72
jump LABEL76
LABEL72:
sconst "No PvP"
iload 0
if_settext
jump LABEL79
LABEL76:
sconst "Deadman"
iload 0
if_settext
LABEL79:
jump LABEL94
LABEL80:
iload 1
iconst 0
if_icmpgt LABEL84
jump LABEL91
LABEL84:
sconst "Level: "
iload 1
tostring
join_string 2
iload 0
if_settext
jump LABEL94
LABEL91:
sconst ""
iload 0
if_settext
LABEL94:
iload 1
invoke 387
sconst "wildernessWidgetTextSet" ; set callback name
runelite_callback ; invoke callback
return