Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
Debug UI API

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

Data Structures

class  DbgUI

Functions

void DbgUI ()
void ~DbgUI ()
static proto native void Begin (string windowTitle, float x=0, float y=0)
static proto void BeginCleanupScope ()
static proto native bool Button (string txt, int minWidth=0)
static proto void Check (string label, out bool checked)
static proto native void ColoredText (int color, string label)
static proto void Combo (string label, out int selection, TStringArray elems)
static proto native void DoUnitTest ()
 Creates all possible DbgUI widgets. Just for the testing purposes.
static proto native void End ()
static proto native void EndCleanupScope ()
static bool FloatOverride (string id, inout float value, float min, float max, int precision=1000, bool sameLine=true)
 Draw an "override" checkbox that unrolls into a slider in provided range when checked.
static proto void InputFloat (string txt, out float value, int pxWidth=150)
static proto void InputInt (string txt, out int value, int pxWidth=150)
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 native void Panel (string label, int width, int height, int color=0xaa555555)
static proto native void PlotLive (string label, int sizeX, int sizeY, float val, int timeStep=100, int historySize=30, int color=0xFFFFFFFF)
static proto native void PopID ()
static proto native void PushID_Int (int int_id)
static proto native void PushID_Str (string str_id)
static proto native void SameLine ()
static proto native void SameSpot ()
static proto void SliderFloat (string label, out float value, float min, float max, int pxWidth=150)
static proto native void Spacer (int height)
static proto native void Text (string label)

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
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto void Print(void var)
Prints content of variable to console/log.
static proto void Check(string label, out bool checked)
static proto native bool Button(string txt, int minWidth=0)
static proto native void Spacer(int height)
static proto native void Begin(string windowTitle, float x=0, float y=0)
static proto void List(string label, out int selection, TStringArray elems)
static proto native void Text(string label)
static proto void InputText(string txt, out string value, int pxWidth=150)
static proto void SliderFloat(string label, out float value, float min, float max, int pxWidth=150)
static proto native void End()
proto native void OnUpdate()
Definition tools.c:349

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());
}
Base Param Class with no parameters.
Definition param.c:12
override void OnEvent(EventType eventTypeId, Param params)
Handles VON-related events.
static proto void BeginCleanupScope()
static proto native void EndCleanupScope()
TypeID EventType
Definition enwidgets.c:55

Function Documentation

◆ DbgUI()

void DbgUI ( )
inlineprivate

Definition at line 61 of file dbgui.c.

Referenced by FloatOverride().

◆ ~DbgUI()

void ~DbgUI ( )
inlineprivate

Definition at line 62 of file dbgui.c.

◆ Begin()

◆ BeginCleanupScope()

◆ Button()

proto native bool Button ( string txt,
int minWidth = 0 )
staticprivate

◆ Check()

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

◆ ColoredText()

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

◆ Combo()

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

◆ DoUnitTest()

proto native void DoUnitTest ( )
staticprivate

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

◆ End()

◆ EndCleanupScope()

◆ FloatOverride()

bool FloatOverride ( string id,
inout float value,
float min,
float max,
int precision = 1000,
bool sameLine = true )
inlinestaticprivate

Draw an "override" checkbox that unrolls into a slider in provided range when checked.

Definition at line 94 of file dbgui.c.

References DbgUI(), and float::ToString().

◆ InputFloat()

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

Referenced by PluginBase::OnGUITimer().

◆ InputInt()

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

Referenced by OnGUI().

◆ InputText()

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

◆ List()

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

◆ Panel()

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

◆ PlotLive()

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

◆ PopID()

proto native void PopID ( )
staticprivate

◆ PushID_Int()

proto native void PushID_Int ( int int_id)
staticprivate

◆ PushID_Str()

proto native void PushID_Str ( string str_id)
staticprivate

◆ SameLine()

proto native void SameLine ( )
staticprivate

◆ SameSpot()

proto native void SameSpot ( )
staticprivate

◆ SliderFloat()

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

◆ Spacer()

proto native void Spacer ( int height)
staticprivate

Referenced by OnGUI(), and ShowCoefsDbg().

◆ Text()