Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

ome6a1717

88
Posts
9
Topics
357
Followers
1
Following
A member registered May 30, 2020 · View creator page →

Creator of

Recent community posts

Thank you!

That’s the intended behavior at the moment. The offset isn’t only a draw offset, it also offsets any hovering coordinates.

What I would maybe do in your case is put the label in a horizontal container, and handle the hovering callback on the container instead of the label (so the container should still have the same hit box)

So glad you like it!  I’m thinking of adding an auto_surface element that should allow implementations like scribble or other draw events to be computed in the containers as well. 

(1 edit)

I originally intended them to scale, but can't remember why I left it out.  I'll take a look, but in the meantime what I would do is place the image and set it's visibility to false.  Then you can just manually draw your

img = auto_image(<data>);
img.set_visible(false);
// NOTE: you might need to add space using container.add_space(sprite_get_height(sprite) * scale)) to push the other elements
// DRAW EVENT
draw_sprite_ext(sprite, frame, img.get_bbox_left(), img.get_bbox_top(), etc.)

I think my hesitating factor was whether or not scaled images should push the adjacent content...maybe I'll add this to the next update.

thank you!

Glad you enjoyed it!  The “ending” is currently just unlocking everything, but there are no limits to the spell upgrades/prestige levels. 

Thank you!

I just posted a hotfix that should hopefully fix that.

Thank you!  That's strange, though - what Prestige level are you?  I can't seem to replicate this one...

Thank you!  That will be fixed in the HTML version shortly :)

Thank you so much!  I thought about adding auto-generation towards the end, but it felt like it was just overcomplicating everything, so as of now, I just have a definitive end point.  Glad you enjoyed it!

Thank you!

It was tough to get the pacing right on this one - I started the whole game without clicking (because I don't like it either), but the game just didn't work as well...

Thank you!  That makes sense as it wasn't really developed to work on mobile :)

I'm not quite sure what you mean about procedurally generated content, but if you're asking "can you add an infinite number of elements and scroll all of them", yes.  The scrolling is based on the content you place inside the scroller.

Unfortunately, right now it does not support scribble - I thought about possibly making a "create_auto_surface" that would allow you to put whatever you'd like in a callback (like scribble), but I haven't gotten that far yet...

Thank you!

AutoUi Update v1.3.1

UPDATES

  • (auto_textedit) now allows you set the helper text alignment using set_helper_text()

BUG FIXES

  • (auto_label) set_force_text_wrap's _separation value is now defaulted to undefined instead of 14

Thank you!

Thank you!

That’s correct, each room can be entered from any adjacent room. 

Currently, yes - this is as far as I'm developing for the time being!

Of course!

I've found scope to be very difficult to figure out in GML when using script_execute, to be honest.  For instance, what you did will work fine for windows/macos export, but if you export to HTML5, it will sometimes throw an error that it is unable to find your element.


It's generally just best practice to pass in all objects you use or reference for safety:

my_button = auto_button(/* data */);
my_button.set_click_func(function(_obj, _btn) {
    _btn.color = c_white; // eg.
    _obj.variable = 2; // eg.
}, [self, my_button]);

Are you calling instance destroy in set_click_func?  If so, generally the scope will be the element and not the base object, so you’ll have to pass in the obj_autoGUImenu id as a parameter and destroy that. 

CHANGES TO BE AWARE OF

  • The grouping of the script/notes/examples are now in Tools > AutoUi instead of their respective Scripts/Notes/Etc. folders

NEW ELEMENTS

  • New ELEMENT: (auto_nine_slice) - a simple nine-slice sprite that flexes it's w/h to the parent container

UPDATES

  • (auto_lifebar) - set_value() now has an optional added parameter, _instant (instantly sets the value instead of lerping)
  • (auto_label) - now has an optional index frame for nine_slice_background (set using set_nine_slice_frame())
  • .set_visible() sets hovering to false on call (if you were hovering and called set visible, it would keep true indefinitely)

BUG FIXES

  • Minor bug fixes
  • Stack's set_visible() now correctly affects all children
  • Auto-complete will now provide all of the variables and methods for each element

Well, this made me investigate further and realize that I CAN have auto-complete populated, so I'll push that in the next update which should be coming out shortly!

Totally understand.

Currently, the easiest would be the Notes > AutoUi Documentation folder.  I can't promise they are 100% updated as of the current version, though.  In your opinion, what would be the best format (other than obviously autocomplete)?  

Of course!


You can find the methods in the respective script file of each element (eg. auto_button's methods are in the AutoUiButton script file.)  They are definitely worth a look through, especially since depending on which code editor you're using, autocomplete can be quite finicky.

Really glad you're finding it useful, and thanks so much for the kind words!

I thought about doing a video regarding this since I had to figure it out in my recent game, but for now here is the method I used:

1. Create a 'select' index variable, radiogroup, and function in your object that creates the "structure" of your selection (in the create event):

radiogroup = auto_radiogroup();
select = 0; // the index currently selected
options = []; // we'll add this later
menu_option = function(_name) {
    var _btn = auto_button_checkable_center(120, 40, _name, font, bgsprite, false, radiogroup);
    return _btn;
};

2. Add all of your options

options[0] = menu_option("Start");
options[1] = menu_option("Load");
options[2] = menu_option("Quit");
// add to your main container

3. Then in the step event:

if control_is_pressed("down") {
    select = (select+1) mod array_length(options); // set to next index
    options[select].set_checked(true, true); // checks this button and unchecks the rest of the radiogroup
}
if control_is_pressed("up") {
    select = (select+array_length(options)-1) mod array_length(options);
    options[select].set_checked(true, true); // checks this button and unchecks the rest of the radiogroup
}
if control_is_pressed("select") {
    switch(select) {
        case 0: startgame(); break;
        case 1: loadgame(); break;
        case 2: game_end(); break;
    }
}

Obviously this is a relatively rudimentary version of this, but again - I might do a video going into further detail.

Now, if you're like me and need to display more than just a button (eg. you want to have the "container" selectable), for now, you can kind of hack this by using a button as the background (with text set to ""), and place that and all of your elements in a stack.

Hopefully that should point you in the right direction!

I imagine it will continue to hold that record for you :)

Thank you!  And glad you enjoyed it :)

