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

GUI for changing sorting order #116

Open
wchristian opened this issue May 14, 2019 · 4 comments
Open

GUI for changing sorting order #116

wchristian opened this issue May 14, 2019 · 4 comments

Comments

@wchristian
Copy link
Collaborator

wchristian commented May 14, 2019

Going through the config setting each time i want to change that is fairly annoying, and at different times i need different modes, i.e. when surveying for what's in need of handling soon, and for finding the best next mine spot. So being able to change sorting mode directly ingame would be nice.

@narc0tiq
Copy link
Owner

A bit of GUI for quick-changing sort orders would definitely be nice; I was actually thinking it would work best as a drop-down, possibly hidden unless a button is clicked. But, do want.

@narc0tiq narc0tiq changed the title add a button to gui to cycle through sort modes? GUI for changing sorting order May 15, 2019
@wchristian
Copy link
Collaborator Author

I tried looking at the code to see if i implement it, but i found it's a little more tricky than expected. Apparently the list of values is stored only in the mod config segment, and i cannot figure out how the api allows accessing that in real time. If it can be done, the button could simply increment an integer which is applied as an offset after the position of the current setting in the list of values is determined. This should probably also be displayed and have a reset button, but altogether it would add 3 gui elements to allow controlling an arbitrarily big sort mode list.

@narc0tiq
Copy link
Owner

The solution feels like it should be fairly simple: keep the values in a defines.lua that both the runtime and settings stage can require to be able to generate the respective UIs

@narc0tiq narc0tiq added this to the Stretch goals for 1.0 milestone Nov 19, 2024
@narc0tiq
Copy link
Owner

NB: We still need to enumerate the values at runtime to be able to produce a comparator that actually applies the order, so the above would be good to avoid repetition; we can also have a runtime check that all order-by options actually have a comparator, which currently is not something we (can) check.

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

2 participants