Animated mouse cursor in menues

Moderator: GZDoom Developers

Post Reply
User avatar
Ozymandias81
Posts: 2063
Joined: Thu Jul 04, 2013 8:01 am
Graphics Processor: nVidia with Vulkan support
Location: Mount Olympus, Mars
Contact:

Animated mouse cursor in menues

Post by Ozymandias81 »

As the title say, while I am not aware if it is possible to code it directly, would be cool to have a new MAPINFO/GAMEINFO property like "cursorpic2" sort of to indicate an animated cursor, that is defined under ANIMDEFS and which works like animated textures, taking precedence even if a CURSORPIC is defined. Name present under "cursorpic2" should match custom cursor name defined on animdefs, using a new entry called CURSOR (instead of texture/flat), maybe code shoulld look like this:

Code: Select all

cursor CURSOR1
	pic CURSOR1 tic [int value]
	pic CURSOR2 tic [int value]
	pic CURSOR3 tic [int value]
	pic CURSOR4 tic [int value]
I am aware that "the cursor display is actually handled by the system and therefore subject to certain specific limitations", as wiki says, but would be cool to be possible, or expose this somehow under zscript if that has not been done yet. :3:
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Animated mouse cursor in menues

Post by Graf Zahl »

While Windows can do it, it requires a custom file format for this, so it'd be platforms specific.
Cacodemon345
Posts: 419
Joined: Fri Dec 22, 2017 1:53 am
Graphics Processor: ATI/AMD (Modern GZDoom)
Contact:

Re: Animated mouse cursor in menues

Post by Cacodemon345 »

It also seems only doable on Windows, X11 and Wayland; the rest doesn't support programmatically-created animated cursors AFAIK.
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Animated mouse cursor in menues

Post by Gez »

As long as the system supports the application arbitrarily changing the cursor at some point, it could be done by having a thinker that updates the cursor every frame. But that doesn't really seem worth the effort.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Animated mouse cursor in menues

Post by Graf Zahl »

Thinkers do not run when the menu is up because normally the game is paused. This is also not really performant.
User avatar
Rachael
Posts: 13571
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Animated mouse cursor in menues

Post by Rachael »

You can throw the cursor handling to a dedicated thread - that might be the best way to handle it on all platforms. Plus that allows you to use a platform-neutral format.

But then the question becomes is the feature important enough that someone is willing to invest the time to do that?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Animated mouse cursor in menues

Post by Graf Zahl »

I would never allow adding such shit to GZDoom. Let's end it here.
Hack implementations like that have a strong tendency to break rather sooner than later.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”