Closed lennyhans closed 11 months ago
I think a Resource file & supporting class containing the geometry for drawing the selected graphics set UI (right now there is only one) needs to come first. If you do that I don't think you really need to handle the button behavior as its own thing inside Game. Does ButtonCustom function enough to do what the main menu needs?
Let me revisit this after release, hopefully in the next few days.
Yeah, I think a dedicates UI class is a must, but here I did not want to modify a lot, just a few pieces to "un-glue" the button definition from the menu events handlers. I will try to make a small (expandable) class for the menu so the UI def can be a little more decoupled
I'm not as interested in a dedicated UI class. Please look the ButtonCustom and VBrowseIF for similar menu like situations. But the cleanup portion of this request seems to be ok.
Well I have managed to put the CustomButton
to handle the entries, but there are some leftovers (handle the highlight for example) and some errors (if I go to a training scenario all the bitmaps looks weird then I go back to the menu and it's empty) so I will try to figure it out the way. I think I get the idea
Thank you for your review of some of the basic graphics code. I have opened up a topic here: https://7kfans.com/forums/viewtopic.php?f=20&t=1291
I will be winding down github as I no longer wish to use it. Our sourceforge page has been active for a while, and I'm opening to using the resources there.
I think this could help to migrate (eventually to a dedicated or more flexible UI definition class/component)
Try to extract main menu buttons definiton
The menu looks the same, except for the
else
on#ifndef DISABLE_SINGLE_PLAYER_NEW_GAME