From 03511a4e0051d2ebf6cc627e1e54b2d4c18c8a17 Mon Sep 17 00:00:00 2001 From: Max Weber Date: Sat, 11 Apr 2020 10:32:27 -0600 Subject: [PATCH] interfacestyles: update widget bounds before every render this reverts commit abaf45092b9f20d1068698da3ed726db6b35bce2 We need to run this every frame because the client can update the widget bounds cache without calling [proc,toplevel_resize]. This is easily reproducible by resizing the client in fixed mode, which causes the the tli to be revalidated, but because its in fixed mode it doesn't run the resize listener because the bounds don't actually change. We use BeforeRender instead of ClientTick because ClientTick is posted before cs2s are evaluated each tick, so if [proc,toplevel_resize] (or any other cs2 that can touch these widgets) is called the widget would be in the vanilla position for the next frame. --- .../src/main/java/net/runelite/api/ScriptID.java | 6 ------ .../interfacestyles/InterfaceStylesPlugin.java | 12 ++++-------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/ScriptID.java b/runelite-api/src/main/java/net/runelite/api/ScriptID.java index 5cc976e3d2..8aaff6d5ef 100644 --- a/runelite-api/src/main/java/net/runelite/api/ScriptID.java +++ b/runelite-api/src/main/java/net/runelite/api/ScriptID.java @@ -234,12 +234,6 @@ public final class ScriptID @ScriptArguments(integer = 3) public static final int QUESTLIST_PROGRESS_LIST_SHOW = 1354; - /** - * Procedure called when the toplevel interface is resized - */ - @ScriptArguments(integer = 2) - public static final int TOPLEVEL_RESIZE = 909; - /** * Called when the friends list is updated *