Mousecursors in 4k Intros
category: code [glöplog]
Hey rez, not all of them! :)
In case there would be a separate 1k compo - not hiding that would be okay imho.
Otherwise for 4k and 4k/1k combined having this rule can't be such a bad idea.
Otherwise for 4k and 4k/1k combined having this rule can't be such a bad idea.
There's no separate 1k compo at Solskogen.
did any intro actually ever USE the mousecursor as a design element?
i mean its possible to move it via software, isnt it? =)
i mean its possible to move it via software, isnt it? =)
wysiwtf: Are you crazy? That would take several BYTES of code!
Good to know because I am still coding on XP.
For some reason, ShowCursor(0) seems to work fine in my intros, even on Vista/Win7. If somebody would like to confirm, try this, this, this, this or this.
One possible reason why it works could be that I don't call ShowCursor(0) until after Windows has decided that the intro is not responding. I do things in this order:
1. Create window
2. Create D3D9 device
3. Generate music (takes a long time)
4. Reset device to fix problems with Aero invalidating it (not done in the first two intros linked above).
5. Initialize D3D stuff (vertex buffers, render targets, etc.)
6. ShowCursor(0)
7. Start music (using waveOut)
8. Main loop, consisting of:
- waveOutGetPosition
- (rendering)
- Present
- GetAsyncKeyState
One possible reason why it works could be that I don't call ShowCursor(0) until after Windows has decided that the intro is not responding. I do things in this order:
1. Create window
2. Create D3D9 device
3. Generate music (takes a long time)
4. Reset device to fix problems with Aero invalidating it (not done in the first two intros linked above).
5. Initialize D3D stuff (vertex buffers, render targets, etc.)
6. ShowCursor(0)
7. Start music (using waveOut)
8. Main loop, consisting of:
- waveOutGetPosition
- (rendering)
- Present
- GetAsyncKeyState
Maybe fixed framerate? I also noticed that the problem is sometimes gone if I enforce VSync in my NV driver.
Might also be that dx is not affected by that issue.
Might also be that dx is not affected by that issue.
i love to play around with the mouse cursor if an intro gets boring :)
Optimus: well, that doesn't really help the viewer, now does it?
Hmm, i always used SetCursor(0) after i noticed that ShowCursor(0) didnt do its job on vista/7.
Never had problems with that and the GetAsyncKeystate combination :)
Never had problems with that and the GetAsyncKeystate combination :)
"It’s common UI courtesy to show the Wait cursor when performing a long operation that requires the user to wait. "
i'd like to repeat my self:
oh, come on!
oh, come on!
I'm still waiting for a demo that fits in an animated mouse cursor.
Zplex: is it also common to _leave it_ after loading is done?
gloom: I think he was referring to the actual demo. :))
saga musix: Well we had games/demos (I think) in fav icons, so it shouldn't take too long.
That, or some equivalent display of "Look, I'm busy, no need for the taskmanager, I did not crash yet". ;)
Quote:
"It’s common UI courtesy to show the Wait cursor when performing a long operation that requires the user to wait. "
That, or some equivalent display of "Look, I'm busy, no need for the taskmanager, I did not crash yet". ;)
Yeah, border flashing when loading applications in windows would be so much more cooler...
tomaes, I know. ;)
I haven't had this issue either, at least not on my own machine, so I guess blueberrys explanation with the ordering of the API calls is plausible.
This might be naive, but has anyone who has the issue tried something as simple as just moving ShowCursor(0) inside the main loop? It would definitely be smaller than calling ShowCursor and PeekMessage, but does it actually work?
This might be naive, but has anyone who has the issue tried something as simple as just moving ShowCursor(0) inside the main loop? It would definitely be smaller than calling ShowCursor and PeekMessage, but does it actually work?
No.
Actually it could be that only Intros using OpenGL are affected - but I wouldn't be to sure about that.
Calling ShowCursor(0) in the loop does not work - neither did SetCursor(0) do the job iirc.
Calling ShowCursor(0) in the loop does not work - neither did SetCursor(0) do the job iirc.
hmm, ye olde cursor issue. I continuously call ShowCursor() after processing an event ("// Note: hack to keep the cursor disabled/enabled").
At least that worked on Win2k/XP/Vista so far. (will check on my Win7 boxes)
At least that worked on Win2k/XP/Vista so far. (will check on my Win7 boxes)