Posted February 06, 2023 by up2115462
#TB2
In this week I aim to make some minor amendments to the code backend but mainly revamp the GUI to be more simple and intuitive.
Previously, I had the code check the min value was in range in my create_building function. I have found that maya input fields all have min, max, and default values that can be set.
Additionally, I have added a menu to window using this code:
In the window initialisation, I provide the "menuBar" flag and add a menu with some items.
Next I added a check box as I was often having to delete the items in the scene before generating a new city. Using the checkbox, I bundle that functionality into one easy click.
Here is the implementation for the checkbox in the create_buildings function:
I also discovered the use of separators which let me space out items in the GUI and create a division. Below is the code for my new GUI:
I make use of parenting to control which labels are attached to which sections.
To-Do: