banktags: improve bank scrollbar updates
With tag tab tab or "Remove tab separators", the scrollbar height needs to be adjusted to account for either many tag tabs (which requires scrolling to see) or the hiding of the tab separators. This is because we artifically filter the bank results without keeping the bank in searching mode, causing the vanilla code which usually computes the scroll height to be incorrect. The existing code does this by manually invoking [proc,update_scrollbar] later with the recomputed scroll height. Now that invokeLater runs next tick and not next frame, this leaves several frames with the scrollbar the incorrect size. The desired scroll height is passed to [proc,bankmain_finishbuilding] in argument int12, so instead we recompute the scroll height and overwrite the script argument prior to execution.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.id 279
|
||||
.id 279 ; [proc,bankmain_filteritem]
|
||||
.int_stack_count 1
|
||||
.string_stack_count 0
|
||||
.int_var_count 2 ; +1 for storage of search filter result
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.id 277
|
||||
.id 277 ; [proc,bankmain_build]
|
||||
.int_stack_count 17
|
||||
.string_stack_count 0
|
||||
.int_var_count 36
|
||||
@@ -842,7 +842,7 @@ LABEL729:
|
||||
iload 14
|
||||
iload 15
|
||||
iload 16
|
||||
invoke 505
|
||||
invoke 505 ; [proc,bankmain_finishbuilding]
|
||||
return
|
||||
LABEL750:
|
||||
invoke 514
|
||||
|
||||
Reference in New Issue
Block a user