gsGUI is a simple GUI kit to make simple GUI elements. *This is not a complete GUI system yet and has only a limited set of controls and functionality.*gsGUI is a simple GUI kit to make simple GUI elements. *This is not a complete GUI system yet and has only a limited set of controls and functionality.*
scale 9 sprite – draws and displays a sprite divided into nine regions and scaled* Screen Shake – shakes the view with a set intensity for a set duration of steps(time)
- gsButton – scalable(scale9) autosizing button with multiline text – static, no rotation, no precise collision checks with mouse
- gsButtonEx – scalable(scale9) autosizing button – uses surface, can rotate using, image_angle, precise collision masks
- gsButtonSimple – a simpler version of gsButton that does not autosize and uses a fixed size sprite that you provide through the GameMaker GUI – behaves like a regular object
How to use
gsButtonSimple – use them as you will use regular objects, set the callback scripts in the instance creation section after you create them in your room. gsButtonSimple uses a static sprite with 3 images inside for mouse up, over and down states. You can also create them using the scr_create_gsButtonSimple function as well.
gsButton and gsButtonEx – you can create them via code by calling the scr_create_gsButton or scr_create_gsButtonEx functions or by creating instances of the objects directly in your rooms.
scr_create_gsButton(pos_x, pos_y, "Hello Button World", c_black, noone, noone, noone, noone, scr_btn_callback, 0, true);
The above code creates a gsButton at position – posx and posy – with the label “Hello Button World” – with the label color to black. The following four params set to noone are – mouse_left_callback, mouse_left_pressed_callback, mouse_enter_callback and mouse_leave_callback.
The only callback set here is the mouse_left_release_callback which is executed when the mouse left button is released. The next parameter is the button group_id and the last parameter sets the button state for selected to true.
obj_gsButtonGroup – add a gsButtonGroup to your room and set
Get gsGUI from the Yoyogames Marketplace : https://marketplace.yoyogames.com/assets/3483/gsgui