Page 1 of 1

How do I write text to the screen with C#?[SOVLED!!!]

Posted: Fri Jun 03, 2005 1:27 am
by Galaxy613
This is getting really really frustrating!! I can't find out how to write to the screen in C#. In C++ I could just add static text, but GUI does not work in C#! And when I try to do "IGUIFont fnt = new IGUIFont(null);" so I can do "fnt.Draw("Hello World!",new Position2D(32,32),new Color(0,255,200,200));", it gives me an error "Pointers may only be used in unsafe code." and I don't see one damn pointer there!!! :evil:

Help? :(

|EDIT|

YEY!!! I found out how to print stuff to the screen! :D I'll sohw everyone!

Code: Select all

//start up the main() function...create a new IRRLichtDevice and put it
// into 'device'...then:
IGUIFont fnt = device.GUIEnvironment.BuiltInFont;
//dum de dum, finnish up. now in the main loop, right smack
// after "device.SceneManager.DrawAll();"...
fnt.Draw("Hello World!",new Position2D(32,32),new Color(0,255,255,255));
//contiune till you end!
I'm so happy! :)