[Alex Gurvich]
I think we should consider if there’s some smart way to do this more programmatically rather than hardcoding each element to its own flag… It’d be really cool to have it so that you can disable any button by coming up with the correct flag (i.e. make it so that users can set reader.settings['showUI/general/camera/reset'] = False and it’ll just work, for example).
edit: also reader.settings['showUI/general/camera'] = False could disable the whole camera pane, stopping at general could leave off the general pane, and showUI = False would disable the whole thing (edited)
[Aaron Geller]
This is an interesting idea. I could imagine one way to do this is to expand the GUIstate object to include all the individual buttons (and maybe also their heights in the GUI). Then one possibility could be to create the GUI as normal, and then have a stage afterwards that removes portions by ID. Then we'd also need to incorporate this into the loop that checks if the GUI is finished. I think the main difficulty with this (other than defining the large GUIstate object) will be getting the heights (and maybe also widths?) correct for the GUI if we remove items. Most of those heights are hardcoded, assuming that all elements exist.
slack convo copied for convenience:
[Alex Gurvich] I think we should consider if there’s some smart way to do this more programmatically rather than hardcoding each element to its own flag… It’d be really cool to have it so that you can disable any button by coming up with the correct flag (i.e. make it so that users can set reader.settings['showUI/general/camera/reset'] = False and it’ll just work, for example). edit: also reader.settings['showUI/general/camera'] = False could disable the whole camera pane, stopping at general could leave off the general pane, and showUI = False would disable the whole thing (edited)
[Aaron Geller] This is an interesting idea. I could imagine one way to do this is to expand the GUIstate object to include all the individual buttons (and maybe also their heights in the GUI). Then one possibility could be to create the GUI as normal, and then have a stage afterwards that removes portions by ID. Then we'd also need to incorporate this into the loop that checks if the GUI is finished. I think the main difficulty with this (other than defining the large GUIstate object) will be getting the heights (and maybe also widths?) correct for the GUI if we remove items. Most of those heights are hardcoded, assuming that all elements exist.