Author |
Message |
Tubs
![](http://members.lycos.co.uk/lovedtwice2000/phpBB2/images/avatars/187282473e3fd65a3a33b.gif)
|
Posted: Fri May 23, 2003 11:38 am Post subject: invisible colourback |
|
|
i want to make the background of text that the user enters have invisible colourback (like font.draw)
is this possible? how? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Asok
![](http://www.battle.net/war3/images/neutral/units/animations/pandarenbrewmaster.gif)
|
Posted: Fri May 23, 2003 12:06 pm Post subject: (No subject) |
|
|
simple use Font.Draw to display what the user is typing
something like
code: | var x, y : int := 100
var fontId : int := Font.New ("Arial:12")
var ch : string (1)
loop
getch (ch)
Font.Draw (ch, x, y, fontId, black)
x += 10
end loop |
|
|
|
|
|
![](images/spacer.gif) |
Homer_simpson
![](http://compsci.ca/v3/uploads/user_avatars/18138546704b4d2a3b2e50e.gif)
|
Posted: Fri May 23, 2003 1:56 pm Post subject: (No subject) |
|
|
you might wanna replace the
with code: | x += Font.Width (ch, fontId) |
|
|
|
|
|
![](images/spacer.gif) |
Tubs
![](http://members.lycos.co.uk/lovedtwice2000/phpBB2/images/avatars/187282473e3fd65a3a33b.gif)
|
Posted: Mon May 26, 2003 11:41 am Post subject: (No subject) |
|
|
ya that displays it but i also want what they enter to be a variable |
|
|
|
|
![](images/spacer.gif) |
Solo
![](http://nid.homeip.net/~sale/Solo.gif)
|
Posted: Mon May 26, 2003 3:59 pm Post subject: Try this :) |
|
|
code: | var x, y : int := 100
var fontId : int := Font.New ("Arial:12")
var ch : string (1)
var word : string := ""
loop
getch (ch)
exit when ord (ch) = 10
Font.Draw (ch, x, y, fontId, black)
x += Font.Width (ch, fontId)
word += ch
end loop |
The Variable it gets stored in is word, this also outputs it to the screen.
Enter ends the loop and stops adding to the variable. |
|
|
|
|
![](images/spacer.gif) |
Tubs
![](http://members.lycos.co.uk/lovedtwice2000/phpBB2/images/avatars/187282473e3fd65a3a33b.gif)
|
Posted: Tue May 27, 2003 11:19 am Post subject: (No subject) |
|
|
what does += mean? |
|
|
|
|
![](images/spacer.gif) |
Blade
|
Posted: Tue May 27, 2003 12:34 pm Post subject: (No subject) |
|
|
you are adding something together or adding something to a string. in an integer it will add the value and with a string it will add on a character. so
in x = 3
x+=2 will = 5
means the same thing as
x:=x+5
just a shortcut.. |
|
|
|
|
![](images/spacer.gif) |
Tubs
![](http://members.lycos.co.uk/lovedtwice2000/phpBB2/images/avatars/187282473e3fd65a3a33b.gif)
|
Posted: Thu May 29, 2003 11:21 am Post subject: (No subject) |
|
|
how can i make the backspace key work? all it does is put a box on the screen |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Homer_simpson
![](http://compsci.ca/v3/uploads/user_avatars/18138546704b4d2a3b2e50e.gif)
|
Posted: Thu May 29, 2003 1:43 pm Post subject: (No subject) |
|
|
take a look at my custom created text box (located at turing submittions -> custom created GUI) i have used a method to do that...
i'm at school right now but i'll tell u how to do it exactly when i get home |
|
|
|
|
![](images/spacer.gif) |
|