DayZ 1.24
Loading...
Searching...
No Matches
Debug UI API

Immediate mode debug UI APIPer frame usage example: More...

Collaboration diagram for Debug UI API:

Classes

class  DbgUI
 

Functions

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

Detailed Description

Immediate mode debug UI API

Per frame usage example:

bool m_ShowDbgUI = false;
int m_DbgListSelection = 0;
float m_DbgSliderValue = 0.0;
autoptr array<string> m_DbgOptions = {"jedna", "dva", "tri"};
void OnUpdate(float timeslice)
{
DbgUI.Begin("Test");
DbgUI.Check("Show DbgUI", m_ShowDbgUI);
{
DbgUI.Text("DbgUI Test");
string name = "";
DbgUI.InputText("name", name);
if (DbgUI.Button("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));
}
}
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
Definition DbgUI.c:60
proto void Print(void var)
Prints content of variable to console/log.
static proto void List(string label, out int selection, TStringArray elems)
static proto native void End()
static proto native void Begin(string windowTitle, float x=0, float y=0)
static proto native bool Button(string txt, int minWidth=0)
static proto native void Text(string label)
static proto void InputText(string txt, out string value, int pxWidth=150)
static proto native void Spacer(int height)
static proto void Check(string label, out bool checked)
static proto void SliderFloat(string label, out float value, float min, float max, int pxWidth=150)
proto native void OnUpdate()
Definition tools.c:333

For non-per frame usage example:

{
DbgUI.Begin("events", 300, 0);
DbgUI.Text("Events count = " + m_DbgEventCount.ToString());
}
override void OnEvent(EventType eventTypeId, Param params)
Handles VON-related events.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
static proto void BeginCleanupScope()
static proto native void EndCleanupScope()

Function Documentation

◆ Begin()

◆ BeginCleanupScope()

◆ Button()

◆ Check()

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

◆ ColoredText()

static proto native void DbgUI::ColoredText ( int color,
string label )
staticprivate

◆ Combo()

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

◆ DbgUI()

void DbgUI::DbgUI ( )
inlineprivate

Definition at line 61 of file DbgUI.c.

61{}

◆ DoUnitTest()

static proto native void DbgUI::DoUnitTest ( )
staticprivate

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

◆ End()

◆ EndCleanupScope()

◆ InputFloat()

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

Referenced by PluginBase::OnGUITimer().

◆ InputInt()

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

Referenced by OnGUI().

◆ InputText()

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

◆ List()

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

◆ Panel()

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

◆ PlotLive()

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

◆ PopID()

◆ PushID_Int()

static proto native void DbgUI::PushID_Int ( int int_id)
staticprivate

◆ PushID_Str()

static proto native void DbgUI::PushID_Str ( string str_id)
staticprivate

◆ SameLine()

static proto native void DbgUI::SameLine ( )
staticprivate

◆ SameSpot()

static proto native void DbgUI::SameSpot ( )
staticprivate

◆ SliderFloat()

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

◆ Spacer()

static proto native void DbgUI::Spacer ( int height)
staticprivate

Referenced by OnGUI(), and ShowCoefsDbg().

◆ Text()

◆ ~DbgUI()

void DbgUI::~DbgUI ( )
inlineprivate

Definition at line 62 of file DbgUI.c.

62{}