bank plugin: improve responsiveness of bank searches

The client will normally layout the bank during a search only once every 40 client ticks, causing slow response times after the search input is updated. Instead, hook the search refresh script that is called every client tick, and if the bank hasn't been laid out on the current tick, and the search input has changed, lay it out early.
This commit is contained in:
trimbe
2019-08-03 20:59:03 -04:00
committed by Adam
parent ec3fbabbe2
commit 22cee79ab9
3 changed files with 50 additions and 14 deletions

View File

@@ -271,4 +271,13 @@ public final class ScriptID
*/
@ScriptArguments(integer = 7)
public static final int IGNORE_UPDATE = 630;
/**
* Called in an onTimer, determines whether to layout the bank during a search
* <ul>
* <li> int (WidgetID) * 16, various widgets making up the bank interface </li>
* </ul>
*/
@ScriptArguments(integer = 16)
public static final int BANKMAIN_SEARCH_REFRESH = 283;
}