Menu Template (dynamic and adaptable)

  • Hi,

    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 :

    https://drive.google.com/open?id=0B-CQs9SaQCHFczRHZ3huVnpiSmM

    The demo is here :

    https://www.scirra.com/arcade/tutorial-games/quick-menu-demo-with-capx-18963

    ******************************Features******************************

    + 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 https://www.w3schools.com/xml/default.asp **

    ********************************************************************

  • claurent9 Looks good! Will the box resize to the length of the text?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • roguecore Thanks . No all the boxes have the same size based on the size of the original object.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)