Part C: Notes on custom GUI controls

From NeoAxisWiki

Jump to: navigation, search

1. The class name must start with E as in "public class ETicker : ETextBox"

2. The controls base class is from an EControl. I've used a textbox as it had a few more similar properties.

3. You need to use [Serialize] on values that are to be saved.

4. The main functions you will override are:

OnAttach() : For creation / setup code. Note there is also a OnDetach() to release stuff. OnTick(float delta) : I don't use the delta in this case, but use the call to check the time. OnRenderUI(GuiRenderer renderer) : Custom drawing.

Personal tools