BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

ANIMATED: A way to tell if player is hovering on an touchable item

Go down

ANIMATED: A way to tell if player is hovering on an touchable item Empty ANIMATED: A way to tell if player is hovering on an touchable item

Post by LXQt Tue Feb 23, 2021 12:06 pm

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...

LXQt

Posts : 106
Join date : 2019-02-18
Age : 16
Location : Hong Kong

https://kennyhui.pp.ua

Back to top Go down

ANIMATED: A way to tell if player is hovering on an touchable item Empty Re: ANIMATED: A way to tell if player is hovering on an touchable item

Post by leezer3 Tue Feb 23, 2021 7:33 pm

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.

leezer3

Posts : 1772
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

ANIMATED: A way to tell if player is hovering on an touchable item Empty Re: ANIMATED: A way to tell if player is hovering on an touchable item

Post by LXQt Wed Feb 24, 2021 2:37 am

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:

  • 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...)

LXQt

Posts : 106
Join date : 2019-02-18
Age : 16
Location : Hong Kong

https://kennyhui.pp.ua

Back to top Go down

ANIMATED: A way to tell if player is hovering on an touchable item Empty Re: ANIMATED: A way to tell if player is hovering on an touchable item

Post by leezer3 Wed Feb 24, 2021 12:05 pm

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.

leezer3

Posts : 1772
Join date : 2011-08-23

http://www.bvecornwall.co.uk

LXQt likes this post

Back to top Go down

ANIMATED: A way to tell if player is hovering on an touchable item Empty Re: ANIMATED: A way to tell if player is hovering on an touchable item

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum