Skip to content

Tutorial 01 . Label

Jean-David Moisan edited this page Oct 24, 2020 · 3 revisions

Unmanaged Component Handling

The GUI is simple to use. It's very raw.

To create a Label:

Label hello = new Label("Hello World!");

You can give it a position with:

hello.Position = new Point(20, 30);

In your update loop, call the following functions:

hello.UpdateSetup();
hello.UpdateInput();
hello.Update();

For a Label, those functions won't do anything, but it's good to know that they are there. It's also bad practice not to call them.

And in the draw loop:

GuiHelper.DrawGui(hello);
Clone this wiki locally