remance / Masendor

Open source educational and historical battle action game, All helps accepted
MIT License
142 stars 31 forks source link

Cleanup improve menu code i did #54

Closed coppermouse closed 1 year ago

coppermouse commented 1 year ago

I made two new classes.

Containable

Container

The setup on the main menu now is that:

Screen(Container) has -> BoxUI(Containable)

and

BoxUI(Containable) has -> BrownMenuButton(Containable)

You can see that Box is both classes.

Screen is a Surface so it does not inherit that Container but it has a get_rect method which is the requirement for something to be a container. Everything can be a container as long as it has get_rect.

coppermouse commented 1 year ago

also I added the lower case on path string to make it work on my machine