ANIMATED: A way to tell if player is hovering on an touchable item
2 posters
Page 1 of 1
ANIMATED: A way to tell if player is hovering on an touchable item
I would like to add a way to detect whether the players are hovering on a specific touch area in animated objects (To show them tooltips).
The problem is that each touch area is unnamed. (Please inform me if I am wrong, I can't find the documentation for panel.xml)
Some idea would be:
1. Determine it by the order each touch area is added. (So the first touch section would be smth like TouchHovering[0]. The second touch section would be TouchHovering[1] and so on)
2. Add a way to define an numeric index of the touch section
Otherwise I can't think of anything better approach, or I could be overcomplicating things again...
The problem is that each touch area is unnamed. (Please inform me if I am wrong, I can't find the documentation for panel.xml)
Some idea would be:
1. Determine it by the order each touch area is added. (So the first touch section would be smth like TouchHovering[0]. The second touch section would be TouchHovering[1] and so on)
2. Add a way to define an numeric index of the touch section
Otherwise I can't think of anything better approach, or I could be overcomplicating things again...
Re: ANIMATED: A way to tell if player is hovering on an touchable item
Do you want an image or text?
A short (2-3 word) text tooltip would be easiest, and I think would probably want storing in the XML itself, although I'd have to think about that.
Images are more complex, especially if they follow the mouse.
Mockup of what you're thinking if that's easiest?
I'll make no promises yet, but something should be do-able. Simple power / brake text tooltips would be nice on the extended mode too.
A short (2-3 word) text tooltip would be easiest, and I think would probably want storing in the XML itself, although I'd have to think about that.
Images are more complex, especially if they follow the mouse.
Mockup of what you're thinking if that's easiest?
I'll make no promises yet, but something should be do-able. Simple power / brake text tooltips would be nice on the extended mode too.
Re: ANIMATED: A way to tell if player is hovering on an touchable item
Initially my idea is an .animated that shows the tooltips object, but an xml text/image would probably be better
I don't think there are needs for the tips to follow the mouse, probably just show them in a static position (It's those things where it's nice to have, but not required)
I wanted to display an image, and the reason behind it is so that I can design it to my own design taste.
NOTE: A way to customize the tooltips font/background color is actually all I wanted, so if it's customizable then there's no need for images. I am just afraid it might overcomplicate a feature as simple as tooltips, but I am fine with it.
I also want a way to toggle the tooltips (Incase the users found it annoying), maybe add a checkbox to enable these on the options menu?
Some behavior that might be worth mentioning is:
Thanks!
I don't think there are needs for the tips to follow the mouse, probably just show them in a static position (It's those things where it's nice to have, but not required)
I wanted to display an image, and the reason behind it is so that I can design it to my own design taste.
NOTE: A way to customize the tooltips font/background color is actually all I wanted, so if it's customizable then there's no need for images. I am just afraid it might overcomplicate a feature as simple as tooltips, but I am fine with it.
I also want a way to toggle the tooltips (Incase the users found it annoying), maybe add a checkbox to enable these on the options menu?
Some behavior that might be worth mentioning is:
- Make it so the tooltips are always on top
- The tooltips should always face towards the camera. (Unless you are planning on 2D tooltips overlay?)
- Unrelated: Custom cursor icon when hovering, but let's not get things too far for features that rarely anyone will use
Thanks!
Last edited by LXQt on Wed Feb 24, 2021 7:17 am; edited 2 times in total (Reason for editing : More thoughts...)
Re: ANIMATED: A way to tell if player is hovering on an touchable item
I was thinking of a purely 2D tooltip overlay. 3D is asking for trouble.....
That's fundamentally the easiest to code.
Color is easy, font may not be quite so easy.
That's fundamentally the easiest to code.
Color is easy, font may not be quite so easy.
LXQt likes this post

» Objects in an animated container disappear in Routeviewer and OpenBVE after the insertion point of the .animated file
» OpenBVE avid driver/player needed.
» .animated sound
» 3D animated wiper
» More .animated functions?
» OpenBVE avid driver/player needed.
» .animated sound
» 3D animated wiper
» More .animated functions?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|