Computer Science Canada

control of font in input / get process

Author:  Sholom [ Thu Oct 02, 2003 1:35 pm ]
Post subject:  control of font in input / get process

How can we modify the font used for input from the user when using 'get' to force input.

Please advise.

Author:  octopi [ Thu Oct 02, 2003 4:07 pm ]
Post subject: 

code:
var ch : string (1)
var full : string (255):=""
var font: int := Font.New ("Verdana:12")
var temp : string (255):=""

loop
  getch(ch)
exit when (ch = chr(10))
  if(ch = chr(8)) then
    temp:=full(1..length(full)-1)
    full:=temp
  else
    full := full + ch
  end if
  cls
  Font.Draw (full, 50, 180, font, green)
end loop

Font.Free (font)


Is that what you mean?

Author:  Tony [ Thu Oct 02, 2003 5:15 pm ]
Post subject: 

questionConter_changeInputFont++ Rolling Eyes

You might be able to change input font somewhere in settings, but it will be local to the machine it is run on.

If you dont mind a bit of coding - use the model octopi posted. You can do a lot of preaty cool text effects with Font. Go to Turing->Tutorials->Text Effects and check some out.

Author:  Blade [ Thu Oct 02, 2003 5:45 pm ]
Post subject: 

octopi wrote:
Is that what you mean?


lol that looks like what i posted in a diff topic, but with different names Razz


: