Computer Science Canada Transparent get? |
Author: | unknowngiver [ Wed May 24, 2006 10:37 am ] |
Post subject: | Transparent get? |
Hey I have a background on my game..and i used the Font.Draw function to draw text on the screen rather then PUT so my background will stay there and it wont put a white/other color where the text is but now i want to get users input...but when the user types something in...it makes the background [of the text] white is there anyway of doing it without it doing that?? also i tried to do it with GUI text boxes but it doesnt work either...it gives me error on IMPORT GUI :S but if i run it as a seprate program it works :S and not in my program |
Author: | Remm [ Wed May 24, 2006 10:50 am ] |
Post subject: | |
You could use noecho in the Window.Open to get rid of the text entirely, or set the colourback ( without cls ) to somthing thats closer to the acual background. OR after you type in the info, re-apply everything so the text goes away. |
Author: | neufelni [ Wed May 24, 2006 11:02 am ] | ||
Post subject: | |||
You can acomplish this by putting noecho in your View.Set statement and then using Font.Draw for your input. Here is the code for it.
|
Author: | Delos [ Wed May 24, 2006 1:49 pm ] | ||
Post subject: | Re: Transparent get? | ||
unknowngiver wrote: Hey
I have a background on my game..and i used the Font.Draw function to draw text on the screen rather then PUT so my background will stay there and it wont put a white/other color where the text is but now i want to get users input...but when the user types something in...it makes the background [of the text] white is there anyway of doing it without it doing that?? also i tried to do it with GUI text boxes but it doesnt work either...it gives me error on IMPORT GUI :S but if i run it as a seprate program it works :S and not in my program I don't recall if using 'getch' returns the value directly to the screen or not (there was one version of Turing where it didn't, and one where it did). Either way, incorporating a well place ".." might solve your problem, as in:
Otherwise, I would suggest incorporating the Font. idea posted above. Looks a little prettier. You should be aware, however, that getch() does have its limitations, and is prone to crashing if put in the hands of Users such as myself (who know secrets that crash Turing quite easily). As for the GUI import...is your import line the very first (or 2nd) line of code? Post the specific error message, if you please. |
Author: | unknowngiver [ Wed May 24, 2006 9:08 pm ] | ||||
Post subject: | |||||
i tried the
is there any other way of doing it..without any vulanability.. okay i got the import GUI thing working...but one problem the background for it is White..or w.e set it..how can i make it transparent or an image...so it shows that image...rather then covering the whole screen with white??????? this is how the register page looks So far [fine i am posting it :p ] i wnat the GUI form to be there...but when i put it i get a WHITE screen with that form..here is the code
Thanks |
Author: | TheOneTrueGod [ Wed May 24, 2006 9:46 pm ] | ||
Post subject: | |||
You could do a complex procedure, that takes getchar characters, concatenates them into a string, and draws that string onto the screen... come to think of it, it wouldn't be that complex...
Kinda messy because of comments, but you should get the idea. Just do checks and such, and possibly some output stuff, like drawind the background screen, and writing their name to the screen as they type it in, etc. Good luck |
Author: | unknowngiver [ Wed May 24, 2006 10:09 pm ] | ||
Post subject: | |||
TheOneTrueGod wrote: You could do a complex procedure, that takes getchar characters, concatenates them into a string, and draws that string onto the screen... come to think of it, it wouldn't be that complex...
Kinda messy because of comments, but you should get the idea. Just do checks and such, and possibly some output stuff, like drawind the background screen, and writing their name to the screen as they type it in, etc. Good luck thats wt nick posted..read my last post |
Author: | TheOneTrueGod [ Thu May 25, 2006 7:10 am ] |
Post subject: | |
lol, oops, must have missed that post Sorry Nick. Anyways, thats probably the best way to implement it. I do believe that the getchar doesn't crash on inputs like CTRL-Z, but if you REALLY wanted complete crashlessness, you'd have to go with Input.KeyDown. You would have to scan through ALL values possible with I.KD, and if one is pressed, then you would have to add it to the string. Unfortunately, if someone is a very fast typer, this could screw them over a bit, because two keys pressed at once would be entered in alphabetical order . Go with whichever method you like. |
Author: | unknowngiver [ Thu May 25, 2006 9:23 am ] |
Post subject: | |
well i m still waiting for someone to help me with the GUI part..thats probably what i will use |
Author: | TheOneTrueGod [ Thu May 25, 2006 2:30 pm ] |
Post subject: | |
Er, I believe the best GUI is a custom GUI. So, either create your own, which is the best option, or consult the Turing Walkthrough. (if you havn't extensively) Generally, the experts on this site would be experts in creating their own code, as opposed to using the limited (IMO) GUI stuff available. The problem with using the predefined GUI stuff, is that you are limited to what the developer put in. If its not in the turing help file, you probably can't do it. |
Author: | unknowngiver [ Thu May 25, 2006 3:11 pm ] |
Post subject: | |
well is there a tutorial that can guide me through on how to make my own GUI text box then?? i will willing to spend days constantly reading tutorials if i have 2 to do that :p but i cant find any resource to look at |
Author: | TheOneTrueGod [ Thu May 25, 2006 4:32 pm ] |
Post subject: | |
Classes or just use the method both myself and Nick posted, and it will be simulating your own GUI input. |