[Super-tux-devel] Menu code
Brought to you by:
wkendrick
From: Ricardo C. <ri...@ae...> - 2004-01-02 01:45:59
|
Hey there, I am doing some hacks to do a dialog to ask the level width, song filename and all that stuff needed by the level editor. You can see a screenshot of it here: http://rpmcruz.planetaclix.pt/trash/supertux.png Please, Tobias, update the cvs with the patch I have sent to the level editor (regarding the movements) and I will then send you a patch on this (still not functional). I would also like someone to answer if it is currently possible to know the number of levels. And, if not, if someone could write something to do it. Maybe by checking file names... Anyway, I think that the menu should be written in a way that wouldn't need a function to every single menu. In a way, that you just needed to say the name of the entries and it would draw and manage them, returning the entry chosen. I have already done this in a C++ game of mine, I could try to port it... I have done some cleanup to the menu; removed some useless brackets, replaced a couple of ifs with switchs and putted the constants MENU_*_ITEM to really be the menu entries number. Ricardo -- Most public domain software is free, at least at first glance. |