Enfusion Script API
Loading...
Searching...
No Matches
DbgUI Interface Reference

Immediate mode debug UI API. More...

Static Public Member Functions

static proto void DoUnitTest ()
 Creates all possible DbgUI widgets. Just for the testing purposes.
 
static proto void Text (string label)
 
static proto void SameLine ()
 
static proto void SameSpot ()
 
static proto void PlotLive (string label, int sizeX, int sizeY, float val, int timeStep=100, int historySize=30, int color=0xFFFFFFFF)
 
static proto void PlotLiveClamped (string label, int sizeX, int sizeY, float val, float yMin, float yMax, int timeStep=100, int historySize=30, int color=0xFFFFFFFF)
 
static proto void Check (string label, out bool checked)
 
static proto void Combo (string label, out int selection, TStringArray elems)
 
static proto void List (string label, out int selection, TStringArray elems)
 
static proto void SliderFloat (string label, out float value, float min, float max, int pxWidth=150)
 
static proto void Spacer (int height)
 
static proto void Panel (string label, int width, int height, int color=0xaa555555)
 
static proto bool Button (string txt, int minWidth=0)
 
static proto void InputText (string txt, out string value, int pxWidth=150)
 
static proto void InputInt (string txt, out int value, int pxWidth=150)
 
static proto void InputFloat (string txt, out float value, int pxWidth=150)
 
static proto void BeginCleanupScope ()
 
static proto void EndCleanupScope ()
 
static proto void Begin (string windowTitle, float x=0, float y=0)
 
static proto void End ()
 
static proto void PushID (void id)
 
static proto void PopID ()
 

Detailed Description

Immediate mode debug UI API.

Per frame usage example:

bool m_ShowDbgUI = false;
int m_DbgListSelection = 0;
float m_DbgSliderValue = 0.0;
array<string> m_DbgOptions = {"jedna", "dva", "tri"};
void OnUpdate(float timeslice)
{
DbgUI.Begin("Test");
DbgUI.Check("Show DbgUI", m_ShowDbgUI);
if (m_ShowDbgUI)
{
DbgUI.Text("DbgUI Test");
string name = "";
DbgUI.InputText("name", name);
if (DbgUI.Button("Print name"))
{
Print(name);
}
DbgUI.List("test list", m_DbgListSelection, m_DbgOptions);
DbgUI.Text("Choice = " + m_DbgListSelection.ToString());
DbgUI.SliderFloat("slider", m_DbgSliderValue, 0, 100);
DbgUI.Text("Slider value = " + ftoa(m_DbgSliderValue));
}
}
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
Immediate mode debug UI API.
Definition DbgUI.c:66
static proto void InputText(string txt, out string value, int pxWidth=150)
static proto void List(string label, out int selection, TStringArray elems)
static proto bool Button(string txt, int minWidth=0)
static proto void End()
static proto void Begin(string windowTitle, float x=0, float y=0)
static proto void Check(string label, out bool checked)
static proto void Spacer(int height)
static proto void SliderFloat(string label, out float value, float min, float max, int pxWidth=150)
static proto void Text(string label)
Definition Types.c:154
proto external string ToString(int len=-1)
Integer to string with fixed length, padded with zeroes.

For non-per frame usage example:

int m_DbgEventCount = 0;
void OnEvent(EventType eventTypeId, Param params)
{
m_DbgEventCount++;
DbgUI.Begin("events", 300, 0);
DbgUI.Text("Events count = " + m_DbgEventCount.ToString());
}
static proto void EndCleanupScope()
static proto void BeginCleanupScope()
Definition OnEvent.c:13
Script representation for C++ RTTI types.
Definition Types.c:150

Member Function Documentation

◆ Begin()

static proto void DbgUI.Begin ( string windowTitle,
float x = 0,
float y = 0 )
static

◆ BeginCleanupScope()

static proto void DbgUI.BeginCleanupScope ( )
static

◆ Button()

static proto bool DbgUI.Button ( string txt,
int minWidth = 0 )
static

◆ Check()

static proto void DbgUI.Check ( string label,
out bool checked )
static

◆ Combo()

static proto void DbgUI.Combo ( string label,
out int selection,
TStringArray elems )
static

◆ DoUnitTest()

static proto void DbgUI.DoUnitTest ( )
static

Creates all possible DbgUI widgets. Just for the testing purposes.

◆ End()

static proto void DbgUI.End ( )
static

◆ EndCleanupScope()

static proto void DbgUI.EndCleanupScope ( )
static

◆ InputFloat()

static proto void DbgUI.InputFloat ( string txt,
out float value,
int pxWidth = 150 )
static

◆ InputInt()

static proto void DbgUI.InputInt ( string txt,
out int value,
int pxWidth = 150 )
static

◆ InputText()

static proto void DbgUI.InputText ( string txt,
out string value,
int pxWidth = 150 )
static

◆ List()

static proto void DbgUI.List ( string label,
out int selection,
TStringArray elems )
static

◆ Panel()

static proto void DbgUI.Panel ( string label,
int width,
int height,
int color = 0xaa555555 )
static

◆ PlotLive()

static proto void DbgUI.PlotLive ( string label,
int sizeX,
int sizeY,
float val,
int timeStep = 100,
int historySize = 30,
int color = 0xFFFFFFFF )
static

◆ PlotLiveClamped()

static proto void DbgUI.PlotLiveClamped ( string label,
int sizeX,
int sizeY,
float val,
float yMin,
float yMax,
int timeStep = 100,
int historySize = 30,
int color = 0xFFFFFFFF )
static

◆ PopID()

static proto void DbgUI.PopID ( )
static

◆ PushID()

static proto void DbgUI.PushID ( void id)
static

◆ SameLine()

static proto void DbgUI.SameLine ( )
static

◆ SameSpot()

static proto void DbgUI.SameSpot ( )
static

◆ SliderFloat()

static proto void DbgUI.SliderFloat ( string label,
out float value,
float min,
float max,
int pxWidth = 150 )
static

◆ Spacer()

static proto void DbgUI.Spacer ( int height)
static

◆ Text()

static proto void DbgUI.Text ( string label)
static

The documentation for this interface was generated from the following file: