Allow spring window alert/flashing

Allow spring window alert/flashing

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Allow spring window alert/flashing

Post by Licho »

It would be nice to have widget access to window alert.

Example use:
- notify if user fails to ready (spring minimized)
- notify when game starts
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Allow spring window alert/flashing

Post by hoijui »

can that be done through SDL? what is it called there?
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Allow spring window alert/flashing

Post by abma »

http://pinvoke.net/default.aspx/user32.FlashWindowEx
win32: FlashWindowEx();

i couldn't find something similar in sdl...
User avatar
Vadi
Posts: 446
Joined: 03 Jan 2008, 14:51

Re: Allow spring window alert/flashing

Post by Vadi »

http://doc.qt.nokia.com/latest/qapplication.html#alert gives cross-platform tips on making this happen. In Linux, http://standards.freedesktop.org/wm-spe ... atest.html, "_NET_WM_STATE_DEMANDS_ATTENTION" is what you'd be looking for. Example implementation without Qt: http://www.qtforum.org/article/12334/ta ... a360c7f175
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Allow spring window alert/flashing

Post by knorke »

For now maybe changing changing program icon/title would work?
http://springrts.com/phpbb/viewtopic.php?f=14&t=26355
Could have it scroll messages in the taskbar like some music players do with song titles.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Allow spring window alert/flashing

Post by hoijui »

thanks Vadi.
i tried the code you linked to, replaced the two QT specific lines with SDL stuff, and it compiled and ran fine, but there was no flashing.

related SDL doc:
http://sdl.beuc.net/sdl.wiki/SDL_SysWMInfo

my code:
http://pastebin.com/0z7BF7p9

in case anyone wants to try to get it to run.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Allow spring window alert/flashing

Post by Jools »

If you make this feature, please make an option to turn it off on user-side. Everybody doesn't want to have something non-important blinking on the task bar.
Licho wrote: - notify if user fails to ready (spring minimized)
Ready = user is ready. If user hasn't marked ready then he probably isn't ready. No such thing as 'fail to ready'.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Allow spring window alert/flashing

Post by Licho »

Jools it will be entirely up to mod makers to decide when it flashes.

There is such thing as fail to ready - there is timer in ZK games that countdowns to start. It gives each person 3 minutes and during this they are being ringed in lobby. If they fail to ready they are kicked and game force started.

Instead I would like spring window to flash.

And again it should flash when the game actually starts (which can be minutes after spring started).
Post Reply

Return to “Feature Requests”