Immediate mode debug UI API.
Per frame usage example:
bool m_ShowDbgUI = false;
float m_DbgSliderValue = 0.0;
{
DbgUI.Check(
"Show DbgUI", m_ShowDbgUI);
if (m_ShowDbgUI)
{
DbgUI.Text(
"DbgUI Test");
string name = "";
DbgUI.InputText(
"name", name);
if (
DbgUI.Button(
"Print name"))
{
}
DbgUI.Spacer(10);
DbgUI.SliderFloat("slider", m_DbgSliderValue, 0, 100);
DbgUI.Text("Slider value = " + ftoa(m_DbgSliderValue));
}
DbgUI.End();
}
ref array< string > m_DbgOptions
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
For non-per frame usage example:
int m_DbgEventCount = 0;
{
m_DbgEventCount++;
DbgUI.BeginCleanupScope();
DbgUI.Begin("events", 300, 0);
DbgUI.Text("Events count = " + m_DbgEventCount.ToString());
DbgUI.End();
DbgUI.EndCleanupScope();
}
Definition at line 65 of file DbgUI.c.