disable the hover state

Apr 08, 2015

I'm using three states on my menu items for a quiz (Normal, Hover, Locked).  I'm not unlocking the next level in the game until they master an earlier level. I have the linking working properly; however, when a menu is in Locked mode, the Hover still changes color.  The link doesn't work, which is great, but the hover effect occurs.  I understand why it's doing that.  Is there a way to not do it?  I'm thinking the only way is to create my own custom trigger for the hover and not use the default hover state.  Is that my only choice?

Thanks!

13 Replies
Danielle Ryan

Hello - a very old thread but I'm having the same problem now.  I am using the built in disabled state and setting the initial state to disabled (for a module they can't access yet) but when you hover over it it still changes to hover state (even though you can't click on it)  This could confuse the learner so I'd like to get rid of it if possible.  
Many thanks,
Danielle

Ryan Cole

Glad I stumbled on this thread because there is some useful insight here but I'm having a slightly different issue. I have a set of avatars that have hover over states and selected states. Once the users selects an avatar the selected state will show temporarily but will jump back to the hover state if they continue to hover or move out and hover back over.

This isn't necessarily a big issue except that when the character switches back to the hover state if it's been selected it shifts the character over to the left quite a bit until they hover off. I'm not quite sure what the fix is here or why the character shifts.

Walt Hamilton

As you discovered, the hover state takes precedence over the selected state.

The reason they move is a bit more esoteric. States have a size and a location. If you edit an object's states, and click format, you can see both of those in the ribbon. When you select an avatar, they need a much wider space because their arms are out to the side.

It has to do with the way the avatar fits in its bounding space. The part of the body that is farthest to the left is always the same distance from the boundary, or origin. Putting their arms up makes them wider, which means that their body has to shift right, or their origin has to shift left. In an attempt to keep the body more or less in the same spot, SL moves the location of the origin to the left (the X in location becomes negative, sometimes by as much as 30 pixels.) Each state's bounding box has a small cross so you can see its origin.

When you select, the bounding box moves left. When you hover, the bounding box remains where it is, but the form inside it changes to hover. The body is still positioned in the same spot in relation to the origin point. That's so when you hover off, the selected state won't move. I'm pretty sure it is a design derision, not a bug. After all, they had to decide what to do with states of different sizes. In the case of avatars, if they keep the arms in the same place, the body has to move, and if they keep the body in the same place the arms have to move.

I think your only solution is the create states that are exactly the same size and location.