Exactly, it reverts back to the Roblox set one, having developers switch the mouse icon on every MouseEnter and MouseLeave if we want to have a custom icon.
I believe the most natural approach Roblox can take to enable us to do this would be to add a MouseHoverIcon
[string]
property to all GUI elements with an Active
property.
The way this would work is, MouseHoverIcon
must be set to a valid image asset id [rbxassetid://123456789
] otherwise it will use the default hover cursor.
The benefit of this approach is that is isnât nearly as broad as the approaches others have mentioned earlier:
The theoretical concept of having the mouseâs hover icon set in UserInputService
rather than explicitly in each designated UI leaves a bad taste in my mouth. Declaring the MouseIcon
globally makes sense; however, declaring the MouseHoverIcon
does not on account of the fact that it doesnât logically belong there. The icon displayed when hovering over a GUI element should be affiliated with that particular GUI element.
Inb4 someone objects to this idea by saying, âyou can set it at runtime with the MouseEnter
eventâ, ok, but did I ask? Is the average UI Designer going to possess the knowledge to script that into a GUI? No, no they will not and nor should they have to. Anyone should be able to see the mouse icon of hovering over a button in the same way that AutoButtonColor
can be seen before runtime.
Just to get an idea of what devs are thinking here, how important do you think changing the mouse icon in GUIs is? Because it comes with high costs:
-
By default youâre guaranteed to get appropriate interactive feedback on every platform but as soon as you start micromanaging the cursor that goes away.
-
âCuteâ cursor changes are a dubious UX choice to begin with. If your user is even thinking about what the cursor looks like youâve probably made a mistake because they should be thinking about what theyâre interacting with not the cursor theyâre using to do it.
-
Changing the cursor in 2d games where the scene is a GUI is valuable but thereâs very few of those on Roblox.
As mentioned in the release note the new API is specifically for the context of gameplay 3d space, for which there is no default behavior to give, because the behavior there entirely depends on the experience. With other contexts things get a lot tricker. Thereâs certainly some value in more cursor control but at least my gut feel is itâs not worth prioritizing.
Those already exist.
ImageButton.MouseEnter
ImageButton.MouseLeave
Theyâre properties of GuiObject
but work best for buttons in general.
Changing the mouse icon in GUIs, like many other features already provided, enables developers to reach their creative image which otherwise mayâve not been possible given the limitations of the engine before that point.
I donât see how any of these points can be considered âhigh costsâ.
The default cursor is not always preferable, especially when a developer feels that a custom cursor would complement the immersion/theme of their game. Creativity is far from dubious, as a matter of fact, priceless, even if itâs something as small as a cursor, it would catch players off guard if a guiâs cursor matched the theme of the game rather than take away from it.
Powering ImaginationÂŽ except for when they donât.
We need more cursor control, its detrimental to send this to the back of the line because developers will benefit from this. Of course, some developers wonât use this, but I guarantee that a significant amount of developers will. Theyâll one day read the patch notes and be like, âdamn, why wasnât this already a feature?â.
I find it funny how ClickDetectors have more cursor control than GUIs.
I certainly donât speak for everybody but I personally think it would be a good idea to have just thinking from a stylistic perspective.
Currently if I want to set the mouse cursor to something that isnât a goofy thick outlined cartoony cursor I have to go through the trouble of either:
1- disabling the cursor entirely and create a custom cursor controller implementation and consider how the cursor interacts with every other type of UI object, or,
2- suck it up and accept the fact that my theme-appropriate cursor when not hovering over anything wonât match the cursor while hovering over button cursor, or the text cursor, or just suck it up and accept that my cursor wonât match my game in general and use the default mouse icons.
I ran into this exact dilemma while working on a game earlier in like 2021? I had to accept the fact that my minimalist UI would have to be navigated using a goofy out-of-place mouse cursor. It disappointed me when I came to the realization that Iâd have to accept that modifying the cursor wasnât worth the effort, and really it sort of still does â bear in mind this was around the time the new cursors were rolling out so I thought you guys were going to allow customization of the cursor. So I went out of my way to commission cursor icons only to come to the realization that implementing them wasnât feasible.
Plus itâs of inconsistent when I think about it. For example, we can change/customize the gamepad UI selection box but we canât change the cursor, the object that is likely the most prominent mean of navigation aside from mobile navigation. We can also change the cursor when interacting with a click detector which have been superseded by proximity prompts (although not always a direct replacement but certainly covers most cases) but again, not the hover cursor and not the text cursor.
From what I understand you guys (Roblox staff) want to improve how devs interact with typically inaccessible core gui elements (especially when you look at the text chat service and again the gamepad navigator), and how Roblox interacts with its developers as people. It really would be a step in the right direction if could modify it to our liking without having to go through making custom cursor controllers from scratch.
And even if people want to make their cursors âcuteâ what is the harm in that? I would argue that all in all itâs much less of a hassle for Roblox to give devs the ability to change mouse icons than it is for a dev to go out of their way to implement a custom cursor solution that may or may not break in the future with new UI elements.
And thatâs just speaking on behalf of myself who could put in the effort in making it. As lolmanurfunny mentioned, a UI designer who doesnât know how to program shouldnât have to go through the hassle of either learning how Roblox UI objects behave to create a custom cursor controller or hiring someone to make one for them, especially when itâs such a small but influential feature that Roblox should offer right out of the box.
I obviously donât know the technical reasons why you canât just render a different image but I would definitely like to reiterate on the fact that itâd be far more beneficial for both devs (namely programmers and UX/UI designers), and even Roblox wrt relations with their developers, to be able to simply call a function, or to change a property than creating a whole custom implementation which again may not be future proof.
Thereâs no doubt about that⌠but you could say the same for a lot of things in the UI system. Put it this way: Would you rather have a detailed API for cursors, or fixes to make the UI event handling system more predictable and convenient? Or what about support for spline shapes in the UI? Thereâs only so many UI system experts (or experts in any particular system in the engine) and a UI feature theyâre working on is another UI feature they arenât working on.
Another factor to consider is that the biggest slice of the Roblox player base is mobile players who wonât even see the cursor either way.
Personally I think that thereâs a lot of things missing in the UI system that would actually open up new gameplay possibilities that seem like better priorities. (To be clear Iâm not on the UI team myself, so Iâm not involved in that decision. But I was surprised by the level of interest in cursor stuff in this thread)
Sure but wouldnât it also make sense to implement basic, standard features that every other game engine has?
I donât mean this in a rude way and I really donât want to question anybodyâs work but frankly, I would argue that the amount of effort and resources that exposing a property that lets you render one image instead of another is incomparable to a complex geometrical feature like spline shapes.
There are also numerous feature requests that talk about wanting more control of the cursor, all of which talk about use cases, and there are a few on this thread as well. More control of the cursor is something that people have been asking for, for years upon years. Some dating back to 2014, nearly a decade. Allowing us to have control of the cursor is certainly not a waste of resources.
I mean, here are a few from a simple search.
GuiButton.CursorIcon
Mouse.Color3 and Mouse.Size Properties
Give more freedom with changing the mouse icon
Respect Mouse.Icon Over GuiButtons
UserInputService.MouseHoverIcon
Button/Image Button Mouse Hover
The fundamental reason that Roblox doesnât have a lot of âobviousâ APIs other engines do is that other engines are versioned.
Roblox tries to design APIs that we know we can support for 10 years (or even longer) and that will be forwards compatible with whatever platforms exist 5 years from now. Other engines donât have the same concern because they just release a new version of the engine every year or two with a bunch of little (or big) incompatibilities. The cost for them to add random QoL APIs is much lower because if they donât work out they can just remove them or stop supporting them in the next version of the engine.
How will cursors work in VR⌠what about AR? What about on 10-foot devices (TVs)? These are all things that we have to consider carefully because weâre going to have to support those cursor APIs in those scenarios and even ones we canât imagine right now.
The API added in this release was the low hanging fruit: Since the 3d viewport is mostly developer controlled not much can go wrong with an API to control the cursor there. But the same is not true for UI, there will be an expectation that we make UI mostly work out of the box somehow on future platforms so we have to be a lot more careful with APIs for that.
Granted itâs fair to say that the amount of cursor control is probably underdeveloped.
The same way they currently do.
Precisely the same way. And anyone on a 120 inch display would most likely be using a controller anyway.
I think the thing people are most concerned about is just visually, the image that shows with the mouse cursor on PC. But, I could also bring up that if you were to implement customization for the mouse icon you could also allow the little circle for virtual gamepad cursor and the small circle on VR could be modifiable as well, but again thatâs not something I can discuss as I donât have experience with, and donât think thatâs what people are requesting. Itâs largely the mouse cursor on computers.
Also again another point Iâd like to reiterate on is that old technology like click detectors have this capability. Same thing with the gamepad navigator (not 100% sure what itâs called but the blue highlight box thing to select things on gamepad) is customizable and can be basically anything. I think how gamepad and VR are currently handled is okay (again donât have most experience with VR but I do try to implement controller support). All in all it sort of seems like the cursor is actually the odd one out here.
You mentioned incompatibilities but really, just me thinking, if you were to implement an Enum that lets you put in different images for different cursor states, what incompatibilities would arise from that? I think there are 3 or 4? Text cursor, button hovering, and idling? Might be more I donât know but the point is, if there were more states to be added, couldnât you just add to/remove from the enum as things change over time?
And obviously I donât expect you to make the decision right now (or at all for that matter) since thereâs more to it than whatâs mentioned here but I think it will be beneficial to maybe bring more in-depth cursor control (back) to the table.
I have some comments and observations of my own to add to the cursor convo.
I do agree that the cursor for click interactions not being controllable is something that does kind of hinder certain peopleâs visions a little bit. I actually even remember when I would not have agreed with the lack of cursor control, and even remember being disappointed about exactly this same thing a long time ago, but over time my opinion has changed (because I have experienced probably all of the best and worst stylized cursors at this point )
I think I have seen a lot of what I would call âgoodâ examples of stylized cursors in practice off Roblox are in sci-fi games. Sci-fi games often like to have stylized sci-fi themed cursors. But, I will say, as a player of a lot of those kinds of games, I honestly am not going to lie, I kind of hate the stylized cursors, because they can be very distracting, and sometimes I just want my own cursor even if itâs simpler.
I generally most enjoy dark cursors with white borders more than a stylized cursor because I donât have to think about it, it contrasts nicely and isnât blatant in a dark environment, and it wonât get confused or mixed up with background elements or UI elements. I honestly donât want a cursor with orange, white, and blue like in Robocraft that matches thematically with the rest of the game. The âoh, that looks pretty coolâ factor very quickly falls off as a player, because you literally only observe it once, and then either you donât notice it or you notice it because it becomes a hindrance to you in what could be an otherwise good game. I think that is an incredibly valid point that many developers miss is that a stylized cursor will hinder most players (even if only a little) and the only real benefit is that it looks cool or that it is quirky and unique.
Warframe is a game that uses stylized cursors (I would argue well), but, I actually ended up changing mine around frequently while I was playing it, because I didnât like the stylized cursor, and I wanted my cursor to be pointier and more obvious to me. But the options are relatively limited for what you can change your cursor to. It is such a minor thing, and I mean, Warframe has barely any places where your cursor actually matters anyways. When youâre actually playing in the game, I donât even think there is a point where you can use your cursor, aside from when you hit escape to get into settings and such. Yet, it still ended up causing me to spend time, and I didnât have the best experience with it.
P.s. the fact that I can override default Roblox cursors myself by editing the textures is something that I have always appreciated and sometimes have done to get my own system cursors, even though generally I am pretty okay with the Roblox cursors and donât really bother.
Thank god this was fixed. It was annoying trying to drag a part just after selecting it and instead selecting a slew of new parts and occasionally dragging them instead.
Does this change also fix a similar issue in explorer when trying to drag an element around, like to a new folder for example?
Multiple players of mine are getting this error using the new UserInputService.MouseIcon feature.
Mobile users arenât forced to update every week, so there can be old versions without it out there on mobile (some people are still on 562). Usually it doesnât fall that far behind, but the good news is that thereâs a mobile force update happening on Monday so you shouldnât see the error after that.
I feel like not updating the app should make it unplayable until itâs on the latest App Store version so unexpected error like this donât happen.
Oh, I did not know that was how it worked, thank you very much.
I have another quick question. The way I am using this new feature is to set the mouse icon for the player when they have particular tools out by setting it when they equip it and resetting it when they put the tool away. It seems, however, that if you turn shift lock on and off, the mouse icon resets back to the default icon automatically. This did not happen with the old Mouse.Icon system. Is this intentional and if so, what might one do to âfixâ it? Thanks
Unfortunately this isnât viable because a lot of mobile users are on bandwidth constrained connections and forcing them to update every week would be too much of a burden.
Sounds like a bug, Iâll pass it along to the engineer who implemented this.