Skip to content

Commit b3ccbdc

Browse files
committed
refactor: share update checks between fixed/resizable
1 parent 20e13b0 commit b3ccbdc

File tree

1 file changed

+26
-39
lines changed

1 file changed

+26
-39
lines changed

src/main/java/org/runejs/client/Game.java

Lines changed: 26 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -937,17 +937,37 @@ public static void drawGameScreen() {
937937
ChatBox.redrawChatbox = true;
938938
}
939939
}
940+
941+
if(GameInterface.tabAreaInterfaceId != -1) {
942+
boolean bool = GameInterface.handleSequences(GameInterface.tabAreaInterfaceId);
943+
if(bool) {
944+
GameInterface.redrawTabArea = true;
945+
}
946+
}
947+
948+
if(GameInterface.chatboxInterfaceId != -1) {
949+
boolean bool = GameInterface.handleSequences(GameInterface.chatboxInterfaceId);
950+
if(bool) {
951+
ChatBox.redrawChatbox = true;
952+
}
953+
}
954+
955+
if(ChatBox.dialogueId != -1) {
956+
boolean bool = GameInterface.handleSequences(ChatBox.dialogueId);
957+
if(bool) {
958+
ChatBox.redrawChatbox = true;
959+
}
960+
}
961+
962+
if(flashingTabId != -1) {
963+
GameInterface.drawTabIcons = true;
964+
}
965+
940966
if(ScreenController.frameMode == ScreenMode.FIXED) {
941967

942968
if(MovedStatics.menuOpen && MovedStatics.menuScreenArea == 1) {
943969
GameInterface.redrawTabArea = true;
944970
}
945-
if(GameInterface.tabAreaInterfaceId != -1) {
946-
boolean bool = GameInterface.handleSequences(GameInterface.tabAreaInterfaceId);
947-
if(bool) {
948-
GameInterface.redrawTabArea = true;
949-
}
950-
}
951971
method353();
952972

953973
if(GameInterface.atInventoryInterfaceType == -3) {
@@ -958,18 +978,6 @@ public static void drawGameScreen() {
958978
}
959979
MovedStatics.drawTabArea();
960980

961-
if(GameInterface.chatboxInterfaceId != -1) {
962-
boolean bool = GameInterface.handleSequences(GameInterface.chatboxInterfaceId);
963-
if(bool) {
964-
ChatBox.redrawChatbox = true;
965-
}
966-
}
967-
if(ChatBox.dialogueId != -1) {
968-
boolean bool = GameInterface.handleSequences(ChatBox.dialogueId);
969-
if(bool) {
970-
ChatBox.redrawChatbox = true;
971-
}
972-
}
973981
if(GameInterface.atInventoryInterfaceType == 3) {
974982
ChatBox.redrawChatbox = true;
975983
}
@@ -990,10 +998,6 @@ public static void drawGameScreen() {
990998

991999
Minimap.renderMinimap();
9921000

993-
994-
if(flashingTabId != -1) {
995-
GameInterface.drawTabIcons = true;
996-
}
9971001
if(GameInterface.drawTabIcons) {
9981002
if(flashingTabId != -1 && flashingTabId == currentTabId) {
9991003
flashingTabId = -1;
@@ -1013,19 +1017,6 @@ public static void drawGameScreen() {
10131017
MovedStatics.anInt199 = 0;
10141018

10151019
} else {
1016-
1017-
1018-
if(GameInterface.tabAreaInterfaceId != -1) {
1019-
GameInterface.handleSequences(GameInterface.tabAreaInterfaceId);
1020-
}
1021-
1022-
if(GameInterface.chatboxInterfaceId != -1) {
1023-
GameInterface.handleSequences(GameInterface.chatboxInterfaceId);
1024-
}
1025-
1026-
if(ChatBox.dialogueId != -1) {
1027-
GameInterface.handleSequences(ChatBox.dialogueId);
1028-
}
10291020
method353();
10301021
ChatBox.renderChatbox();
10311022

@@ -1034,10 +1025,6 @@ public static void drawGameScreen() {
10341025
// this render is handled in `ResizableFrameRenderer`
10351026
//Minimap.renderMinimap();
10361027

1037-
1038-
if(flashingTabId != -1) {
1039-
GameInterface.drawTabIcons = true;
1040-
}
10411028
if(GameInterface.drawTabIcons) {
10421029
if(flashingTabId != -1 && flashingTabId == currentTabId) {
10431030
flashingTabId = -1;

0 commit comments

Comments
 (0)