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.

Newcomers DBPro Corner / typing text

Author
Message
1beginner1
15
Years of Service
User Offline
Joined: 28th Jun 2009
Location: Belgium
Posted: 6th Feb 2011 12:21 Edited at: 6th Feb 2011 12:22
Hello

I want to be able to type a number in a small typing box on my screen. And do some mathematics with that number.

So I want to be able to change the float commands and change them more then once. And that I can see what I am typing in a small white box where I need to click in before I can type the number.
I hope you understand my problem and can help me with it.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 6th Feb 2011 15:16
Quote: "So I want to be able to change the float commands and change them more then once."

I assume you mean you want to change the float VALUES.

Anyway, I tried to put something together that helps. If you press F1, a tiny yellow box is created (image for it created earlier). The user can then type in two numbers. If the user then hits return, it will tell you what is held in the string, UserInput$ and what the value of it is (should always be the same).



I didn't see any object 1, so I simply remmed out that code. I think this is what you are looking for, but if not, please post.

1beginner1
15
Years of Service
User Offline
Joined: 28th Jun 2009
Location: Belgium
Posted: 6th Feb 2011 15:57 Edited at: 6th Feb 2011 18:08
Quote: "code. I think this is what you are looking for"

Yes and no, that I can fill in a number and see it at the screen is good but I am using 3d objects and that gives problems, I had created a background by creating a box and texturing it, the texture is completely screwed up it are now numbers and signs like &é"'(§è and letters. and object 1 should move and that doesn't happen anymore.
But I think I wil be able to solve it now and also found this on the forums http://forum.thegamecreators.com/?m=forum_view&t=180888&b=1, which helps too.

EDIT:The movement of the object is back ok only background still messy
EDIT:Found the problem forgot to check image number they were the same changed the number everything ok now.
The code I am having now

Tnx for your response it helped a lot.
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 7th Feb 2011 11:33 Edited at: 7th Feb 2011 11:33
You can do it much easier:



I admit, I haven't seen people use this command very often, so it's kind of hard to find I guess...

Sven B

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 7th Feb 2011 22:13
I use ENTRY$() all the time. It's the only good method of total input control.

This snip is OLD:


1beginner1
15
Years of Service
User Offline
Joined: 28th Jun 2009
Location: Belgium
Posted: 7th Feb 2011 22:56 Edited at: 15th Feb 2011 16:49
Ok tnx for the code samples, I will test them in the weekend when I got some time.
EDIT:tnx for the samples they are working great too
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Feb 2011 23:01
I prefer to use entry$ too as you can always reset the entry buffer and it means realtime updating of input as well as no problems with ASCII or scancodes...

Login to post a reply

Server time is: 2024-11-23 03:14:42
Your offset time is: 2024-11-23 03:14:42