Skip to content

(solved) How to enforce immediate update of list content?

argent77argent77 Member Posts: 3,495
edited April 2023 in UI Modding
I'm currently tinkering with a dynamic filter for the cheat menu where entered text should automatically apply to the associated list of areas and other lists provided by the Hidden Gameplay Options mod.

The problem is, however, that any changes made to the filter text are applied to the list only after one additional keypress, which leads to somewhat confusing results. Updating filter text programmatically doesn't even appear to be detected at all by the list control.

Is there a way to enforce list content to be updated immediately?
Post edited by argent77 on

Comments

  • PeccaPecca Member Posts: 2,218
    I'm using a technique for immediate update of UI, where I put a function inside text parameter of dummy button
    button
    	{
    		area 0 0 0 0
    		text lua "rgGetQuicklootJunkIndexes()"
    	}
    

    The function gets triggered at every moment.
  • argent77argent77 Member Posts: 3,495
    Interesting idea. I'll see how it works for me.
  • argent77argent77 Member Posts: 3,495
    I was able to solve the problem by using "actionAlt" in place of "action" to run scripts. It looks like this keyword waits until scripts execution is completed before UI processing continues.
Sign In or Register to comment.