View topic - Allow spring window alert/flashing



All times are UTC + 1 hour


Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 29 Sep 2011, 19:20 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
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


Top
 Offline Profile  
 
PostPosted: 29 Sep 2011, 20:22 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
can that be done through SDL? what is it called there?


Top
 Offline Profile  
 
PostPosted: 29 Sep 2011, 22:07 
Spring Developer

Joined: 31 May 2009, 23:08
http://pinvoke.net/default.aspx/user32.FlashWindowEx
win32: FlashWindowEx();

i couldn't find something similar in sdl...


Top
 Offline Profile  
 
PostPosted: 30 Sep 2011, 08:12 
User avatar

Joined: 03 Jan 2008, 14:51
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


Top
 Offline Profile  
 
PostPosted: 01 Oct 2011, 08:05 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
For now maybe changing changing program icon/title would work?
viewtopic.php?f=14&t=26355
Could have it scroll messages in the taskbar like some music players do with song titles.


Top
 Online Profile  
 
PostPosted: 01 Oct 2011, 11:56 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
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.


Top
 Offline Profile  
 
PostPosted: 05 Oct 2011, 14:06 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
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'.


Top
 Offline Profile  
 
PostPosted: 08 Oct 2011, 11:29 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
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).


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.