Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / How do you display text for a limited amount of time?

Author
Message
exorbio
14
Years of Service
User Offline
Joined: 18th Jan 2010
Location:
Posted: 18th Jan 2010 22:19
I'm trying to have text displayed underneath my sprites. I would like to have it displayed briefly to indicate whether the player has made an error and also to show enemy choices.

As far as I can tell, there's no way to do this with the DarkGDK functions. To display something, it seems all or none. Is there a way to make a message only display for about a second and then go away?
Aldur
17
Years of Service
User Offline
Joined: 8th Oct 2007
Location: Melbourne, Australia
Posted: 18th Jan 2010 22:44 Edited at: 18th Jan 2010 22:49
Sorry for the double post.

Aldur
17
Years of Service
User Offline
Joined: 8th Oct 2007
Location: Melbourne, Australia
Posted: 18th Jan 2010 22:48
I have this as a function somewhere. Will post back when I wake up if no one has replied.

This is an edit, I wrote some code but realised it wouldn't do what you were after.

Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 18th Jan 2010 23:13
Quote: "Is there a way to make a message only display for about a second and then go away?"


You need to time how long text has been displayed for and stop showing it if it has been shown for long enough.

Try my timer class:

Timer.h:


Timer.cpp:


Example:


Your_Health = (My_Mood == HAPPY) ? 100 : NULL;
exorbio
14
Years of Service
User Offline
Joined: 18th Jan 2010
Location:
Posted: 19th Jan 2010 08:17
Thank you Bran Flakes

Login to post a reply

Server time is: 2024-11-20 05:43:18
Your offset time is: 2024-11-20 05:43:18