Text box

Posted By: fangedscorpion

Text box - 07/24/10 00:30

I was wondering if there is a way to code a text box into my game. I am looking for something similar to L4D's chat boxes or the console.

Any help would be great thanks!
Posted By: MMike

Re: Text box - 07/24/10 00:34

this is what i use on my lib.
Code:
function edit_textbox4(STRING* t){
STRING* char_t="";
inkey_active=0;
wait(1);
str_cpy(t,"clearing...");
wait(-1);
str_cpy(t,"");

loop:
inchar(char_t);

if(key_lastpressed!= 28 && key_lastpressed!=14 && key_lastpressed!=1 ){ if(str_len(t)<=100){ str_cat(t,char_t);} goto loop; }
if(key_lastpressed== 14 ){ str_trunc(t,1);goto loop;}
}



you can constrain the size of characters.
BUT THIS IS NOTA A GUI WINDOWS STYLE TEXTBOX!
For that i think there are other topics on the forum already
© 2024 lite-C Forums