That was very helpful, thanks! I wondered how I could use it in step events, as this helps a lot with GMLive.
hamrath
Creator of
Recent community posts
Hi,
I wonder, if I understand gooeys concept right: I want to create a button at the left bottom position on my mainscreen, that opens a "new game" panel. Is this the right way?
- Create a panel (no image) with the dimensions of my game window
- Add a "show menu" button to that panel as child
- In the callback of that button create the "new game" panel with several buttons
- Make the "new game" panel modal and add a close icon to it
- When the "new game" panel is closed it gets destroyed
- When the "show menu" button is clicked again the "new game" panel get re-created from scratch.
- When I click the "start game" button in my "new game" panel I call "UI.cleanup()" to remove all visible menu items
Or is there another way?
Hi, the UITextBox doesn't work for me. The caret is always shown in the top left corner of the sprite, also the text . I'm using the latest GM and gooey version 2024.1. I was able to position place holder text (which should be "Hello world" in the screenshot) with fa_left to make it readable, the caret still appears at the top left corner and the input behaves like it's fa_center'ed.
Am I'm doing something wrong? I tried to find a solution in the docs, but wasn't successfull.
Wow, that was fast! Thanks a lot, it works now.
There is a small ghost panel sprite on the screen though. This doesn't happen in demo room 12 or it's underneath one of the buttons, I'm not sure.
I investigated the camera problem a little further. stanncam disables application_surface and uses the Post-Draw event to draw everything. I added Update_GUI_dimensions() to a Post-Draw event in obj_GGL_controller and the menu is drawn properly. I still have to figure out how to center the items correctly on the screen though.
Hi,
I tried to follow the menu group tutorial, but menu groups seem buggy.
When I run my tutorial code I get the following error:
###
sprite_get_width argument 1 invalid reference to (sprite) at gml_Script_anon_GGL_sub_panel_gml_GlobalScript_scr_GGL_sub_panel_5522_GGL_sub_panel_gml_GlobalScript_scr_GGL_sub_panel (line 302) - var _baseW = sprite_get_width(sprite_index) * image_xscale * owner.scale_relative.x;
###
If I check line 302 in scr_GGL_sub_panel there seem to be some variables not initialized. I tried to fix the code with the following modifications:
- I initialized _baseW/_baseH with value 0 at 268, so they're declared earlier.
- I also replaced lines 302-303 with the code from lines 280-287, but used _baseW/_baseH instead of _w/_h
That makes the code run. But the buttons still don't work perfectly. The hover section of the button is very small around the center.
There seem to be more problems. Changing the font in parent_GGL_menu variables doesn't work.
Also I'm not able to center the menu - but this could be a problem with the camera I use (I'm using stanncam from Github). GGL seems to ignore the resolution of the camera and only uses a fraction of the resolution, so items are cut off.
FYI, these errors also happen to the demo room 12.
Could you please have a look at my problems? You probably can ignore the camera problem, as it seems to be an incompability with stanncam. I probably need to fix this myself.