Log In  

as of 0.2.2, all menuitems now have their functions called when left/right are pushed while the menuitem is selected?? It took me an embarrassingly long time to realize this... (probably due largely to a bug where the menu doesn't actually close but the items are still triggered, even if the function does not return true which helped to obscure this behavior)

@zep it seems like this change to menuitem's functionality was intended to be extra functionality and only improve the capabilities of menuitems, but the problem is that the new functionality is always activated, even it's not needed or wanted, so if the user accidentally presses left or right (which is very easy to do with a joystick or with the mobile D-pad UI, and this is how I noticed it!) the menuitem's function gets triggered, and the only way to prevent that (i.e. in order to maintain the old behavior where left/right do not trigger the function) is to use up more tokens in the menuitem's function to check which button was pressed!

it seems backwards from most of the nice feature changes we've had in recent releases which tend to result in added convenience and token efficiency :D

I know I'm responding very late to this change :D but it seems like it would have been preferable if the new functionality was only activated if an extra param was given to menuitem or something like that...because it is very frustrating for a user to accidentally trigger "restart level" for instance when they were just intending to move down the list of items using a joystick!

P#127695 2023-03-28 04:29 ( Edited 2023-04-18 21:29)

oooh I just thought of a way this could be fixed without breaking compatibility! what if the function's signature was checked (hopefully that is possible?) and if the function takes a parameter (for the button bitfield) then it should be invoked when left/right are pushed, but if it takes no parameters, then it should not be invoked when left/right are pushed

that would just make sense, right? because if a function doesn't even take a parameter, there would be no way for it to differentiate between left/right, so it couldn't possibly make any sense for it to be a menuitem that should respond to left/right

I think that's basically how I assumed it worked all this time...so I am just kind of flabbergasted to discover it doesn't 🙃

P#127698 2023-03-28 04:41 ( Edited 2023-04-18 21:30)

[Please log in to post a comment]