Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GUI without recreating it every time #99

Open
narc0tiq opened this issue Apr 4, 2019 · 1 comment
Open

Update GUI without recreating it every time #99

narc0tiq opened this issue Apr 4, 2019 · 1 comment

Comments

@narc0tiq
Copy link
Owner

narc0tiq commented Apr 4, 2019

As somewhat implemented in narc0tiq/prodmon, we should not have to recreate the whole set of GUIEntities every 5 seconds, instead:

  • maintain a view model containing all the data that will be shown
  • add/remove GUI rows according to the number of rows in the view model
  • link the GUI buttons to the appropriate sites by referencing the view model

Most usefully, this helps the GUIEntities remain relatively stable, which allows us to re-raise the GUI update timer from where e7e9e71 left it, and it would finally (hopefully) fix #16 for good.

@narc0tiq
Copy link
Owner Author

It might not necessarily end up organized as described, but we should really try to get this in 1.0 (or at least a stretch goal not long thereafter). We could support updating the HUD more often (though it seems we don't really need to) if it wouldn't cause missed clicks every once in a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant