DayZ 1.28
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
DbgUI.c
См. документацию.
1
3
58
59class DbgUI
60{
61 private void DbgUI() {}
62 private void ~DbgUI() {}
63
64 static proto native void DoUnitTest();
65 static proto native void Text(string label);
66 static proto native void ColoredText(int color, string label);
67 static proto void Check(string label, out bool checked);
68 static proto void Combo(string label, out int selection, TStringArray elems);
69 static proto void List(string label, out int selection, TStringArray elems);
70 static proto void SliderFloat(string label, out float value, float min, float max, int pxWidth = 150);
71 static proto native void Spacer(int height);
72 static proto native void Panel(string label, int width, int height, int color = 0xaa555555);
73 static proto native bool Button(string txt, int minWidth = 0);
74 static proto void InputText(string txt, out string value, int pxWidth = 150);
75 static proto void InputInt(string txt, out int value, int pxWidth = 150);
76 static proto void InputFloat(string txt, out float value, int pxWidth = 150);
77
78 static proto native void PlotLive(string label, int sizeX, int sizeY, float val, int timeStep = 100, int historySize = 30, int color = 0xFFFFFFFF);
79
80 static proto native void SameLine();
81 static proto native void SameSpot();
82
83 static proto native void PushID_Int(int int_id);
84 static proto native void PushID_Str(string str_id);
85 static proto native void PopID();
86
87 static proto void BeginCleanupScope();
88 static proto native void EndCleanupScope();
89
90 static proto native void Begin(string windowTitle, float x = 0, float y = 0);
91 static proto native void End();
92
94 static bool FloatOverride(string id, inout float value, float min, float max, int precision = 1000, bool sameLine = true)
95 {
96 if (sameLine)
97 DbgUI.SameLine();
98
99 bool enable;
100
101 DbgUI.PushID_Str(id+"_override");
102 DbgUI.Check("override", enable);
103 DbgUI.PopID();
104
105 if (enable)
106 {
107 DbgUI.SameLine();
108 float tmp = value * (float)precision;
109
110 DbgUI.PushID_Str(id+"_slider");
111 DbgUI.SliderFloat("", tmp, min * (float)precision, max * (float)precision);
112 DbgUI.PopID();
113
114 tmp = tmp / (float)precision;
115 DbgUI.SameSpot();
116 DbgUI.PushID_Str(id+"_slider_text");
117 DbgUI.Text(tmp.ToString());
118 DbgUI.PopID();
119
120 value = tmp;
121 return true;
122 }
123
124 return false;
125 }
126};
127
128
Icon x
Icon y
proto string ToString(bool simple=true)
Определения EnConvert.c:97
static proto native void DoUnitTest()
Creates all possible DbgUI widgets. Just for the testing purposes.
static proto native void Panel(string label, int width, int height, int color=0xaa555555)
static proto void Combo(string label, out int selection, TStringArray elems)
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 void PlotLive(string label, int sizeX, int sizeY, float val, int timeStep=100, int historySize=30, int color=0xFFFFFFFF)
static proto void InputFloat(string txt, out float value, int pxWidth=150)
static proto native void PopID()
static proto native bool Button(string txt, int minWidth=0)
void DbgUI()
Определения DbgUI.c:61
static proto native void SameSpot()
static proto native void Text(string label)
static proto void InputText(string txt, out string value, int pxWidth=150)
static proto native void SameLine()
static proto void InputInt(string txt, out int value, int pxWidth=150)
static proto void BeginCleanupScope()
static proto native void PushID_Int(int int_id)
static proto native void Spacer(int height)
static proto native void PushID_Str(string str_id)
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.
Определения DbgUI.c:94
static proto void Check(string label, out bool checked)
static proto native void ColoredText(int color, string label)
static proto void SliderFloat(string label, out float value, float min, float max, int pxWidth=150)
void ~DbgUI()
Определения DbgUI.c:62
static proto native void EndCleanupScope()
array< string > TStringArray
Определения EnScript.c:709