DayZ 1.24
Loading...
Searching...
No Matches
ScriptConsoleWeatherTab Class Reference
Inheritance diagram for ScriptConsoleWeatherTab:
[legend]
Collaboration diagram for ScriptConsoleWeatherTab:
[legend]

Protected Member Functions

void ~ScriptConsoleWeatherTab ()
 
void ScriptConsoleWeatherTab (Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
 
void ResetValues ()
 
void InitValues (bool forceCurrent=false)
 
void PasteValues (string clipboard)
 
string CopyValues ()
 
override bool OnChange (Widget w, int x, int y, bool finished)
 
void UpdateSliderValues ()
 
void UpdateEditboxValues ()
 
override bool OnClick (Widget w, int x, int y, int button)
 
DebugWeatherRPCData GetRPCDataNormal ()
 
DebugWeatherRPCData GetRPCDataImmediate ()
 
void SendRPC (DebugWeatherRPCData data)
 
void InvokeSendRPC ()
 
override void Update (float timeslice)
 

Protected Attributes

ref Timer m_RPCTimer = new Timer()
 
const int INTERPOLATION_MAX = 920
 
const int DURATION_MAX = 920
 
SliderWidget m_FogValueSetSlider
 
SliderWidget m_FogValueGetSlider
 
TextWidget m_FogValueSetText
 
SliderWidget m_FogInterpolationTimeSlider
 
SliderWidget m_FogDurationTimeSlider
 
TextWidget m_FogInterpolationMaxText
 
TextWidget m_FogDurationMaxText
 
EditBoxWidget m_FogValueEditbox
 
EditBoxWidget m_FogInterpolationEditbox
 
EditBoxWidget m_FogDurationEditbox
 
SliderWidget m_OvercastValueSetSlider
 
SliderWidget m_OvercastValueGetSlider
 
TextWidget m_OvercastValueSetText
 
SliderWidget m_OvercastInterpolationTimeSlider
 
SliderWidget m_OvercastDurationTimeSlider
 
TextWidget m_OvercastInterpolationMaxText
 
TextWidget m_OvercastDurationMaxText
 
EditBoxWidget m_OvercastValueEditbox
 
EditBoxWidget m_OvercastInterpolationEditbox
 
EditBoxWidget m_OvercastDurationEditbox
 
SliderWidget m_RainValueSetSlider
 
SliderWidget m_RainValueGetSlider
 
TextWidget m_RainValueSetText
 
SliderWidget m_RainInterpolationTimeSlider
 
SliderWidget m_RainDurationTimeSlider
 
TextWidget m_RainInterpolationMaxText
 
TextWidget m_RainDurationMaxText
 
EditBoxWidget m_RainValueEditbox
 
EditBoxWidget m_RainInterpolationEditbox
 
EditBoxWidget m_RainDurationEditbox
 
ButtonWidget m_ResetButton
 
ButtonWidget m_UpdateButton
 
ButtonWidget m_ApplyButton
 
ButtonWidget m_CopyButton
 
ButtonWidget m_PasteButton
 

Static Protected Attributes

static float m_FogValue = -1
 
static float m_FogInterpolationTimeValue
 
static float m_FogDurationTimeValue = -1
 
static float m_OvercastValue = -1
 
static float m_OvercastInterpolationTimeValue
 
static float m_OvercastDurationTimeValue = -1
 
static float m_RainValue = -1
 
static float m_RainInterpolationTimeValue
 
static float m_RainDurationTimeValue = -1
 

Additional Inherited Members

- Private Member Functions inherited from ScriptConsoleTabBase
void ScriptConsoleTabBase (Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
 
void Init (int id)
 
int GetID ()
 
Widget GetRoot ()
 
bool IsSelected ()
 
void Select (bool select, ScriptConsoleTabBase selectedHandler)
 
void OnSelected ()
 
void Show (bool show, ScriptConsoleTabBase selectedHandler)
 
Widget GetButton ()
 
void Update (float timeslice)
 
bool OnChange (Widget w, int x, int y, bool finished)
 
bool OnClick (Widget w, int x, int y, int button)
 
bool OnItemSelected (Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
 
bool OnKeyDown (Widget w, int x, int y, int key)
 
bool OnDoubleClick (Widget w, int x, int y, int button)
 
void OnRPCEx (int rpc_type, ParamsReadContext ctx)
 
bool OnMouseButtonDown (Widget w, int x, int y, int button)
 
bool OnKeyPress (Widget w, int x, int y, int key)
 
void AddItemToClipboard (TextListboxWidget text_listbox_widget)
 
- Private Attributes inherited from ScriptConsoleTabBase
int m_Id
 
bool m_IsSelected
 
Widget m_ParentRoot
 
Widget m_Root
 
Widget m_Button
 
ScriptConsole m_ScriptConsole
 
ScriptConsoleTabBase m_Parent
 
PluginConfigDebugProfile m_ConfigDebugProfile
 
PluginConfigDebugProfileFixed m_ConfigDebugProfileFixed
 

Detailed Description

Definition at line 1 of file ScriptConsoleWeatherTab.c.

Constructor & Destructor Documentation

◆ ~ScriptConsoleWeatherTab()

void ScriptConsoleWeatherTab::~ScriptConsoleWeatherTab ( )
inlineprotected

Definition at line 82 of file ScriptConsoleWeatherTab.c.

83 {
84 // FOG
85 m_FogValue = m_FogValueSetSlider.GetCurrent() / 100;
88
89 // OVERCAST
90 m_OvercastValue = m_OvercastValueSetSlider.GetCurrent() / 100;
93
94 // Rain
95 m_RainValue = m_RainValueSetSlider.GetCurrent() / 100;
98 }

References DURATION_MAX, INTERPOLATION_MAX, m_FogDurationTimeSlider, m_FogDurationTimeValue, m_FogInterpolationTimeSlider, m_FogInterpolationTimeValue, m_FogValue, m_FogValueSetSlider, m_OvercastDurationTimeSlider, m_OvercastDurationTimeValue, m_OvercastInterpolationTimeSlider, m_OvercastInterpolationTimeValue, m_OvercastValue, m_OvercastValueSetSlider, m_RainDurationTimeSlider, m_RainDurationTimeValue, m_RainInterpolationTimeSlider, m_RainInterpolationTimeValue, m_RainValue, and m_RainValueSetSlider.

◆ ScriptConsoleWeatherTab()

void ScriptConsoleWeatherTab::ScriptConsoleWeatherTab ( Widget root,
ScriptConsole console,
Widget button,
ScriptConsoleTabBase parent = null )
inlineprotected

Definition at line 100 of file ScriptConsoleWeatherTab.c.

101 {
102 // FOG
103 m_FogValueSetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderFogValue"));
104 m_FogValueGetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderFogActualValue"));
105 m_FogValueSetText = TextWidget.Cast(root.FindAnyWidget("TextFogValueActual"));
106
107 m_FogInterpolationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderFogTarget"));
108 m_FogDurationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderFogDuration"));
109
110 m_FogInterpolationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxFogTarget"));
111 m_FogDurationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxFogDuration"));
112
113 m_FogValueEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxFogValue"));
114 m_FogInterpolationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxFogTarget"));
115 m_FogDurationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxFogDuration"));
116
117 // OVERCAST
118 m_OvercastValueSetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderOvercastValue"));
119 m_OvercastValueGetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderOvercastActualValue"));
120 m_OvercastValueSetText = TextWidget.Cast(root.FindAnyWidget("TextOvercastValueActual"));
121
122 m_OvercastInterpolationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderOvercastTarget"));
123 m_OvercastDurationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderOvercastDuration"));
124
125 m_OvercastInterpolationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxOvercastTarget"));
126 m_OvercastDurationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxOvercastDuration"));
127
128 m_OvercastValueEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxOvercastValue"));
129 m_OvercastInterpolationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxOvercastTarget"));
130 m_OvercastDurationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxOvercastDuration"));
131
132 // Rain
133 m_RainValueSetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderRainValue"));
134 m_RainValueGetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderRainActualValue"));
135 m_RainValueSetText = TextWidget.Cast(root.FindAnyWidget("TextRainValueActual"));
136
137 m_RainInterpolationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderRainTarget"));
138 m_RainDurationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderRainDuration"));
139
140 m_RainInterpolationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxRainTarget"));
141 m_RainDurationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxRainDuration"));
142
143 m_RainValueEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxRainValue"));
144 m_RainInterpolationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxRainTarget"));
145 m_RainDurationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxRainDuration"));
146
147 //Other
148 m_ResetButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonReset"));
149 m_UpdateButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonUpdate"));
150 m_ApplyButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonApply"));
151
152 m_CopyButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonCopy"));
153 m_PasteButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonPaste"));
154
155
156 InitValues();
157 }
override void InitValues()

References InitValues(), m_ApplyButton, m_CopyButton, m_FogDurationEditbox, m_FogDurationMaxText, m_FogDurationTimeSlider, m_FogInterpolationEditbox, m_FogInterpolationMaxText, m_FogInterpolationTimeSlider, m_FogValueEditbox, m_FogValueGetSlider, m_FogValueSetSlider, m_FogValueSetText, m_OvercastDurationEditbox, m_OvercastDurationMaxText, m_OvercastDurationTimeSlider, m_OvercastInterpolationEditbox, m_OvercastInterpolationMaxText, m_OvercastInterpolationTimeSlider, m_OvercastValueEditbox, m_OvercastValueGetSlider, m_OvercastValueSetSlider, m_OvercastValueSetText, m_PasteButton, m_RainDurationEditbox, m_RainDurationMaxText, m_RainDurationTimeSlider, m_RainInterpolationEditbox, m_RainInterpolationMaxText, m_RainInterpolationTimeSlider, m_RainValueEditbox, m_RainValueGetSlider, m_RainValueSetSlider, m_RainValueSetText, m_ResetButton, and m_UpdateButton.

Member Function Documentation

◆ CopyValues()

string ScriptConsoleWeatherTab::CopyValues ( )
inlineprotected

Definition at line 269 of file ScriptConsoleWeatherTab.c.

270 {
271 string output;
272
273 // FOG
274 output += m_FogValueEditbox.GetText();
275 output += " ";
277 output += " ";
278 output += m_FogDurationEditbox.GetText();
279 output += " ";
280 // OVERCAST
281 output += m_OvercastValueEditbox.GetText();
282 output += " ";
284 output += " ";
286 output += " ";
287 // RAIN
288 output += m_RainValueEditbox.GetText();
289 output += " ";
291 output += " ";
292 output += m_RainDurationEditbox.GetText();
293
294 return output;
295 }

References m_FogDurationEditbox, m_FogInterpolationEditbox, m_FogValueEditbox, m_OvercastDurationEditbox, m_OvercastInterpolationEditbox, m_OvercastValueEditbox, m_RainDurationEditbox, m_RainInterpolationEditbox, and m_RainValueEditbox.

Referenced by OnClick().

◆ GetRPCDataImmediate()

DebugWeatherRPCData ScriptConsoleWeatherTab::GetRPCDataImmediate ( )
inlineprotected

Definition at line 505 of file ScriptConsoleWeatherTab.c.

506 {
508 // FOG
509 data.m_FogValue = m_FogValueSetSlider.GetCurrent() / 100;
510 data.m_FogInterpolation = 0;
511 data.m_FogDuration = 960;
512
513 // Rain
514 data.m_RainValue = m_RainValueSetSlider.GetCurrent() / 100;
515 data.m_RainInterpolation = 0;
516 data.m_RainDuration = 960;
517
518 // OVERCAST
519 data.m_OvercastValue = m_OvercastValueSetSlider.GetCurrent() / 100;
520 data.m_OvercastInterpolation = 0;
521 data.m_OvercastDuration = 960;
522
523 return data;
524 }

References m_FogValueSetSlider, m_OvercastValueSetSlider, and m_RainValueSetSlider.

Referenced by InvokeSendRPC().

◆ GetRPCDataNormal()

DebugWeatherRPCData ScriptConsoleWeatherTab::GetRPCDataNormal ( )
inlineprotected

Definition at line 483 of file ScriptConsoleWeatherTab.c.

484 {
486 // FOG
487 data.m_FogValue = m_FogValueSetSlider.GetCurrent() / 100;
488 data.m_FogInterpolation = m_FogInterpolationTimeValue;
489 data.m_FogDuration = m_FogDurationTimeSlider.GetCurrent() / 100 * 960;
490
491 // Rain
492 data.m_RainValue = m_RainValueSetSlider.GetCurrent() / 100;
493 data.m_RainInterpolation = m_RainInterpolationTimeValue;
494 data.m_RainDuration = m_RainDurationTimeSlider.GetCurrent() / 100 * 960;
495
496 // OVERCAST
497 data.m_OvercastValue = m_OvercastValueSetSlider.GetCurrent() / 100;
498 data.m_OvercastInterpolation = m_OvercastInterpolationTimeValue;
499 data.m_OvercastDuration = m_OvercastDurationTimeSlider.GetCurrent() / 100 * 960;
500
501 return data;
502 }

References m_FogDurationTimeSlider, m_FogInterpolationTimeValue, m_FogValueSetSlider, m_OvercastDurationTimeSlider, m_OvercastInterpolationTimeValue, m_OvercastValueSetSlider, m_RainDurationTimeSlider, m_RainInterpolationTimeValue, and m_RainValueSetSlider.

Referenced by OnClick().

◆ InitValues()

void ScriptConsoleWeatherTab::InitValues ( bool forceCurrent = false)
inlineprotected

Definition at line 196 of file ScriptConsoleWeatherTab.c.

197 {
198
199 // FOG
200 float fogVal = m_FogValue;
201 if (forceCurrent || m_FogValue == -1)
202 fogVal = GetGame().GetWeather().GetFog().GetActual();
203 m_FogValueEditbox.SetText(fogVal.ToString());
204
206
207 if (m_FogDurationTimeValue == -1)
210
212 m_FogDurationMaxText.SetText(DURATION_MAX.ToString());
213
214
215 // OVERCAST
217 if (forceCurrent || m_OvercastValue == -1)
218 overcastVal = GetGame().GetWeather().GetOvercast().GetActual();
219 m_OvercastValueEditbox.SetText(overcastVal.ToString());
220
222
223
227
229 m_OvercastDurationMaxText.SetText(DURATION_MAX.ToString());
230
231 // RAIN
232 float rainVal = m_RainValue;
233 if (forceCurrent || m_RainValue == -1)
234 rainVal = GetGame().GetWeather().GetRain().GetActual();
235
236 m_RainValueEditbox.SetText(rainVal.ToString());
238
239 if (m_RainDurationTimeValue == -1)
242
244 m_RainDurationMaxText.SetText(DURATION_MAX.ToString());
245
247 }
proto native CGame GetGame()

References DURATION_MAX, GetGame(), INTERPOLATION_MAX, m_FogDurationEditbox, m_FogDurationMaxText, m_FogDurationTimeValue, m_FogInterpolationEditbox, m_FogInterpolationMaxText, m_FogInterpolationTimeValue, m_FogValue, m_FogValueEditbox, m_OvercastDurationEditbox, m_OvercastDurationMaxText, m_OvercastDurationTimeValue, m_OvercastInterpolationEditbox, m_OvercastInterpolationMaxText, m_OvercastInterpolationTimeValue, m_OvercastValue, m_OvercastValueEditbox, m_RainDurationEditbox, m_RainDurationMaxText, m_RainDurationTimeValue, m_RainInterpolationEditbox, m_RainInterpolationMaxText, m_RainInterpolationTimeValue, m_RainValue, m_RainValueEditbox, and UpdateSliderValues().

◆ InvokeSendRPC()

void ScriptConsoleWeatherTab::InvokeSendRPC ( )
inlineprotected

Definition at line 535 of file ScriptConsoleWeatherTab.c.

536 {
538 }
void SendRPC()
DebugWeatherRPCData GetRPCDataImmediate()

References GetRPCDataImmediate(), and SendRPC().

◆ OnChange()

override bool ScriptConsoleWeatherTab::OnChange ( Widget w,
int x,
int y,
bool finished )
inlineprotected

Definition at line 297 of file ScriptConsoleWeatherTab.c.

298 {
300
301 if (rmbDrag)
302 {
303 // first row
304 if (w == m_FogValueSetSlider)
305 {
306 m_OvercastValueSetSlider.SetCurrent(m_FogValueSetSlider.GetCurrent());
307 m_RainValueSetSlider.SetCurrent(m_FogValueSetSlider.GetCurrent());
308 }
309 else if (w == m_OvercastValueSetSlider)
310 {
311 m_FogValueSetSlider.SetCurrent(m_OvercastValueSetSlider.GetCurrent());
312 m_RainValueSetSlider.SetCurrent(m_OvercastValueSetSlider.GetCurrent());
313 }
314
315 else if (w == m_RainValueSetSlider)
316 {
317 m_FogValueSetSlider.SetCurrent(m_RainValueSetSlider.GetCurrent());
318 m_OvercastValueSetSlider.SetCurrent(m_RainValueSetSlider.GetCurrent());
319 }
320 // second row
322 {
325 }
327 {
330 }
331
333 {
336 }
337 // third row
338 else if (w == m_FogDurationTimeSlider)
339 {
340 m_RainDurationTimeSlider.SetCurrent(m_FogDurationTimeSlider.GetCurrent());
342 }
343 else if (w == m_RainDurationTimeSlider)
344 {
345 m_FogDurationTimeSlider.SetCurrent(m_RainDurationTimeSlider.GetCurrent());
347 }
348
350 {
353 }
354
355 }
356
357
359 if (slider)
360 {
361 if (rmbDrag && !m_RPCTimer.IsRunning())
362 {
364 m_RPCTimer.Run(0.25, this, "InvokeSendRPC");
365 }
367 return true;
368 }
370 if (box)
371 {
373 return true;
374 }
375 return false;
376 }
const int MB_EVENT_CLICK
MouseState
Definition EnSystem.c:311
proto native int GetMouseState(MouseState index)

References GetMouseState(), m_FogDurationTimeSlider, m_FogInterpolationTimeSlider, m_FogValueSetSlider, m_OvercastDurationTimeSlider, m_OvercastInterpolationTimeSlider, m_OvercastValueSetSlider, m_RainDurationTimeSlider, m_RainInterpolationTimeSlider, m_RainValueSetSlider, m_RPCTimer, MB_EVENT_CLICK, UpdateEditboxValues(), and UpdateSliderValues().

◆ OnClick()

override bool ScriptConsoleWeatherTab::OnClick ( Widget w,
int x,
int y,
int button )
inlineprotected

Definition at line 444 of file ScriptConsoleWeatherTab.c.

445 {
446 if (w == m_ApplyButton)
447 {
449 return true;
450 }
451 else if (w == m_UpdateButton)
452 {
453 InitValues(true);
454 return true;
455 }
456 else if (w == m_ResetButton)
457 {
458 ResetValues();
459 InitValues(true);
460 return true;
461 }
462 else if (w == m_CopyButton)
463 {
464 string output = CopyValues();
465 GetGame().CopyToClipboard(output);
466 return true;
467 }
468
469 else if (w == m_PasteButton)
470 {
471 string input;
472 GetGame().CopyFromClipboard(input);
475 return true;
476 }
477
478 return false;
479 }
DebugWeatherRPCData GetRPCDataNormal()
void PasteValues(string clipboard)

References CopyValues(), GetGame(), GetRPCDataNormal(), InitValues(), m_ApplyButton, m_CopyButton, m_PasteButton, m_ResetButton, m_UpdateButton, PasteValues(), ResetValues(), SendRPC(), and UpdateSliderValues().

◆ PasteValues()

void ScriptConsoleWeatherTab::PasteValues ( string clipboard)
inlineprotected

Definition at line 249 of file ScriptConsoleWeatherTab.c.

250 {
252 clipboard.Split(" ", values);
253 if (values.Count() != 9)
254 return;
255 // FOG
256 m_FogValueEditbox.SetText(values.Get(0));
257 m_FogInterpolationEditbox.SetText(values.Get(1));
258 m_FogDurationEditbox.SetText(values.Get(2));
259 // OVERCAST
260 m_OvercastValueEditbox.SetText(values.Get(3));
262 m_OvercastDurationEditbox.SetText(values.Get(5));
263 // RAIN
264 m_RainValueEditbox.SetText(values.Get(6));
265 m_RainInterpolationEditbox.SetText(values.Get(7));
266 m_RainDurationEditbox.SetText(values.Get(8));
267 }
array< string > TStringArray
Definition EnScript.c:666

References m_FogDurationEditbox, m_FogInterpolationEditbox, m_FogValueEditbox, m_OvercastDurationEditbox, m_OvercastInterpolationEditbox, m_OvercastValueEditbox, m_RainDurationEditbox, m_RainInterpolationEditbox, and m_RainValueEditbox.

Referenced by OnClick().

◆ ResetValues()

void ScriptConsoleWeatherTab::ResetValues ( )
inlineprotected

◆ SendRPC()

void ScriptConsoleWeatherTab::SendRPC ( DebugWeatherRPCData data)
inlineprotected

Definition at line 526 of file ScriptConsoleWeatherTab.c.

527 {
529 if (GetGame().GetPlayer())
530 identity = GetGame().GetPlayer().GetIdentity();
531
532 GetGame().RPCSingleParam(null, ERPCs.DEV_SET_WEATHER, new Param1<DebugWeatherRPCData>(data), true, identity);
533 }
ERPCs
Definition ERPCs.c:2
PlayerBase GetPlayer()
The class that will be instanced (moddable)
Definition gameplay.c:376

References GetGame(), and GetPlayer().

◆ Update()

override void ScriptConsoleWeatherTab::Update ( float timeslice)
inlineprotected

Definition at line 540 of file ScriptConsoleWeatherTab.c.

541 {
542 super.Update(timeslice);
543 float overcast = GetGame().GetWeather().GetOvercast().GetActual();
544 m_OvercastValueGetSlider.SetCurrent(overcast * 100);
545 m_OvercastValueSetText.SetText(overcast.ToString());
546
547 float fog = GetGame().GetWeather().GetFog().GetActual();
548 m_FogValueGetSlider.SetCurrent(fog * 100);
549 m_FogValueSetText.SetText(fog.ToString());
550
551 float rain = GetGame().GetWeather().GetRain().GetActual();
552 m_RainValueGetSlider.SetCurrent(rain * 100);
553 m_RainValueSetText.SetText(rain.ToString());
554 }

References GetGame(), m_FogValueGetSlider, m_FogValueSetText, m_OvercastValueGetSlider, m_OvercastValueSetText, m_RainValueGetSlider, and m_RainValueSetText.

◆ UpdateEditboxValues()

void ScriptConsoleWeatherTab::UpdateEditboxValues ( )
inlineprotected

Definition at line 411 of file ScriptConsoleWeatherTab.c.

412 {
413 //fog
416
419
420 m_FogValue = m_FogValueSetSlider.GetCurrent() / 100;
421 m_FogValueEditbox.SetText(m_FogValue.ToString());
422
423 //overcast
426
429
430 m_OvercastValue = m_OvercastValueSetSlider.GetCurrent() / 100;
431 m_OvercastValueEditbox.SetText(m_OvercastValue.ToString());
432
433 //rain
436
439
440 m_RainValue = m_RainValueSetSlider.GetCurrent() / 100;
441 m_RainValueEditbox.SetText(m_RainValue.ToString());
442 }

References DURATION_MAX, INTERPOLATION_MAX, m_FogDurationEditbox, m_FogDurationTimeSlider, m_FogDurationTimeValue, m_FogInterpolationEditbox, m_FogInterpolationTimeSlider, m_FogInterpolationTimeValue, m_FogValue, m_FogValueEditbox, m_FogValueSetSlider, m_OvercastDurationEditbox, m_OvercastDurationTimeSlider, m_OvercastDurationTimeValue, m_OvercastInterpolationEditbox, m_OvercastInterpolationTimeSlider, m_OvercastInterpolationTimeValue, m_OvercastValue, m_OvercastValueEditbox, m_OvercastValueSetSlider, m_RainDurationEditbox, m_RainDurationTimeSlider, m_RainDurationTimeValue, m_RainInterpolationEditbox, m_RainInterpolationTimeSlider, m_RainInterpolationTimeValue, m_RainValue, m_RainValueEditbox, and m_RainValueSetSlider.

Referenced by OnChange().

◆ UpdateSliderValues()

void ScriptConsoleWeatherTab::UpdateSliderValues ( )
inlineprotected

Definition at line 378 of file ScriptConsoleWeatherTab.c.

379 {
380 //fog
381 float editboxFogValue = m_FogValueEditbox.GetText().ToFloat();
382 m_FogValueSetSlider.SetCurrent(editboxFogValue * 100);
383
384 float editboxFogInterpolation = m_FogInterpolationEditbox.GetText().ToFloat();
386
387 float editboxFogDuration = m_FogDurationEditbox.GetText().ToFloat();
389
390 //overcast
391 float editboxOvercastValue = m_OvercastValueEditbox.GetText().ToFloat();
393
396
397 float editboxOvercastDuration = m_OvercastDurationEditbox.GetText().ToFloat();
399
400 //rain
401 float editboxRainValue = m_RainValueEditbox.GetText().ToFloat();
402 m_RainValueSetSlider.SetCurrent(editboxRainValue * 100);
403
404 float editboxRainInterpolation = m_RainInterpolationEditbox.GetText().ToFloat();
406
407 float editboxRainDuration = m_RainDurationEditbox.GetText().ToFloat();
409 }
Definition EnMath.c:7
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...

References INTERPOLATION_MAX, Math::InverseLerp(), m_FogDurationEditbox, m_FogDurationTimeSlider, m_FogInterpolationEditbox, m_FogInterpolationTimeSlider, m_FogValueEditbox, m_FogValueSetSlider, m_OvercastDurationEditbox, m_OvercastDurationTimeSlider, m_OvercastInterpolationEditbox, m_OvercastInterpolationTimeSlider, m_OvercastValueEditbox, m_OvercastValueSetSlider, m_RainDurationEditbox, m_RainDurationTimeSlider, m_RainInterpolationEditbox, m_RainInterpolationTimeSlider, m_RainValueEditbox, and m_RainValueSetSlider.

Referenced by InitValues(), OnChange(), OnClick(), and ResetValues().

Member Data Documentation

◆ DURATION_MAX

const int ScriptConsoleWeatherTab::DURATION_MAX = 920
protected

◆ INTERPOLATION_MAX

const int ScriptConsoleWeatherTab::INTERPOLATION_MAX = 920
protected

◆ m_ApplyButton

ButtonWidget ScriptConsoleWeatherTab::m_ApplyButton
protected

Definition at line 76 of file ScriptConsoleWeatherTab.c.

Referenced by OnClick(), and ScriptConsoleWeatherTab().

◆ m_CopyButton

ButtonWidget ScriptConsoleWeatherTab::m_CopyButton
protected

Definition at line 78 of file ScriptConsoleWeatherTab.c.

Referenced by OnClick(), and ScriptConsoleWeatherTab().

◆ m_FogDurationEditbox

EditBoxWidget ScriptConsoleWeatherTab::m_FogDurationEditbox
protected

◆ m_FogDurationMaxText

TextWidget ScriptConsoleWeatherTab::m_FogDurationMaxText
protected

Definition at line 18 of file ScriptConsoleWeatherTab.c.

Referenced by InitValues(), and ScriptConsoleWeatherTab().

◆ m_FogDurationTimeSlider

SliderWidget ScriptConsoleWeatherTab::m_FogDurationTimeSlider
protected

◆ m_FogDurationTimeValue

float ScriptConsoleWeatherTab::m_FogDurationTimeValue = -1
staticprotected

◆ m_FogInterpolationEditbox

EditBoxWidget ScriptConsoleWeatherTab::m_FogInterpolationEditbox
protected

◆ m_FogInterpolationMaxText

TextWidget ScriptConsoleWeatherTab::m_FogInterpolationMaxText
protected

Definition at line 17 of file ScriptConsoleWeatherTab.c.

Referenced by InitValues(), and ScriptConsoleWeatherTab().

◆ m_FogInterpolationTimeSlider

SliderWidget ScriptConsoleWeatherTab::m_FogInterpolationTimeSlider
protected

◆ m_FogInterpolationTimeValue

float ScriptConsoleWeatherTab::m_FogInterpolationTimeValue
staticprotected

◆ m_FogValue

float ScriptConsoleWeatherTab::m_FogValue = -1
staticprotected

◆ m_FogValueEditbox

EditBoxWidget ScriptConsoleWeatherTab::m_FogValueEditbox
protected

◆ m_FogValueGetSlider

SliderWidget ScriptConsoleWeatherTab::m_FogValueGetSlider
protected

Definition at line 9 of file ScriptConsoleWeatherTab.c.

Referenced by ScriptConsoleWeatherTab(), and Update().

◆ m_FogValueSetSlider

◆ m_FogValueSetText

TextWidget ScriptConsoleWeatherTab::m_FogValueSetText
protected

Definition at line 11 of file ScriptConsoleWeatherTab.c.

Referenced by ScriptConsoleWeatherTab(), and Update().

◆ m_OvercastDurationEditbox

EditBoxWidget ScriptConsoleWeatherTab::m_OvercastDurationEditbox
protected

◆ m_OvercastDurationMaxText

TextWidget ScriptConsoleWeatherTab::m_OvercastDurationMaxText
protected

Definition at line 40 of file ScriptConsoleWeatherTab.c.

Referenced by InitValues(), and ScriptConsoleWeatherTab().

◆ m_OvercastDurationTimeSlider

SliderWidget ScriptConsoleWeatherTab::m_OvercastDurationTimeSlider
protected

◆ m_OvercastDurationTimeValue

float ScriptConsoleWeatherTab::m_OvercastDurationTimeValue = -1
staticprotected

◆ m_OvercastInterpolationEditbox

EditBoxWidget ScriptConsoleWeatherTab::m_OvercastInterpolationEditbox
protected

◆ m_OvercastInterpolationMaxText

TextWidget ScriptConsoleWeatherTab::m_OvercastInterpolationMaxText
protected

Definition at line 39 of file ScriptConsoleWeatherTab.c.

Referenced by InitValues(), and ScriptConsoleWeatherTab().

◆ m_OvercastInterpolationTimeSlider

SliderWidget ScriptConsoleWeatherTab::m_OvercastInterpolationTimeSlider
protected

◆ m_OvercastInterpolationTimeValue

float ScriptConsoleWeatherTab::m_OvercastInterpolationTimeValue
staticprotected

◆ m_OvercastValue

float ScriptConsoleWeatherTab::m_OvercastValue = -1
staticprotected

◆ m_OvercastValueEditbox

EditBoxWidget ScriptConsoleWeatherTab::m_OvercastValueEditbox
protected

◆ m_OvercastValueGetSlider

SliderWidget ScriptConsoleWeatherTab::m_OvercastValueGetSlider
protected

Definition at line 31 of file ScriptConsoleWeatherTab.c.

Referenced by ScriptConsoleWeatherTab(), and Update().

◆ m_OvercastValueSetSlider

SliderWidget ScriptConsoleWeatherTab::m_OvercastValueSetSlider
protected

◆ m_OvercastValueSetText

TextWidget ScriptConsoleWeatherTab::m_OvercastValueSetText
protected

Definition at line 33 of file ScriptConsoleWeatherTab.c.

Referenced by ScriptConsoleWeatherTab(), and Update().

◆ m_PasteButton

ButtonWidget ScriptConsoleWeatherTab::m_PasteButton
protected

Definition at line 79 of file ScriptConsoleWeatherTab.c.

Referenced by OnClick(), and ScriptConsoleWeatherTab().

◆ m_RainDurationEditbox

EditBoxWidget ScriptConsoleWeatherTab::m_RainDurationEditbox
protected

◆ m_RainDurationMaxText

TextWidget ScriptConsoleWeatherTab::m_RainDurationMaxText
protected

Definition at line 62 of file ScriptConsoleWeatherTab.c.

Referenced by InitValues(), and ScriptConsoleWeatherTab().

◆ m_RainDurationTimeSlider

SliderWidget ScriptConsoleWeatherTab::m_RainDurationTimeSlider
protected

◆ m_RainDurationTimeValue

float ScriptConsoleWeatherTab::m_RainDurationTimeValue = -1
staticprotected

◆ m_RainInterpolationEditbox

EditBoxWidget ScriptConsoleWeatherTab::m_RainInterpolationEditbox
protected

◆ m_RainInterpolationMaxText

TextWidget ScriptConsoleWeatherTab::m_RainInterpolationMaxText
protected

Definition at line 61 of file ScriptConsoleWeatherTab.c.

Referenced by InitValues(), and ScriptConsoleWeatherTab().

◆ m_RainInterpolationTimeSlider

SliderWidget ScriptConsoleWeatherTab::m_RainInterpolationTimeSlider
protected

◆ m_RainInterpolationTimeValue

float ScriptConsoleWeatherTab::m_RainInterpolationTimeValue
staticprotected

◆ m_RainValue

float ScriptConsoleWeatherTab::m_RainValue = -1
staticprotected

◆ m_RainValueEditbox

EditBoxWidget ScriptConsoleWeatherTab::m_RainValueEditbox
protected

◆ m_RainValueGetSlider

SliderWidget ScriptConsoleWeatherTab::m_RainValueGetSlider
protected

Definition at line 53 of file ScriptConsoleWeatherTab.c.

Referenced by ScriptConsoleWeatherTab(), and Update().

◆ m_RainValueSetSlider

SliderWidget ScriptConsoleWeatherTab::m_RainValueSetSlider
protected

◆ m_RainValueSetText

TextWidget ScriptConsoleWeatherTab::m_RainValueSetText
protected

Definition at line 55 of file ScriptConsoleWeatherTab.c.

Referenced by ScriptConsoleWeatherTab(), and Update().

◆ m_ResetButton

ButtonWidget ScriptConsoleWeatherTab::m_ResetButton
protected

Definition at line 74 of file ScriptConsoleWeatherTab.c.

Referenced by OnClick(), and ScriptConsoleWeatherTab().

◆ m_RPCTimer

ref Timer ScriptConsoleWeatherTab::m_RPCTimer = new Timer()
protected

Definition at line 3 of file ScriptConsoleWeatherTab.c.

Referenced by OnChange().

◆ m_UpdateButton

ButtonWidget ScriptConsoleWeatherTab::m_UpdateButton
protected

Definition at line 75 of file ScriptConsoleWeatherTab.c.

Referenced by OnClick(), and ScriptConsoleWeatherTab().


The documentation for this class was generated from the following file: