Blog 7: Menu Widgets
4/11/2023
Welcome back to the Integration Hell development blog.
I was very busy this past week so there was not a lot of work done on IH this week. However, I did begin work on the widgets for the menus. I plan on having widgets for buttons, sliders, checkboxes, radio buttons, and text boxes for the menus to use. I'm keeping it generalized so that menus for machines / other tiles will have a lot of flexibility in their menus.
The first widget I made is the button. They are simple, when you click them it responds that it was clicked. Also, when the mouse hovers over the button it changes color so that the user knows the button will be activated when clicked. Below is an example of both states
Button with the mouse away Button with the mouse on the button
The buttons work functionally, but there is more work to be done with them. The button's size and position were manually put in and I would like it to be something like add_button(), and the menu figures out size and placement. Some menu flexibility will be lost, but it will make creating new menus for game items easier as I will not have to define where everything goes. More refactoring needs to be done as the current implementation is sloppy. When I add the other widgets, they will not need to be refactored because they will be in their own file. There were certain things I wanted to test feasibility for (function pointers) so I programmed it in the main rendering function.
Thanks for reading and I hope to see you next week!
The Checklist:
Tasks:
π Create more assets to use
π Create better file organization for the game
π Create widgets for the menus
π Create animations
π Give the game an icon