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 / help with input on sprite

Author
Message
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 17th Jul 2009 03:47
Hi using dbpro

using a sprite as a background. i want to be able to use the input command so people can enter information and the information will show up as their typing. the problem is the text wont show up on top of the sprite i tried drawing to the bitmap getting the imag and redrawing the sprite as it was typed but it doesnt seem to anything untill the enter key is pressed even with a loop thats supposed to constantly update and i have to use a sprite for my current project. thanks

A child's dream never dies.
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 17th Jul 2009 03:58
wasnt sure that last post explained enough

basically im working with a menu that pops up over the program/game
made from a sprite id like to be able to ss the key preeses as its pressed on top of the sprite. or in a black boxed in area on the background like if u where biuilding a calculator or something. id make a prefab bitmap with holes for input but im trying to keep the exe file very small so making it using
make bitmap
set current bitmap
box
set bitmap back to zero
sprite

A child's dream never dies.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 17th Jul 2009 06:41
You can keep it a sprite but use HIDE SPRITE and PASTE SPRITE so any text will go over the sprite... as long as the text is after PASTE SPRITE.

LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 17th Jul 2009 18:05
Simply use the 'draw sprites first' command.


So many games to code......so little time.
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 17th Jul 2009 19:46
And don't use input as your method of communicating with the user.

Develop your own text buffer system and use a bitmap font. You can then draw the sprite corresponding to the user's input over the top of your menu sprite.

"You get what everyone gets, you get a lifetime!" - Death, The Sandman Library

First you Dream, then you ... - Neil Gaiman, 2001
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 18th Jul 2009 10:04
not suer ei know how to build a text buffere system but thanks dream u gave me an idea. just monitor the kepresses scancode ect untill enter or a new input field/sprite is clicked

A child's dream never dies.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 18th Jul 2009 22:30
You need to ignore the input command and try using the entry$ command or check for keypresses and get their ascii code. The entry$ command stores keyboard inputs.


Still using basic fonts, but it is better than input as it does not freeze the screen.

http://s6.bitefight.org/c.php?uid=103081
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 20th Jul 2009 11:41
yeah i ended up going with entry works like a charm thanks all

A child's dream never dies.
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 20th Jul 2009 11:43
I have trouble waking up int he morning so im just building an alarm clock program with a nice little interface so i can input alarm times and select pre recorded voice messages that yell at me ect or play a different alarm every morning or knock ect so i don't get to used tot he alarm

A child's dream never dies.

Login to post a reply

Server time is: 2024-11-25 04:28:21
Your offset time is: 2024-11-25 04:28:21