Roblox has introduced the GuiButton.SecondaryActivated event, providing a unified API for handling secondary inputs like right-clicks and long presses across different platforms. This update simplifies UI development by removing the need for device-specific logic branching for common interactions.
Vibe score
-100 to +100
This topic was automatically opened after 10 minutes.
Actually a pretty solid change by roblox! I just needed it for my game..
Ooo very nice. I can finally get rid of my hacky workarounds for this!
Hold on, this is actually pretty cool!
In what contexts can I use this? Right-click context menu?
I wish there was some universal symbol or design language I could use to show users that an element is long pressable or right clickable. I’ve mauled my designs time and time again because it’s hard to show that a user can do these things with controls.
couldn’t agree more, especially with long press… those interactions always feel very hidden! proximity prompts are great at providing this information but that kind of overlay on a specific gui element would feel very busy or repetitive in most cases. It could be interesting to explore some kind of
Is it possible to add stuff like swipe/drag patterns to create more dynamic gameplay? EDIT: An example is for the player to make a circle by “drawing” it with their mouse (or swiping on mobile), so they can flip a burger for example.
this is amazing, this will simplify so many systems and allow developers to focus more on gameplay and not trying to figure out the various inputs needed for their uis
What enum state on guiobject::GuiState would represent a press with the secondary button?
This is such a good feature which I’m questioning why wasn’t a core feature by now
add gesture controls to ur input tilemap and put one in the corner of the element on mobile image 1064×707 87.1 KB
Yeah on desktop its manageable because the user has a cursor that can preempt the user’s intent, but on mobile it seems like an unsolvable problem. A hint that right click is bound seems the closest to helping, but that assumes a lot of deduction skills from the user, or could apply to many elements
Press!
Ahhh I remember trying to use this before and being confused why it seemed to not work. It is exactly what I expected, and now I can use it! Cheers!
Why not differentiate the two in said enum state though? I find it unsound that it doesn’t get a new state. Something like .Press2 sounds good to me.
Agreed, I believe textbox also needs a GuiState for when the user is “Focused” on it.
create.roblox.com TextBox A 2D user interface element that displays player-editable text. you mean this?
No they mean this create.roblox.com GuiObject An abstract class for all 2D user interface objects.