(1 edit)

Thank you so much!

While it doesn't explicitly support gamepad, there are many ways you can do it:

--- CREATE EVENT ---

index = 0; // your current selected index 
c = auto_container_v(80, 8); // width/spacing 
radiogroup = auto_radiogroup();  
/// @desc Returns a struct of a new button element, index, and select function 
new_button = function(_text, _index, _select_func) {     
    // Create the button     
    var _btn = auto_button_checkable_center(80, 32, _text, FONTS.px_6x6, s_tt_btn_purple, _index == 0, radiogroup);
    // Set the hovering function, passing in this object and the index         
    _btn.set_hovering_func(function(_obj, _index) {             
    // Set this button to be "checked", and uncheck all other buttons in the radio group             
        set_checked(true, true);             
        _obj.index = _index; // set the obj's index correctly         
    }, [self, _index]);         
    // Assign the click function         
    _btn.set_click_func(function(_select_func) {             
        _select_func();         
    }, [_select_func]);     
    // Returning a struct of the button, index and select function     
    return {         
        button: _btn,         
        index: _index,         
        select: _select_func     
    } 
}  
// Here is our struct data where we create our buttons 
button_data = [     
    new_button("New Game", 0, function() { show_debug_message("START NEW GAME"); }),         
    new_button("Load Game", 1, function() { show_debug_message("LOAD GAME"); }),         
    new_button("Quit Game", 2, function() { game_end(); }) 
]  
// And don't forget to add the button to the main container 
for (var i = 0; i < array_length(button_data); i++) { c.add(button_data[i].button); }

--- STEP EVENT ---

c.step(5, 5);  
// EZ check if you press up or down (uses AutoInput; replace with gamepad_button_check etc.) 
var _ydir = control_is_pressed("menu_down", 0) - control_is_pressed("menu_up", 0);  
// If a button was pressed... 
if _ydir != 0 {     
    // Set the index     
    index = (index + array_length(button_data) + _ydir) mod array_length(button_data);     
    // And make sure to set checked to true     
    button_data[index].button.set_checked(true, true); 
}  
// If select, run function 
if control_is_pressed("menu_select", 0) { button_data[index].select(); }

And then run c.draw() in your draw event!  Now it handles BOTH mouse and gamepad.


Hopefully that helps - it's not quite as cut and dry, but because some people have their own input systems (eg. AutoTools' AutoInput!), I didn't want to put too much of that in AutoUi.

I'll probably add this to an example in the package, though - thanks for the suggestion!

Thank you!

Thank you!

Thank you both - this has now been fixed! :)

Do you mean the titles or the descriptions?

Ah!  Good catch on the bug - I'll have to fix that...glad you enjoyed!

That's great to hear!  Glad you enjoyed it.

Thank you!

That's interesting - it's about as optimized as you can get for something like this.  That being said, I know HTML5 has its limits.  There is also a windows executable you can download that should play better.