Last updated
Last updated
GUIPanel class represents a custom user editor single window/panel that will render throw Dear's ImGui.
So GUIPanel written on top of Dear's ImGui, its not its wrapper, its will no contains all implementations of ImGui, only limited and basic.
When you create a new panel its automatically will be added to global panel array and you can manage it from that.
Methods Begin and End should be executed only in OnRenderGui
event.
, ,
class ForceEditor.GUIPanel
GUIPanel
name
Name of this panel. Feel free to change it if you wanna.
active
This panel is active?
flags
Flags to this panel (they should match real flags as ImGuiWindowFlags_XXX.)
Create
Create new panel and added it to array of renderable panels.
Create(string name)
Create new panel and added it to array of renderable panels.
Remove
Remove panel from array of renderable panels.
RemoveAll
Remove all panels from array of renderable panels.
CanBegin
Returns true if we can begin given panel (e.g its exist and has been created or not begin already), otherwise returns false.
CanBegin(string name)
Returns true if we can begin given panel by given name (e.g its exist and has been created or not begin already),otherwise returns false.
Begin
Starts the context for this panel witch allows to add widgets to.
Begin/End can be called multiple times during the frame with the same panel name to append content. Also End()
method should be called even if Begin()
returns false.
The panel name is used as a unique identifier to preserve panel information across frames.
Begin(string name)
Starts the context for this panel witch allows to add widgets to.
Begin/End can be called multiple times during the frame with the same panel name to append content. Also End()
method should be called even if Begin()
returns false.
The panel name is used as a unique identifier to preserve panel information across frames.
End
End the context for appending widgets to panel.
This method should be called even if Begin()
returns false.
GetPanel
Retrive the panel by name.
GetPanel(int index)
Get the panel by index.
GetPanel
Create new GUIPanel object. Accept the .
Throws if executing this method outside OnRenderGui()
event.
Get the panel by name. Throws if panel with input name is not exist.