Skip to content

1. Getting Started

Mark Palnau edited this page Jul 13, 2018 · 6 revisions

As with most assets and frameworks, you must initiate the scripts for the system to work. In GMUI, you need to Initiate the framework and specify the name of the object that will be used for the controls generated:

GMUI_Init(Name_Of_Controls_Object);

After initiated, we can now create a new instance of GMUI, which includes a script of controls to create in layers and groups. Specify the object used for controlling an instance(aka: a form):

newGMUI = GMUI_Create(GMUI_Instance_Object, Your_Form_Script, 16, 0);
// e.g. newGMUI will have id of 1, and a grid size of 16x16 because 0 will just copy the width

The next step is simple. You have to place the draw event scripts for the instance of GMUI, and the "control" object, used in each of the controls created from your form. IN OBJECT: GMUI_Object (The Instance)

GMUI_DrawEvent();

IN OBJECT: GMUI_Control (The object for controls)

GMUI_ControlDraw(true);
// e.g. True to include drawing, false to only execute functionality

And that's it! Now you can write your "Form Script" to define all of the controls you would like in your game.

Moving onto the next step: 2.-Building-your-"Form"-interface

Clone this wiki locally