DayZ 1.28
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ FloatOverride()

static bool DbgUI::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.

См. определение в файле DbgUI.c строка 94

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 }
proto string ToString(bool simple=true)
void DbgUI()
Определения DbgUI.c:61

Перекрестные ссылки DbgUI() и float::ToString().