Skip to content

Commit

Permalink
refactor(widget): rename field2894 to dragDeadTime
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua-F committed Mar 26, 2018
1 parent 8277f60 commit 0fcad60
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion runescape-client/src/main/java/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -5987,7 +5987,7 @@ final void method1432() {
int var3 = var1 - field1028;
int var4 = var2 - field944;
int var5 = draggedWidget.field2817;
if(MapLabel.field446 > draggedWidget.field2894 && (var3 > var5 || var3 < -var5 || var4 > var5 || var4 < -var5)) {
if(MapLabel.field446 > draggedWidget.dragDeadTime && (var3 > var5 || var3 < -var5 || var4 > var5 || var4 < -var5)) {
draggingWidget = true;
}

Expand Down
2 changes: 1 addition & 1 deletion runescape-client/src/main/java/SoundTaskDataProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ static int method837(int var0, Script var1, boolean var2) {
var3.field2817 = class81.intStack[--class5.intStackSize];
return 1;
} else if(var0 == 1304) {
var3.field2894 = class81.intStack[--class5.intStackSize];
var3.dragDeadTime = class81.intStack[--class5.intStackSize];
return 1;
} else if(var0 == 1305) {
var3.name = class81.scriptStringStack[--class316.scriptStringStackSize];
Expand Down
7 changes: 4 additions & 3 deletions runescape-client/src/main/java/Widget.java
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@ public class Widget extends Node {
@ObfuscatedGetter(
intValue = -91992637
)
public int field2894;
@Export("dragDeadTime")
public int dragDeadTime;
@ObfuscatedName("cz")
@Export("dragRenderBehavior")
public boolean dragRenderBehavior;
Expand Down Expand Up @@ -705,7 +706,7 @@ public Widget() {
this.name = "";
this.dragParent = null;
this.field2817 = 0;
this.field2894 = 0;
this.dragDeadTime = 0;
this.dragRenderBehavior = false;
this.targetVerb = "";
this.mouseActionsPresent = false;
Expand Down Expand Up @@ -1101,7 +1102,7 @@ void decodeActive(Buffer var1) {
}

this.field2817 = var1.readUnsignedByte();
this.field2894 = var1.readUnsignedByte();
this.dragDeadTime = var1.readUnsignedByte();
this.dragRenderBehavior = var1.readUnsignedByte() == 1;
this.targetVerb = var1.readString();
this.onLoadListener = this.decodeListener(var1);
Expand Down

0 comments on commit 0fcad60

Please sign in to comment.