Menu Template (dynamic and adaptable)

Discussion of tools and resources for game developers

Post » Sun Jun 18, 2017 3:10 pm


I made a menu template to easily generate a menu for your games (you just need to write the infos of your buttons in the xml file).

You can download it here :

The demo is here :

+ menu created base on a xml file (ui.xml contained in the
project file - with various exemple nodes)
+ 2 type of button "normal" and "checkbox"
+ for each checkbox a key is created in the
variables dictionary to store it's state
+ for each button a function is called (if that function is
needed it need to be manualy created with a "on function..."
+ button can call a sub menu function
+ mouse, keyboard, gamepad support (analogic and d-pad)
***************************XML node usage***************************
+ The "Button" node contains each elements of a button
including sub-menu. It can contains 2 attributes
- "Type" : Type="CheckBox" create a checkbox instead of
a normal button
- "State" : Used to store the initial state of the button.
+ The "Name" node is the text which will be displayed
on the button
+ The "Callback" node is the name of the function to call
when activating a button. Two functions are included
in the capx :
- "Back" go to the parent menu
- "Sub-Menu" deploy the sub menu wich name is contained
in the "Option" node
+ The "Option" node can contain text stored in the button's
instance variable
** For more info in xml **
Posts: 22
Reputation: 951

Post » Mon Aug 21, 2017 2:44 am

@claurent9 Looks good! Will the box resize to the length of the text?
Posts: 96
Reputation: 3,542

Post » Sun Sep 03, 2017 3:22 pm

@roguecore Thanks :-). No all the boxes have the same size based on the size of the original object.
Posts: 22
Reputation: 951

Return to Tools and Resources

Who is online

Users browsing this forum: No registered users and 1 guest