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.

Author
Message
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 19th Nov 2003 16:25
hi everyone!
i was wondering how can i delete text by using the backspace key, a snippet or code would do the trick.
oh! i wanted to know how can i make a stop watch. like calculating the time by hours:minutes:seconds and starting from 00:00:00. to show how long the player was playing the game. i would b very thankful

‘Those who ignore the lessons of the past are doomed to repeat them’ (Napoleon)
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Nov 2003 19:44
Assuming that you have text held in a string, you would do it like this



The number 14 is the keyboard scancode of the backspace key.


I've got a timer function in the codebase - it counts both up and down. http://developer.thegamecreators.com/?m=codebase_view&i=c6125a943ea8979ee926dddfe2122168
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 20th Nov 2003 22:14
well, can u tell me if this is rite (about the backspace):

becoz it didnt work thankx

‘Those who ignore the lessons of the past are doomed to repeat them’ (Napoleon)
Easily Confused
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 21st Nov 2003 01:14
Is this closer to what you need?



Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 21st Nov 2003 02:22
Easily Confused
ur code was successful! but i have a problem! i'm loading a bitmap image as a background, and whenever i press a character the bitmap disappears! what can i do about that?
thankx u

‘Those who ignore the lessons of the past are doomed to repeat them’ (Napoleon)
Easily Confused
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 21st Nov 2003 03:04
One way is to load the bmp as an image and use Paste Image.
Another way is to load the bmp into a different Bitmap other than zero and use Copy Bitmap.

Both could replace the Cls in the above snippet.

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 21st Nov 2003 18:53
thank u it worked nicely.

‘Those who ignore the lessons of the past are doomed to repeat them’ (Napoleon)

Login to post a reply

Server time is: 2024-09-21 09:50:47
Your offset time is: 2024-09-21 09:50:47