DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ScriptConsoleWeatherTab.c
См. документацию.
2{
3 static void SetDefaultValues()
4 {
5
6 }
7}
8
9class ScriptConsoleWeatherTab : ScriptConsoleTabBase
10{
11 protected ref Timer m_RPCTimer = new Timer();
12 protected const int INTERPOLATION_MAX = 920;
13 protected const int DURATION_MAX = 960;
14
15 // FOG
16 protected SliderWidget m_FogValueSetSlider;
17 protected SliderWidget m_FogValueGetSlider;
18
20
21 protected SliderWidget m_FogInterpolationTimeSlider;
22 protected SliderWidget m_FogDurationTimeSlider;
23
26
30
31 protected static float m_FogValue = -1;
32 protected static float m_FogInterpolationTimeValue;
33 protected static float m_FogDurationTimeValue = -1;
34
35 // Overcast
36 protected SliderWidget m_OvercastValueSetSlider;
37 protected SliderWidget m_OvercastValueGetSlider;
38
40
41 protected SliderWidget m_OvercastInterpolationTimeSlider;
42 protected SliderWidget m_OvercastDurationTimeSlider;
43
46
50
51 protected static float m_OvercastValue = -1;
52 protected static float m_OvercastInterpolationTimeValue;
53 protected static float m_OvercastDurationTimeValue = -1;
54
55 // Rain
56 protected SliderWidget m_RainValueSetSlider;
57 protected SliderWidget m_RainValueGetSlider;
58
60
61 protected SliderWidget m_RainInterpolationTimeSlider;
62 protected SliderWidget m_RainDurationTimeSlider;
63
66
70
71 protected static float m_RainValue = -1;
72 protected static float m_RainInterpolationTimeValue;
73 protected static float m_RainDurationTimeValue = -1;
74
75 // Snowfall
76 protected SliderWidget m_SnowfallValueSetSlider;
77 protected SliderWidget m_SnowfallValueGetSlider;
78
80
81 protected SliderWidget m_SnowfallInterpolationTimeSlider;
82 protected SliderWidget m_SnowfallDurationTimeSlider;
83
86
90
91 protected static float m_SnowfallValue = -1;
92 protected static float m_SnowfallInterpolationTimeValue;
93 protected static float m_SnowfallDurationTimeValue = -1;
94
95 // Vol Fog
97 protected SliderWidget m_VolFogDistanceDensitySlider;
101
103 protected SliderWidget m_VolFogDistanceDensityTimeSlider;
107
109 protected SliderWidget m_VolFogHeightDensitySlider;
113
115 protected SliderWidget m_VolFogHeightDensityTimeSlider;
119
121 protected SliderWidget m_VolFogHeightBiasSlider;
125
127 protected SliderWidget m_VolFogHeightBiasTimeSlider;
131
132 protected static float m_VolFogDistanceDensityValue = -1;
133 protected static float m_VolFogDistanceDensityTimeValue;
134 protected static float m_VolFogHeightDensityValue = -1;
135 protected static float m_VolFogHeightDensityTimeValue;
136 protected static float m_VolFogHeightBiasValue = -1;
137 protected static float m_VolFogHeightBiasTimeValue;
138
139 // Wind Magnitude
140 protected SliderWidget m_WindMValueSetSlider;
141 protected SliderWidget m_WindMValueGetSlider;
142
144
145 protected SliderWidget m_WindMInterpolationTimeSlider;
146 protected SliderWidget m_WindMDurationTimeSlider;
147
150
154
155 protected static float m_WindMagnitudeValue = -1;
156 protected static float m_WindMInterpolationTimeValue;
157 protected static float m_WindMDurationTimeValue = -1;
158
159 // Wind Direction
160 protected SliderWidget m_WindDValueSetSlider;
161 protected SliderWidget m_WindDValueGetSlider;
162
164
165 protected SliderWidget m_WindDInterpolationTimeSlider;
166 protected SliderWidget m_WindDDurationTimeSlider;
167
170
174
175 protected static float m_WindDirectionValue = -1;
176 protected static float m_WindDInterpolationTimeValue;
177 protected static float m_WindDDurationTimeValue = -1;
178
179 // Sandstorm
183
184 protected ButtonWidget m_StartSandstormButton;
185 protected ButtonWidget m_StopSandstormButton;
186
187 protected ButtonWidget m_StartSandstormWeatherButton;
188 protected ButtonWidget m_StopSandstormWeatherButton;
189
190 protected ScriptConsoleWeatherTab m_WeatherTab;
191 protected float m_SandstormMagnitudeValue = -1;
192 protected float m_SandstormDurationTimeValue = -1;
193 protected float m_SandstormSpeedValue = -1;
194
195 // Other
196 protected ButtonWidget m_HideUIButton;
197 protected ImageWidget m_HideUIIcon;
198
199 protected ButtonWidget m_LoadPresetButton;
200 protected ButtonWidget m_DeletePresetButton;
201 protected ButtonWidget m_SavePresetButton;
202
203 protected ButtonWidget m_CopyButton;
204 protected ButtonWidget m_PasteButton;
205 protected ButtonWidget m_ResetButton;
206 protected ButtonWidget m_UpdateButton;
207 protected ButtonWidget m_ApplyButton;
208
211
212 protected bool m_UIVisibilityState = true;
213 protected ScriptConsoleWeatherPreset m_SelectedWeatherPreset;
214 protected ref ScriptConsolePresetsList m_WeatherPresetsList;
216 protected bool m_IsCAPSPressed;
217 protected bool m_CanUseMovement;
218 protected bool m_IsSavingPreset;
219
221 {
222 // FOG
223 m_FogValue = m_FogValueSetSlider.GetCurrent() / 100;
226
227 // OVERCAST
228 m_OvercastValue = m_OvercastValueSetSlider.GetCurrent() / 100;
231
232 // Rain
233 m_RainValue = m_RainValueSetSlider.GetCurrent() / 100;
236
237 // Snowfall
238 m_SnowfallValue = m_SnowfallValueSetSlider.GetCurrent() / 100;
241
242 // Vol Fog
245
248
251 }
252
253 override void InitializeTab(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent = null)
254 {
255 super.InitializeTab(root, console, button, parent);
256
257 // FOG
258 m_FogValueSetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderFogValue"));
259 m_FogValueGetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderFogActualValue"));
260 m_FogValueSetText = TextWidget.Cast(root.FindAnyWidget("TextFogValueActual"));
261
262 m_FogInterpolationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderFogTarget"));
263 m_FogDurationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderFogDuration"));
264
265 m_FogInterpolationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxFogTarget"));
266 m_FogDurationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxFogDuration"));
267
268 m_FogValueEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxFogValue"));
269 m_FogInterpolationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxFogTarget"));
270 m_FogDurationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxFogDuration"));
271
272 // OVERCAST
273 m_OvercastValueSetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderOvercastValue"));
274 m_OvercastValueGetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderOvercastActualValue"));
275 m_OvercastValueSetText = TextWidget.Cast(root.FindAnyWidget("TextOvercastValueActual"));
276
277 m_OvercastInterpolationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderOvercastTarget"));
278 m_OvercastDurationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderOvercastDuration"));
279
280 m_OvercastInterpolationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxOvercastTarget"));
281 m_OvercastDurationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxOvercastDuration"));
282
283 m_OvercastValueEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxOvercastValue"));
284 m_OvercastInterpolationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxOvercastTarget"));
285 m_OvercastDurationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxOvercastDuration"));
286
287 // Rain
288 m_RainValueSetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderRainValue"));
289 m_RainValueGetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderRainActualValue"));
290 m_RainValueSetText = TextWidget.Cast(root.FindAnyWidget("TextRainValueActual"));
291
292 m_RainInterpolationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderRainTarget"));
293 m_RainDurationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderRainDuration"));
294
295 m_RainInterpolationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxRainTarget"));
296 m_RainDurationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxRainDuration"));
297
298 m_RainValueEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxRainValue"));
299 m_RainInterpolationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxRainTarget"));
300 m_RainDurationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxRainDuration"));
301
302 // Snowfall
303 m_SnowfallValueSetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderSnowfallValue"));
304 m_SnowfallValueGetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderSnowfallActualValue"));
305 m_SnowfallValueSetText = TextWidget.Cast(root.FindAnyWidget("TextSnowfallValueActual"));
306
307 m_SnowfallInterpolationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderSnowfallTarget"));
308 m_SnowfallDurationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderSnowfallDuration"));
309
310 m_SnowfallInterpolationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxSnowfallTarget"));
311 m_SnowfallDurationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxSnowfallDuration"));
312
313 m_SnowfallValueEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxSnowfallValue"));
314 m_SnowfallInterpolationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxSnowfallTarget"));
315 m_SnowfallDurationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxSnowfallDuration"));
316
317 // Vol Fog
318 m_VolFogDistanceDensityEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxVolfogDDValue"));
319 m_VolFogDistanceDensitySlider = SliderWidget.Cast(root.FindAnyWidget("SliderVolfogDD"));
320 m_VolFogDistanceDensitySlider.SetMinMax(0, 1);
321 m_VolFogDistanceDensitySlider.SetStep(0.01);
322 m_VolFogDistanceDensityMinText = TextWidget.Cast(root.FindAnyWidget("TextMinVolfogDDValue"));
323 m_VolFogDistanceDensityMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxVolfogDDValue"));
324 m_VolFogDistanceDensitySetText = TextWidget.Cast(root.FindAnyWidget("TextVolfogDDValueActual"));
325
326 m_VolFogDistanceDensityTimeEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxVolfogDDTValue"));
327 m_VolFogDistanceDensityTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderVolfogDDTime"));
328 m_VolFogDistanceDensityTimeMinText = TextWidget.Cast(root.FindAnyWidget("TextMinVolfogDDTValue"));
329 m_VolFogDistanceDensityTimeMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxVolfogDDTValue"));
330 m_VolFogDistanceDensityTimeSetText = TextWidget.Cast(root.FindAnyWidget("TextVolfogDDTValueActual"));
331
332 m_VolFogHeightDensityEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxVolfogHDValue"));
333 m_VolFogHeightDensitySlider = SliderWidget.Cast(root.FindAnyWidget("SliderVolfogHD"));
334 m_VolFogHeightDensitySlider.SetMinMax(0, 1);
335 m_VolFogHeightDensitySlider.SetStep(0.01);
336 m_VolFogHeightDensityMinText = TextWidget.Cast(root.FindAnyWidget("TextMinVolfogHDValue"));
337 m_VolFogHeightDensityMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxVolfogHDValue"));
338 m_VolFogHeightDensitySetText = TextWidget.Cast(root.FindAnyWidget("TextVolfogHDValueActual"));
339
340 m_VolFogHeightDensityTimeEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxVolfogHDTValue"));
341 m_VolFogHeightDensityTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderVolfogHDTime"));
342 m_VolFogHeightDensityTimeMinText = TextWidget.Cast(root.FindAnyWidget("TextMinVolfogHDTValue"));
343 m_VolFogHeightDensityTimeMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxVolfogHDTValue"));
344 m_VolFogHeightDensityTimeSetText = TextWidget.Cast(root.FindAnyWidget("TextVolfogHDTValueActual"));
345
346 m_VolFogHeightBiasEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxVolfogHBValue"));
347 m_VolFogHeightBiasSlider = SliderWidget.Cast(root.FindAnyWidget("SliderVolfogHB"));
348 m_VolFogHeightBiasSlider.SetMinMax(-500, 500);
349 m_VolFogHeightBiasMinText = TextWidget.Cast(root.FindAnyWidget("TextMinVolfogHBValue"));
350 m_VolFogHeightBiasMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxVolfogHBValue"));
351 m_VolFogHeightBiasSetText = TextWidget.Cast(root.FindAnyWidget("TextVolfogHBValueActual"));
352
353 m_VolFogHeightBiasTimeEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxVolfogHBTValue"));
354 m_VolFogHeightBiasTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderVolfogHBTime"));
355 m_VolFogHeightBiasTimeMinText = TextWidget.Cast(root.FindAnyWidget("TextMinVolfogHBTValue"));
356 m_VolFogHeightBiasTimeMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxVolfogHbTValue"));
357 m_VolFogHeightBiasTimeSetText = TextWidget.Cast(root.FindAnyWidget("TextVolfogHBTValueActual"));
358
359 // Wind Magnitude
360 m_WindMValueSetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderWindMValue"));
361 m_WindMValueSetSlider.SetMinMax(0, 20);
362 m_WindMValueSetSlider.SetStep(0.1);
363 m_WindMValueGetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderWindMActualValue"));
364 m_WindMValueGetSlider.SetMinMax(0, 20);
365 m_WindMValueGetSlider.SetStep(0.1);
366
367 m_WindMValueSetText = TextWidget.Cast(root.FindAnyWidget("TextWindMValueActual"));
368
369 m_WindMInterpolationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderWindMTarget"));
370 m_WindMDurationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderWindMDuration"));
371
372 m_WindMInterpolationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxWindMTarget"));
373 m_WindMDurationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxWindMDuration"));
374
375 m_WindMValueEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxWindMValue"));
376 m_WindMInterpolationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxWindMTarget"));
377 m_WindMDurationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxWindMDuration"));
378
379 // Wind Direction
380 m_WindDValueSetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderWindDValue"));
381 m_WindDValueSetSlider.SetMinMax(-3.14, 3.14);
382 m_WindDValueSetSlider.SetStep(0.01);
383
384 m_WindDValueGetSlider = SliderWidget.Cast(root.FindAnyWidget("SliderWindDActualValue"));
385 m_WindDValueGetSlider.SetMinMax(-3.14, 3.14);
386 m_WindDValueGetSlider.SetStep(0.01);
387
388 m_WindDValueSetText = TextWidget.Cast(root.FindAnyWidget("TextWindDValueActual"));
389
390 m_WindDInterpolationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderWindDTarget"));
391 m_WindDDurationTimeSlider = SliderWidget.Cast(root.FindAnyWidget("SliderWindDDuration"));
392
393 m_WindDInterpolationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxWindDTarget"));
394 m_WindDDurationMaxText = TextWidget.Cast(root.FindAnyWidget("TextMaxWindDDuration"));
395
396 m_WindDValueEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxWindDValue"));
397 m_WindDInterpolationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxWindDTarget"));
398 m_WindDDurationEditbox = EditBoxWidget.Cast(root.FindAnyWidget("EditBoxWindDDuration"));
399
400 // Sandstorm
401 m_StartSandstormButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonStartSandstorm"));
402 m_StopSandstormButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonStopSandstorm"));
403 m_StartSandstormWeatherButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonStartSandstormWeather"));
404 m_StopSandstormWeatherButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonStopSandstormWeather"));
405 m_StandstormMagnitudeText = TextWidget.Cast(root.FindAnyWidget("TextSandstormMagnitude"));
406 m_StandstormDurationText = TextWidget.Cast(root.FindAnyWidget("TextSandstormDuration"));
407 m_StandstormSpeedText = TextWidget.Cast(root.FindAnyWidget("TextSandstormSpeed"));
408
409 // Other
410 m_HideUIButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonHide"));
411 m_HideUIIcon = ImageWidget.Cast(root.FindAnyWidget("ButtonHideIcon"));
412 m_HideUIIcon.LoadImageFile(0, "set:dayz_gui image:PasswordEyeOpen");
413 m_HideUIIcon.LoadImageFile(1, "set:dayz_gui image:PasswordEyeClose");
414 m_HideUIIcon.SetImage(1);
415
416 m_CopyButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonCopy"));
417 m_PasteButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonPaste"));
418 m_ResetButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonReset"));
419 m_UpdateButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonUpdate"));
420 m_ApplyButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonApply"));
421
422 m_LoadPresetButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonLoadPreset"));
423 m_DeletePresetButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonDeletePreset"));
424 m_SavePresetButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonSavePreset"));
425 m_WeatherPresetEditbox = EditBoxWidget.Cast(root.FindAnyWidget("WeatherPresetName"));
426
427 m_WeatherPresetsPanel = root.FindAnyWidget("WeatherPresetsPanel");
428 m_WeatherPresetsList = new ScriptConsolePresetsList(m_WeatherPresetsPanel, this);
429 m_WeatherPresetsList.m_ItemSelected.Insert(OnListItemSelected);
430
431 ScriptedSandstormController sandstormController = ScriptedSandstormController.Cast(g_Game.GetWeather().GetSandstorm());
432 if (sandstormController)
433 {
434 sandstormController.GetSandstormStartSI().Insert(OnSandstormStart);
435 }
436
437 InitValues();
439 }
440
441 protected void OnSandstormStart()
442 {
443 InitValues();
444 }
445
447 {
448 m_WeatherPresetsList.ClearList();
449
450 for (int i = 0; i < m_ConfigDebugProfile.GetWeatherPresets().Count(); i++)
451 {
452 ScriptConsoleWeatherPreset preset = m_ConfigDebugProfile.GetWeatherPresets()[i];
453 if (!preset)
454 {
455 ErrorEx("Could not load DOF preset entry!");
456 continue;
457 }
458
459 m_WeatherPresetsList.AddListItem(preset.Name, 0, i);
460 }
461 }
462
463 protected void ResetValues()
464 {
465 // FOG
466 m_FogValueEditbox.SetText("0");
467 m_FogDurationEditbox.SetText(DURATION_MAX.ToString());
468 m_FogInterpolationEditbox.SetText("0");
469
470 // OVERCAST
471 m_OvercastValueEditbox.SetText("0");
472 m_OvercastDurationEditbox.SetText(DURATION_MAX.ToString());
474
475 // Rain
476 m_RainValueEditbox.SetText("0");
477 m_RainDurationEditbox.SetText(DURATION_MAX.ToString());
478 m_RainInterpolationEditbox.SetText("0");
479
480 // Snowfall
481 m_SnowfallValueEditbox.SetText("0");
482 m_SnowfallDurationEditbox.SetText(DURATION_MAX.ToString());
484
485 // Vol Fog
488
489 m_VolFogHeightDensityEditbox.SetText("0");
491
492 m_VolFogHeightBiasEditbox.SetText("0");
494
495 // Wind Magnitude
496 m_WindMValueEditbox.SetText("0");
497 m_WindMDurationEditbox.SetText(DURATION_MAX.ToString());
498 m_WindMInterpolationEditbox.SetText("0");
499
500 // Wind Direction
501 m_WindDValueEditbox.SetText("0");
502 m_WindDDurationEditbox.SetText(DURATION_MAX.ToString());
503 m_WindDInterpolationEditbox.SetText("0");
504
506
507 //FOG
508 m_FogValue = 0;
511
512 // OVERCAST
513 m_OvercastValue = 0;
516
517 //RAIN
518 m_RainValue = 0;
521
522 //SNOWFALL
523 m_SnowfallValue = 0;
526
527 // Vol Fog
530
533
536
537 // Wind Magnitude
541
542 // Wind Direction
546 }
547
548 protected void InitValues(bool forceCurrent = false)
549 {
550 Weather weather = g_Game.GetWeather();
551
552 // FOG
553 float fogVal = m_FogValue;
554 if (forceCurrent || m_FogValue == -1)
555 {
556 fogVal = weather.GetFog().GetActual();
557 }
558 m_FogValueEditbox.SetText(fogVal.ToString());
559
561
562 if (m_FogDurationTimeValue == -1)
565
567 m_FogDurationMaxText.SetText(DURATION_MAX.ToString());
568
569 // OVERCAST
570 float overcastVal = m_OvercastValue;
571 if (forceCurrent || m_OvercastValue == -1)
572 {
573 overcastVal = weather.GetOvercast().GetActual();
574 }
575 m_OvercastValueEditbox.SetText(overcastVal.ToString());
576
578
579
583
585 m_OvercastDurationMaxText.SetText(DURATION_MAX.ToString());
586
587 // RAIN
588 float rainVal = m_RainValue;
589 if (forceCurrent || m_RainValue == -1)
590 {
591 rainVal = weather.GetRain().GetActual();
592 }
593
594 m_RainValueEditbox.SetText(rainVal.ToString());
596
597 if (m_RainDurationTimeValue == -1)
600
602 m_RainDurationMaxText.SetText(DURATION_MAX.ToString());
603
604 // SNOWFALL
605 float snowfallVal = m_SnowfallValue;
606 if (forceCurrent || m_SnowfallValue == -1)
607 {
608 snowfallVal = weather.GetSnowfall().GetActual();
609 }
610
611 m_SnowfallValueEditbox.SetText(snowfallVal.ToString());
613
617
619 m_SnowfallDurationMaxText.SetText(DURATION_MAX.ToString());
620
621 // VOLFOG
622 float volFogDistanceDensityValue = m_VolFogDistanceDensityValue;
623 if (forceCurrent || m_VolFogDistanceDensityValue == -1)
624 {
625 volFogDistanceDensityValue = weather.GetDynVolFogDistanceDensity();
626 }
627
628 m_VolFogDistanceDensityEditbox.SetText(volFogDistanceDensityValue.ToString());
629
632
633 float volFogHeightDensityValue = m_VolFogHeightDensityValue;
634 if (forceCurrent || m_VolFogHeightDensityValue == -1)
635 {
636 volFogHeightDensityValue = weather.GetDynVolFogHeightDensity();
637 }
638
639 m_VolFogHeightDensityEditbox.SetText(volFogHeightDensityValue.ToString());
640
643
644 float volFogHeightBiasValue = m_VolFogHeightBiasValue;
645 if (forceCurrent /*|| m_VolFogHeightBiasValue == -500*/)
646 {
647 volFogHeightBiasValue = weather.GetDynVolFogHeightBias();
648 }
649
650 m_VolFogHeightBiasEditbox.SetText(volFogHeightBiasValue.ToString());
651
654
655 // Wind Magnitude
656 float windMagnitudeVal = m_WindMagnitudeValue;
657 if (forceCurrent || m_WindMagnitudeValue == -1)
658 {
659 windMagnitudeVal = weather.GetWindMagnitude().GetActual();
660 }
661
662 m_WindMValueEditbox.SetText(windMagnitudeVal.ToString());
664
665 if (m_WindMDurationTimeValue == -1)
668
670 m_WindMDurationMaxText.SetText(DURATION_MAX.ToString());
671
672 // Wind Direction
673 float windDirectionVal = m_WindDirectionValue;
674 if (forceCurrent || m_WindDirectionValue == -1)
675 {
676 windDirectionVal = weather.GetWindDirection().GetActual();
677 }
678
679 m_WindDValueEditbox.SetText(windDirectionVal.ToString());
681
682 if (m_WindDDurationTimeValue == -1)
685
687 m_WindDDurationMaxText.SetText(DURATION_MAX.ToString());
688
689 // Sandstorm
690 Sandstorm sandstorm = weather.GetSandstorm();
691 if (sandstorm)
692 {
693 bool isActive = sandstorm.IsActive();
694 float sandstromMagnitudeVal = m_SandstormMagnitudeValue;
695 if (isActive && (forceCurrent || m_SandstormMagnitudeValue == -1))
696 {
697 sandstromMagnitudeVal = sandstorm.GetMagnitude();
698 }
699
700 m_StandstormMagnitudeText.SetText(sandstromMagnitudeVal.ToString());
701
702 float sandstromDurationVal = m_SandstormDurationTimeValue;
703 if (isActive && (forceCurrent || m_SandstormDurationTimeValue == -1))
704 {
705 sandstromDurationVal = sandstorm.GetRemainingMovementDuration();
706 }
707
708 m_StandstormDurationText.SetText(sandstromDurationVal.ToString());
709
710 float sandstromSpeedVal = m_SandstormSpeedValue;
711 if (isActive && (forceCurrent || m_SandstormSpeedValue == -1))
712 {
713 sandstromSpeedVal = sandstorm.GetSpeed();
714 }
715
716 m_StandstormSpeedText.SetText(sandstromSpeedVal.ToString());
717 }
718
720 }
721
722 protected void PasteValues(string clipboard)
723 {
724 TStringArray values = new TStringArray();
725 clipboard.Split(" ", values);
726 if (values.Count() >= 9)
727 {
728 // FOG
729 m_FogValueEditbox.SetText(values.Get(0));
730 m_FogInterpolationEditbox.SetText(values.Get(1));
731 m_FogDurationEditbox.SetText(values.Get(2));
732 // OVERCAST
733 m_OvercastValueEditbox.SetText(values.Get(3));
734 m_OvercastInterpolationEditbox.SetText(values.Get(4));
735 m_OvercastDurationEditbox.SetText(values.Get(5));
736 // RAIN
737 m_RainValueEditbox.SetText(values.Get(6));
738 m_RainInterpolationEditbox.SetText(values.Get(7));
739 m_RainDurationEditbox.SetText(values.Get(8));
740
741 if (values.Count() >= 12)
742 {
743 // SNOWFALL
744 m_SnowfallValueEditbox.SetText(values.Get(9));
745 m_SnowfallInterpolationEditbox.SetText(values.Get(10));
746 m_SnowfallDurationEditbox.SetText(values.Get(11));
747 }
748
749 if (values.Count() >= 18)
750 {
751 // VOL FOG
752 m_VolFogDistanceDensityEditbox.SetText(values.Get(12));
753 m_VolFogDistanceDensityTimeEditbox.SetText(values.Get(13));
754 m_VolFogHeightDensityEditbox.SetText(values.Get(14));
755 m_VolFogHeightDensityTimeEditbox.SetText(values.Get(15));
756 m_VolFogHeightBiasEditbox.SetText(values.Get(16));
757 m_VolFogHeightBiasTimeEditbox.SetText(values.Get(17));
758 }
759
760 if (values.Count() >= 24)
761 {
762 // WIND MAGNITUDE
763 m_WindMValueEditbox.SetText(values.Get(18));
764 m_WindMInterpolationEditbox.SetText(values.Get(19));
765 m_WindMDurationEditbox.SetText(values.Get(20));
766 // WIND DIRECTION
767 m_WindDValueEditbox.SetText(values.Get(21));
768 m_WindDInterpolationEditbox.SetText(values.Get(22));
769 m_WindDDurationEditbox.SetText(values.Get(23));
770 }
771 }
772 }
773
774 protected string CopyValues()
775 {
776 string output;
777
778 // FOG
779 output += m_FogValueEditbox.GetText();
780 output += " ";
781 output += m_FogInterpolationEditbox.GetText();
782 output += " ";
783 output += m_FogDurationEditbox.GetText();
784 output += " ";
785 // OVERCAST
786 output += m_OvercastValueEditbox.GetText();
787 output += " ";
788 output += m_OvercastInterpolationEditbox.GetText();
789 output += " ";
790 output += m_OvercastDurationEditbox.GetText();
791 output += " ";
792 // RAIN
793 output += m_RainValueEditbox.GetText();
794 output += " ";
795 output += m_RainInterpolationEditbox.GetText();
796 output += " ";
797 output += m_RainDurationEditbox.GetText();
798 output += " ";
799 // SNOWFALL
800 output += m_SnowfallValueEditbox.GetText();
801 output += " ";
802 output += m_SnowfallInterpolationEditbox.GetText();
803 output += " ";
804 output += m_SnowfallDurationEditbox.GetText();
805 output += " ";
806 // VOLFOG
807 output += m_VolFogDistanceDensityEditbox.GetText();
808 output += " ";
809 output += m_VolFogDistanceDensityTimeEditbox.GetText();
810 output += " ";
811 output += m_VolFogHeightDensityEditbox.GetText();
812 output += " ";
813 output += m_VolFogHeightDensityTimeEditbox.GetText();
814 output += " ";
815 output += m_VolFogHeightBiasEditbox.GetText();
816 output += " ";
817 output += m_VolFogHeightBiasTimeEditbox.GetText();
818 output += " ";
819 // WIND MAGNITUDE
820 output += m_WindMValueEditbox.GetText();
821 output += " ";
822 output += m_WindMInterpolationEditbox.GetText();
823 output += " ";
824 output += m_WindMDurationEditbox.GetText();
825 output += " ";
826 // WIND DIRECTION
827 output += m_WindDValueEditbox.GetText();
828 output += " ";
829 output += m_WindDInterpolationEditbox.GetText();
830 output += " ";
831 output += m_WindDDurationEditbox.GetText();
832
833 return output;
834 }
835
836 override bool OnChange(Widget w, int x, int y, bool finished)
837 {
838 bool rmbDrag = (GetMouseState(MouseState.RIGHT) & MB_PRESSED_MASK);
839 bool immDrag = (GetMouseState(MouseState.LEFT) & MB_PRESSED_MASK) && KeyState(KeyCode.KC_LSHIFT);
840
841 if (rmbDrag)
842 {
843 if (w == m_FogValueSetSlider)
844 {
845 m_OvercastValueSetSlider.SetCurrent(m_FogValueSetSlider.GetCurrent());
846 m_RainValueSetSlider.SetCurrent(m_FogValueSetSlider.GetCurrent());
847 m_SnowfallValueSetSlider.SetCurrent(m_FogValueSetSlider.GetCurrent());
848 }
849 else if (w == m_OvercastValueSetSlider)
850 {
851 m_FogValueSetSlider.SetCurrent(m_OvercastValueSetSlider.GetCurrent());
852 m_RainValueSetSlider.SetCurrent(m_OvercastValueSetSlider.GetCurrent());
853 m_SnowfallValueSetSlider.SetCurrent(m_OvercastValueSetSlider.GetCurrent());
854 }
855 else if (w == m_RainValueSetSlider)
856 {
857 m_FogValueSetSlider.SetCurrent(m_RainValueSetSlider.GetCurrent());
858 m_OvercastValueSetSlider.SetCurrent(m_RainValueSetSlider.GetCurrent());
859 m_SnowfallValueSetSlider.SetCurrent(m_RainValueSetSlider.GetCurrent());
860 }
861 else if (w == m_SnowfallValueSetSlider)
862 {
863 m_FogValueSetSlider.SetCurrent(m_SnowfallValueSetSlider.GetCurrent());
864 m_OvercastValueSetSlider.SetCurrent(m_SnowfallValueSetSlider.GetCurrent());
865 m_RainValueSetSlider.SetCurrent(m_SnowfallValueSetSlider.GetCurrent());
866 }
867 else if (w == m_FogInterpolationTimeSlider)
868 {
872 }
874 {
878 }
879
880 else if (w == m_RainInterpolationTimeSlider)
881 {
885 }
887 {
891 }
892 else if (w == m_FogDurationTimeSlider)
893 {
894 m_RainDurationTimeSlider.SetCurrent(m_FogDurationTimeSlider.GetCurrent());
897 }
898 else if (w == m_RainDurationTimeSlider)
899 {
900 m_FogDurationTimeSlider.SetCurrent(m_RainDurationTimeSlider.GetCurrent());
903 }
904 else if (w == m_OvercastDurationTimeSlider)
905 {
909 }
910 else if (w == m_SnowfallDurationTimeSlider)
911 {
915 }
916 }
917
918 SliderWidget slider = SliderWidget.Cast(w);
919 if (slider)
920 {
921 if ((rmbDrag||immDrag) && !m_RPCTimer.IsRunning())
922 {
924 m_RPCTimer.Run(0.25, this, "InvokeSendRPC");
925 }
927 return true;
928 }
929
930 EditBoxWidget box = EditBoxWidget.Cast(w);
931 if (box)
932 {
934 return true;
935 }
936
937 return false;
938 }
939
941 {
942 //fog
943 float editboxFogValue = m_FogValueEditbox.GetText().ToFloat();
944 m_FogValueSetSlider.SetCurrent(editboxFogValue * 100);
945
946 float editboxFogInterpolation = m_FogInterpolationEditbox.GetText().ToFloat();
947 m_FogInterpolationTimeSlider.SetCurrent(Math.InverseLerp(0,INTERPOLATION_MAX,editboxFogInterpolation) * 100);
948
949 float editboxFogDuration = m_FogDurationEditbox.GetText().ToFloat();
950 m_FogDurationTimeSlider.SetCurrent(Math.InverseLerp(0,INTERPOLATION_MAX,editboxFogDuration) * 100);
951
952 //overcast
953 float editboxOvercastValue = m_OvercastValueEditbox.GetText().ToFloat();
954 m_OvercastValueSetSlider.SetCurrent(editboxOvercastValue * 100);
955
956 float editboxOvercastInterpolation = m_OvercastInterpolationEditbox.GetText().ToFloat();
957 m_OvercastInterpolationTimeSlider.SetCurrent(Math.InverseLerp(0,INTERPOLATION_MAX,editboxOvercastInterpolation) * 100);
958
959 float editboxOvercastDuration = m_OvercastDurationEditbox.GetText().ToFloat();
960 m_OvercastDurationTimeSlider.SetCurrent(Math.InverseLerp(0,INTERPOLATION_MAX,editboxOvercastDuration) * 100);
961
962 //rain
963 float editboxRainValue = m_RainValueEditbox.GetText().ToFloat();
964 m_RainValueSetSlider.SetCurrent(editboxRainValue * 100);
965
966 float editboxRainInterpolation = m_RainInterpolationEditbox.GetText().ToFloat();
967 m_RainInterpolationTimeSlider.SetCurrent(Math.InverseLerp(0,INTERPOLATION_MAX,editboxRainInterpolation) * 100);
968
969 float editboxRainDuration = m_RainDurationEditbox.GetText().ToFloat();
970 m_RainDurationTimeSlider.SetCurrent(Math.InverseLerp(0,INTERPOLATION_MAX,editboxRainDuration) * 100);
971
972 //snowfall
973 float editboxSnowfallValue = m_SnowfallValueEditbox.GetText().ToFloat();
974 m_SnowfallValueSetSlider.SetCurrent(editboxSnowfallValue * 100);
975
976 float editboxSnowfallInterpolation = m_SnowfallInterpolationEditbox.GetText().ToFloat();
977 m_SnowfallInterpolationTimeSlider.SetCurrent(Math.InverseLerp(0,INTERPOLATION_MAX,editboxSnowfallInterpolation) * 100);
978
979 float editboxSnowfallDuration = m_SnowfallDurationEditbox.GetText().ToFloat();
980 m_SnowfallDurationTimeSlider.SetCurrent(Math.InverseLerp(0,INTERPOLATION_MAX,editboxSnowfallDuration) * 100);
981
982 // vol fog
983 float editboxVolFogDistanceDensity = m_VolFogDistanceDensityEditbox.GetText().ToFloat();
984 m_VolFogDistanceDensitySlider.SetCurrent(editboxVolFogDistanceDensity);
985
986 float editboxVolFogDistanceDensityTime = m_VolFogDistanceDensityTimeEditbox.GetText().ToFloat();
987 m_VolFogDistanceDensityTimeSlider.SetCurrent(Math.InverseLerp(0,DURATION_MAX,editboxVolFogDistanceDensityTime) * 100);
988
989 float editboxVolFogHeightDensity = m_VolFogHeightDensityEditbox.GetText().ToFloat();
990 m_VolFogHeightDensitySlider.SetCurrent(editboxVolFogHeightDensity);
991
992 float editboxVolFogHeightDensityTime = m_VolFogHeightDensityTimeEditbox.GetText().ToFloat();
993 m_VolFogHeightDensityTimeSlider.SetCurrent(Math.InverseLerp(0,DURATION_MAX,editboxVolFogHeightDensityTime) * 100);
994
995 float editboxVolFogHeightBias = m_VolFogHeightBiasEditbox.GetText().ToFloat();
996 m_VolFogHeightBiasSlider.SetCurrent(editboxVolFogHeightBias);
997
998 float editboxVolFogHeightBiasTime = m_VolFogHeightBiasTimeEditbox.GetText().ToFloat();
999 m_VolFogHeightBiasTimeSlider.SetCurrent(Math.InverseLerp(0,DURATION_MAX,editboxVolFogHeightBiasTime) * 100);
1000
1001 // wind magnitude
1002 float editboxWindMValue = m_WindMValueEditbox.GetText().ToFloat();
1003 m_WindMValueSetSlider.SetCurrent(editboxWindMValue);
1004
1005 float editboxWindMInterpolation = m_WindMInterpolationEditbox.GetText().ToFloat();
1006 m_WindMInterpolationTimeSlider.SetCurrent(Math.InverseLerp(0,INTERPOLATION_MAX,editboxWindMInterpolation) * 100);
1007
1008 float editboxWindMDuration = m_WindMDurationEditbox.GetText().ToFloat();
1009 m_WindMDurationTimeSlider.SetCurrent(Math.InverseLerp(0,INTERPOLATION_MAX,editboxWindMDuration) * 100);
1010
1011 // wind direction
1012 float editboxWindDValue = m_WindDValueEditbox.GetText().ToFloat();
1013 m_WindDValueSetSlider.SetCurrent(editboxWindDValue);
1014
1015 float editboxWindDInterpolation = m_WindDInterpolationEditbox.GetText().ToFloat();
1016 m_WindDInterpolationTimeSlider.SetCurrent(Math.InverseLerp(0,INTERPOLATION_MAX,editboxWindDInterpolation) * 100);
1017
1018 float editboxWindDDuration = m_WindDDurationEditbox.GetText().ToFloat();
1019 m_WindDDurationTimeSlider.SetCurrent(Math.InverseLerp(0,INTERPOLATION_MAX,editboxWindDDuration) * 100);
1020 }
1021
1023 {
1024 //fog
1027
1029 m_FogDurationEditbox.SetText(m_FogDurationTimeValue.ToString());
1030
1031 m_FogValue = m_FogValueSetSlider.GetCurrent() / 100;
1032 m_FogValueEditbox.SetText(m_FogValue.ToString());
1033
1034 //overcast
1037
1040
1041 m_OvercastValue = m_OvercastValueSetSlider.GetCurrent() / 100;
1042 m_OvercastValueEditbox.SetText(m_OvercastValue.ToString());
1043
1044 //rain
1047
1050
1051 m_RainValue = m_RainValueSetSlider.GetCurrent() / 100;
1052 m_RainValueEditbox.SetText(m_RainValue.ToString());
1053
1054 //snowfall
1057
1060
1061 m_SnowfallValue = m_SnowfallValueSetSlider.GetCurrent() / 100;
1062 m_SnowfallValueEditbox.SetText(m_SnowfallValue.ToString());
1063
1064 // vol fog
1067
1070
1073
1076
1079
1082
1083 //wind magnitude
1086
1089
1091 m_WindMValueEditbox.SetText(m_WindMagnitudeValue.ToString());
1092
1093 //wind direction
1096
1099
1101 m_WindDValueEditbox.SetText(m_WindDirectionValue.ToString());
1102 }
1103
1104 override bool OnClick(Widget w, int x, int y, int button)
1105 {
1106 if (w == m_HideUIButton)
1107 {
1109 }
1110 else if (w == m_ApplyButton)
1111 {
1113 return true;
1114 }
1115 else if (w == m_UpdateButton)
1116 {
1117 InitValues(true);
1118 return true;
1119 }
1120 else if (w == m_ResetButton)
1121 {
1122 ResetValues();
1123 InitValues(true);
1124 return true;
1125 }
1126 else if (w == m_CopyButton)
1127 {
1128 string output = CopyValues();
1129 g_Game.CopyToClipboard(output);
1130 return true;
1131 }
1132 else if (w == m_PasteButton)
1133 {
1134 string input;
1135 g_Game.CopyFromClipboard(input);
1136 PasteValues(input);
1138 return true;
1139 }
1140 else if (w == m_LoadPresetButton)
1141 {
1143 return true;
1144 }
1145 else if (w == m_SavePresetButton)
1146 {
1148 return true;
1149 }
1150 else if (w == m_DeletePresetButton)
1151 {
1153 return true;
1154 }
1155 else if (w == m_StartSandstormButton)
1156 {
1158 return true;
1159 }
1160 else if (w == m_StopSandstormButton)
1161 {
1163 return true;
1164 }
1165 else if (w == m_StartSandstormWeatherButton)
1166 {
1168 return true;
1169 }
1170 else if (w == m_StopSandstormWeatherButton)
1171 {
1173 return true;
1174 }
1175
1176 return false;
1177 }
1178
1179 protected void SaveWeatherPreset()
1180 {
1181 if (m_IsSavingPreset || m_WeatherPresetEditbox.GetText() == "")
1182 return;
1183
1184 m_IsSavingPreset = true;
1185 m_ConfigDebugProfile.AddWeatherPreset(m_WeatherPresetEditbox.GetText(), m_OvercastValueEditbox.GetText().ToFloat(), m_RainValueEditbox.GetText().ToFloat(), m_SnowfallValueEditbox.GetText().ToFloat(), m_FogValueEditbox.GetText().ToFloat(), m_WindMValueEditbox.GetText().ToFloat(), m_WindDValueEditbox.GetText().ToFloat(), m_VolFogDistanceDensityEditbox.GetText().ToFloat(), m_VolFogHeightDensityEditbox.GetText().ToFloat(), m_VolFogHeightBiasEditbox.GetText().ToFloat());
1187 m_IsSavingPreset = false;
1188 }
1189
1190 protected void DeleteWeatherPreset()
1191 {
1193 return;
1194
1195 m_ConfigDebugProfile.RemoveWeatherPreset(m_SelectedWeatherPreset.Name);
1197 }
1198
1199 protected void LoadWeatherPreset()
1200 {
1202 return;
1203
1204 m_OvercastValueSetSlider.SetCurrent(m_SelectedWeatherPreset.WOvercast * 100);
1205 m_RainValueSetSlider.SetCurrent(m_SelectedWeatherPreset.WRain * 100);
1206 m_SnowfallValueSetSlider.SetCurrent(m_SelectedWeatherPreset.WSnow * 100);
1207 m_FogValueSetSlider.SetCurrent(m_SelectedWeatherPreset.WFog * 100);
1208 m_WindMValueSetSlider.SetCurrent(m_SelectedWeatherPreset.WWindMagnitude);
1213
1216 InvokeSendRPC();
1217 }
1218
1219 protected void OnListItemSelected(int row, int column)
1220 {
1221 m_SelectedWeatherPreset = m_ConfigDebugProfile.GetWeatherPresets().Get(row);
1223 }
1224
1225 protected void ToogleUIVisibility()
1226 {
1228 //m_ScriptConsole.ShowMenuBackground(m_UIVisibilityState);
1229 m_Root.FindAnyWidget("WeatherRoot").Show(m_UIVisibilityState);
1231 }
1232
1233 //RPC data where each value is strickly as shown in the UI on the sliders
1235 {
1237 // FOG
1238 data.m_FogValue = m_FogValueSetSlider.GetCurrent() / 100;
1240 data.m_FogDuration = m_FogDurationTimeSlider.GetCurrent() / 100 * DURATION_MAX;
1241
1242 // Rain
1243 data.m_RainValue = m_RainValueSetSlider.GetCurrent() / 100;
1245 data.m_RainDuration = m_RainDurationTimeSlider.GetCurrent() / 100 * DURATION_MAX;
1246
1247 // OVERCAST
1248 data.m_OvercastValue = m_OvercastValueSetSlider.GetCurrent() / 100;
1251
1252 // SNOWFALL
1253 data.m_SnowfallValue = m_SnowfallValueSetSlider.GetCurrent() / 100;
1256
1257 // VOLFOG
1260
1263
1264 data.m_VolFogHeightBias = m_VolFogHeightBiasSlider.GetCurrent();
1266
1267 // Wind Magnitude
1268 data.m_WindMagnitudeValue = m_WindMValueSetSlider.GetCurrent();
1270 data.m_WindMDuration = m_WindMDurationTimeSlider.GetCurrent() / 100 * DURATION_MAX;
1271
1272 // Wind Direction
1273 data.m_WindDirectionValue = m_WindDValueSetSlider.GetCurrent();
1275 data.m_WindDDuration = m_WindDDurationTimeSlider.GetCurrent() / 100 * DURATION_MAX;
1276
1277 return data;
1278 }
1279
1280 //RPC data where the duration and interpolation times are forced(their slider values are ignored) to allow for immediate change and lasting effect
1282 {
1284 // FOG
1285 data.m_FogValue = m_FogValueSetSlider.GetCurrent() / 100;
1286 data.m_FogInterpolation = 0;
1287 data.m_FogDuration = 960;
1288
1289 // Rain
1290 data.m_RainValue = m_RainValueSetSlider.GetCurrent() / 100;
1291 data.m_RainInterpolation = 0;
1292 data.m_RainDuration = 960;
1293
1294 // OVERCAST
1295 data.m_OvercastValue = m_OvercastValueSetSlider.GetCurrent() / 100;
1296 data.m_OvercastInterpolation = 0;
1297 data.m_OvercastDuration = 960;
1298
1299 // SNOWFALL
1300 data.m_SnowfallValue = m_SnowfallValueSetSlider.GetCurrent() / 100;
1301 data.m_SnowfallInterpolation = 0;
1302 data.m_SnowfallDuration = 960;
1303
1304 // VOLFOG
1307
1310
1311 data.m_VolFogHeightBias = m_VolFogHeightBiasSlider.GetCurrent();
1313
1314 // Wind Magnitude
1315 data.m_WindMagnitudeValue = m_WindMValueSetSlider.GetCurrent();
1316 data.m_WindMInterpolation = 0;
1317 data.m_WindMDuration = 960;
1318
1319 // Wind Direction
1320 data.m_WindDirectionValue = m_WindDValueSetSlider.GetCurrent();
1321 data.m_WindDInterpolation = 0;
1322 data.m_WindDDuration = 960;
1323
1324 return data;
1325 }
1326
1327 protected void SendRPC(DebugWeatherRPCData data)
1328 {
1329 PlayerIdentity identity = null;
1330 if (g_Game.GetPlayer())
1331 {
1332 identity = g_Game.GetPlayer().GetIdentity();
1333 }
1334
1335 if (g_Game.IsDedicatedServer())
1336 {
1337 // have to define earlier due to 'ScriptReadWriteContext' asserting on attempting to
1338 // decrement ref count of the serializers. This is due to the Serializers being inline allocated
1339 ParamsWriteContext wCtx;
1340 ParamsReadContext rCtx;
1341
1343
1344 // see above comment
1345 wCtx = ctx.GetWriteContext();
1346 rCtx = ctx.GetReadContext();
1347
1348 // aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa it was null for some reason
1349 Param1<DebugWeatherRPCData> d = new Param1<DebugWeatherRPCData>(data);
1350
1351 wCtx.Write(d);
1352
1353 g_Game.OnRPC(null, null, ERPCs.DEV_SET_WEATHER, rCtx);
1354 }
1355 else
1356 {
1357 g_Game.RPCSingleParam(null, ERPCs.DEV_SET_WEATHER, new Param1<DebugWeatherRPCData>(data), true, identity);
1358 }
1359 }
1360
1361 protected void InvokeSendRPC()
1362 {
1364 //m_RPCTimer.Stop();
1365 }
1366
1367 protected void UpdateWeatherValues()
1368 {
1369 Weather weather = g_Game.GetWeather();
1370
1371 float overcast = weather.GetOvercast().GetActual();
1372 m_OvercastValueGetSlider.SetCurrent(overcast * 100);
1373 m_OvercastValueSetText.SetText(overcast.ToString());
1374
1375 float fog = weather.GetFog().GetActual();
1376 m_FogValueGetSlider.SetCurrent(fog * 100);
1377 m_FogValueSetText.SetText(fog.ToString());
1378
1379 float rain = weather.GetRain().GetActual();
1380 m_RainValueGetSlider.SetCurrent(rain * 100);
1381 m_RainValueSetText.SetText(rain.ToString());
1382
1383 float snowfall = weather.GetSnowfall().GetActual();
1384 m_SnowfallValueGetSlider.SetCurrent(snowfall * 100);
1385 m_SnowfallValueSetText.SetText(snowfall.ToString());
1386
1387 float volFogDistanceDensity = weather.GetDynVolFogDistanceDensity();
1388 //m_VolFogDistanceDensitySlider.SetCurrent(volFogDistanceDensity * 100);
1389 m_VolFogDistanceDensitySetText.SetText(volFogDistanceDensity.ToString());
1390
1391 float volFogHeightDensity = weather.GetDynVolFogHeightDensity();
1392 //m_VolFogHeightDensitySlider.SetCurrent(volFogHeightDensity * 100);
1393 m_VolFogHeightDensitySetText.SetText(volFogHeightDensity.ToString());
1394
1395 float volFogHeightBias = weather.GetDynVolFogHeightBias();
1396 //m_VolFogHeightBiasSlider.SetCurrent(volFogHeightBias * 100);
1397 m_VolFogHeightBiasSetText.SetText(volFogHeightBias.ToString());
1398
1399 float windMagnitude = weather.GetWindMagnitude().GetActual();
1400 m_WindMValueGetSlider.SetCurrent(windMagnitude);
1401 m_WindMValueSetText.SetText(windMagnitude.ToString());
1402
1403 float windDirection = weather.GetWindDirection().GetActual();
1404 m_WindDValueGetSlider.SetCurrent(windDirection);
1405 m_WindDValueSetText.SetText(windDirection.ToString());
1406
1407 bool isActive = weather.GetSandstorm().IsActive();
1408 if (isActive)
1409 {
1410 Sandstorm sandstorm = weather.GetSandstorm();
1411 if (sandstorm)
1412 {
1415 m_SandstormSpeedValue = sandstorm.GetSpeed();
1416
1419 m_StandstormSpeedText.SetText(m_SandstormSpeedValue.ToString());
1420 }
1421 }
1422 }
1423
1424 protected DebugSandstormRPCData GetSandstormRPCData(bool startStorm = false)
1425 {
1426 DebugSandstormRPCData data = new DebugSandstormRPCData();
1427
1428 data.m_StartStorm = startStorm;
1429 data.m_FadeInTime = 10;
1430 data.m_FadeOutTime = 120;
1431 data.m_Duration = 99999;
1432
1433 // Overcast
1434 data.m_OvercastValue = m_OvercastValueSetSlider.GetCurrent() / 100;
1435
1436 // Wind Magnitude
1437 data.m_WindMagnitudeValue = m_WindMValueSetSlider.GetCurrent();
1438
1439 return data;
1440 }
1441
1442 protected void InvokeSendSandstormRPC()
1443 {
1445 }
1446
1447 protected void SendSandstormRPC(DebugSandstormRPCData data)
1448 {
1449 g_Game.RPCSingleParam(null, ERPCs.DEV_SET_SANDSTORM, new Param1<DebugSandstormRPCData>(data), true);
1450 }
1451
1452 protected void StopSandstormRPC()
1453 {
1454 g_Game.RPCSingleParam(null, ERPCs.DEV_STOP_SANDSTORM, null, true);
1455 }
1456
1458 {
1459 g_Game.RPCSingleParam(null, ERPCs.DEV_SET_SANDSTORM_WEATHER, null, true);
1460 }
1461
1463 {
1464 g_Game.RPCSingleParam(null, ERPCs.DEV_STOP_SANDSTORM_WEATHER, null, true);
1465 }
1466
1467 override void Update(float timeslice)
1468 {
1469 super.Update(timeslice);
1470
1472
1473 m_IsCAPSPressed = KeyState(KeyCode.KC_CAPITAL);
1475 {
1476 if (g_Game && g_Game.GetMission() && g_Game.GetUIManager())
1477 {
1479 g_Game.GetMission().RemoveActiveInputExcludes({"aiming"});
1480 g_Game.GetUIManager().ShowUICursor(false);
1481 }
1482 }
1484 {
1485 if (g_Game && g_Game.GetMission() && g_Game.GetUIManager())
1486 {
1487 m_MouseMovementEnabled = false;
1488 g_Game.GetMission().AddActiveInputExcludes({"aiming"});
1489 g_Game.GetUIManager().ShowUICursor(true);
1490 }
1491 }
1492
1494 {
1495 m_CanUseMovement = true;
1496 g_Game.GetMission().RemoveActiveInputExcludes({"UAMoveForward", "UAMoveBack", "UAMoveLeft", "UAMoveRight", "UAWalkRunTemp"});
1497 }
1499 {
1500 m_CanUseMovement = false;
1501 g_Game.GetMission().AddActiveInputExcludes({"UAMoveForward", "UAMoveBack", "UAMoveLeft", "UAMoveRight", "UAWalkRunTemp"});
1502 }
1503 }
1504
1505 override bool OnMouseEnter(Widget w, int x, int y)
1506 {
1507 ButtonHighlight(w);
1508 return false;
1509 }
1510
1511 override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
1512 {
1513 ButtonNormal(w);
1514 return false;
1515 }
1516
1517 protected void ButtonHighlight(Widget w)
1518 {
1519 ButtonWidget wb;
1520 if (Class.CastTo(wb, w))
1521 {
1522 if (wb.GetName() == "ButtonHide")
1523 {
1524 ImageWidget iw = ImageWidget.Cast(wb.FindAnyWidget(wb.GetName() + "Icon"));
1525 iw.SetColor(ARGB(255, 0, 0, 0));
1526 }
1527 else
1528 {
1529 wb.SetTextColor(ARGB(255, 0, 0, 0));
1530 }
1531 }
1532 }
1533
1534 protected void ButtonNormal(Widget w)
1535 {
1536 ButtonWidget wb;
1537 if (Class.CastTo(wb, w))
1538 {
1539 if (wb.GetName() == "ButtonHide")
1540 {
1541 ImageWidget iw = ImageWidget.Cast(wb.FindAnyWidget(wb.GetName() + "Icon"));
1542 iw.SetColor(ARGB(255, 255, 255, 255));
1543 }
1544 else
1545 {
1546 wb.SetTextColor(ARGB(255, 255, 255, 255));
1547 }
1548 }
1549 }
1550}
1551
1553{
1554 protected ScriptConsoleWeatherTab m_WeatherTab;
1555
1557 {
1558 m_Parent = parent;
1559 m_WeatherTab = ScriptConsoleWeatherTab.Cast(parent);
1560 }
1561}
DayZGame g_Game
Определения DayZGame.c:4074
override bool OnClick(Widget w, int x, int y, int button)
buttons clicks
Определения DayZGame.c:160
float m_WindMagnitudeValue
Определения DebugWeatherRPCData.c:47
float m_OvercastValue
Определения DebugWeatherRPCData.c:46
void SendRPC()
Определения DisplayStatus.c:171
ERPCs
Определения ERPCs.c:2
Icon x
Icon y
override void InitValues()
Определения PPERequestData.c:147
override bool OnChange(Widget w, int x, int y, bool finished)
Определения PluginDayZInfectedDebug.c:33
PluginConfigDebugProfile m_ConfigDebugProfile
Определения PluginItemDiagnostic.c:58
@ Count
Определения RandomGeneratorSyncManager.c:8
SandstormController Sandstorm
Определения Sandstorm.c:135
void ScriptConsole()
Определения ScriptConsole.c:114
override void InitializeTab(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
Определения ScriptConsoleEnfScriptTab.c:284
SliderWidget m_SnowfallValueGetSlider
Определения ScriptConsoleWeatherTab.c:77
static float m_OvercastInterpolationTimeValue
Определения ScriptConsoleWeatherTab.c:52
TextWidget m_WindMDurationMaxText
Определения ScriptConsoleWeatherTab.c:149
SliderWidget m_WindDInterpolationTimeSlider
Определения ScriptConsoleWeatherTab.c:165
ButtonWidget m_CopyButton
Определения ScriptConsoleWeatherTab.c:203
ButtonWidget m_HideUIButton
Определения ScriptConsoleWeatherTab.c:196
EditBoxWidget m_FogDurationEditbox
Определения ScriptConsoleWeatherTab.c:29
TextWidget m_VolFogHeightDensityMinText
Определения ScriptConsoleWeatherTab.c:110
SliderWidget m_OvercastValueGetSlider
Определения ScriptConsoleWeatherTab.c:37
void ToogleUIVisibility()
Определения ScriptConsoleWeatherTab.c:1225
DebugWeatherRPCData GetRPCDataNormal()
Определения ScriptConsoleWeatherTab.c:1234
static float m_RainInterpolationTimeValue
Определения ScriptConsoleWeatherTab.c:72
ScriptConsoleWeatherPreset m_SelectedWeatherPreset
Определения ScriptConsoleWeatherTab.c:213
void InvokeSendRPC()
Определения ScriptConsoleWeatherTab.c:1361
float m_SandstormDurationTimeValue
Определения ScriptConsoleWeatherTab.c:192
SliderWidget m_RainValueSetSlider
Определения ScriptConsoleWeatherTab.c:56
TextWidget m_VolFogHeightBiasMaxText
Определения ScriptConsoleWeatherTab.c:123
static float m_VolFogHeightBiasValue
Определения ScriptConsoleWeatherTab.c:136
bool m_IsCAPSPressed
Определения ScriptConsoleWeatherTab.c:216
bool m_MouseMovementEnabled
Определения ScriptConsoleWeatherTab.c:215
EditBoxWidget m_SnowfallValueEditbox
Определения ScriptConsoleWeatherTab.c:87
SliderWidget m_VolFogHeightDensityTimeSlider
Определения ScriptConsoleWeatherTab.c:115
float m_SandstormSpeedValue
Определения ScriptConsoleWeatherTab.c:193
SliderWidget m_VolFogHeightBiasTimeSlider
Определения ScriptConsoleWeatherTab.c:127
EditBoxWidget m_VolFogHeightBiasTimeEditbox
Определения ScriptConsoleWeatherTab.c:126
EditBoxWidget m_VolFogHeightBiasEditbox
Определения ScriptConsoleWeatherTab.c:120
void SaveWeatherPreset()
Определения ScriptConsoleWeatherTab.c:1179
EditBoxWidget m_VolFogDistanceDensityTimeEditbox
Определения ScriptConsoleWeatherTab.c:102
static float m_VolFogDistanceDensityValue
Определения ScriptConsoleWeatherTab.c:132
void ResetValues()
Определения ScriptConsoleWeatherTab.c:463
TextWidget m_VolFogHeightDensitySetText
Определения ScriptConsoleWeatherTab.c:112
ButtonWidget m_StartSandstormWeatherButton
Определения ScriptConsoleWeatherTab.c:187
TextWidget m_WindMValueSetText
Определения ScriptConsoleWeatherTab.c:143
void UpdateSliderValues()
Определения ScriptConsoleWeatherTab.c:940
TextWidget m_VolFogHeightBiasSetText
Определения ScriptConsoleWeatherTab.c:124
void UpdateWeatherValues()
Определения ScriptConsoleWeatherTab.c:1367
TextWidget m_VolFogHeightBiasMinText
Определения ScriptConsoleWeatherTab.c:122
static float m_WindMInterpolationTimeValue
Определения ScriptConsoleWeatherTab.c:156
void StartSandstormFromWeather()
Определения ScriptConsoleWeatherTab.c:1457
void DeleteWeatherPreset()
Определения ScriptConsoleWeatherTab.c:1190
SliderWidget m_WindDDurationTimeSlider
Определения ScriptConsoleWeatherTab.c:166
static float m_WindDInterpolationTimeValue
Определения ScriptConsoleWeatherTab.c:176
SliderWidget m_VolFogDistanceDensityTimeSlider
Определения ScriptConsoleWeatherTab.c:103
TextWidget m_VolFogHeightBiasTimeMaxText
Определения ScriptConsoleWeatherTab.c:129
static float m_RainDurationTimeValue
Определения ScriptConsoleWeatherTab.c:73
bool m_IsSavingPreset
Определения ScriptConsoleWeatherTab.c:218
TextWidget m_WindDDurationMaxText
Определения ScriptConsoleWeatherTab.c:169
TextWidget m_SnowfallInterpolationMaxText
Определения ScriptConsoleWeatherTab.c:84
TextWidget m_VolFogDistanceDensitySetText
Определения ScriptConsoleWeatherTab.c:100
TextWidget m_VolFogHeightDensityTimeMaxText
Определения ScriptConsoleWeatherTab.c:117
static float m_SnowfallDurationTimeValue
Определения ScriptConsoleWeatherTab.c:93
EditBoxWidget m_FogValueEditbox
Определения ScriptConsoleWeatherTab.c:27
SliderWidget m_RainDurationTimeSlider
Определения ScriptConsoleWeatherTab.c:62
SliderWidget m_FogValueSetSlider
Определения ScriptConsoleWeatherTab.c:16
SliderWidget m_SnowfallValueSetSlider
Определения ScriptConsoleWeatherTab.c:76
SliderWidget m_FogValueGetSlider
Определения ScriptConsoleWeatherTab.c:17
void StopSandstormRPC()
Определения ScriptConsoleWeatherTab.c:1452
EditBoxWidget m_SnowfallInterpolationEditbox
Определения ScriptConsoleWeatherTab.c:88
SliderWidget m_FogDurationTimeSlider
Определения ScriptConsoleWeatherTab.c:22
TextWidget m_VolFogDistanceDensityTimeMinText
Определения ScriptConsoleWeatherTab.c:104
EditBoxWidget m_OvercastDurationEditbox
Определения ScriptConsoleWeatherTab.c:49
void SendSandstormRPC(DebugSandstormRPCData data)
Определения ScriptConsoleWeatherTab.c:1447
EditBoxWidget m_WeatherPresetEditbox
Определения ScriptConsoleWeatherTab.c:210
TextWidget m_StandstormMagnitudeText
Определения ScriptConsoleWeatherTab.c:180
static float m_VolFogHeightDensityValue
Определения ScriptConsoleWeatherTab.c:134
ButtonWidget m_LoadPresetButton
Определения ScriptConsoleWeatherTab.c:199
EditBoxWidget m_FogInterpolationEditbox
Определения ScriptConsoleWeatherTab.c:28
EditBoxWidget m_VolFogHeightDensityTimeEditbox
Определения ScriptConsoleWeatherTab.c:114
static float m_FogValue
Определения ScriptConsoleWeatherTab.c:31
float m_SandstormMagnitudeValue
Определения ScriptConsoleWeatherTab.c:191
ButtonWidget m_PasteButton
Определения ScriptConsoleWeatherTab.c:204
ButtonWidget m_ResetButton
Определения ScriptConsoleWeatherTab.c:205
void PasteValues(string clipboard)
Определения ScriptConsoleWeatherTab.c:722
SliderWidget m_OvercastInterpolationTimeSlider
Определения ScriptConsoleWeatherTab.c:41
TextWidget m_RainInterpolationMaxText
Определения ScriptConsoleWeatherTab.c:64
static float m_RainValue
Определения ScriptConsoleWeatherTab.c:71
static float m_VolFogHeightDensityTimeValue
Определения ScriptConsoleWeatherTab.c:135
TextWidget m_SnowfallValueSetText
Определения ScriptConsoleWeatherTab.c:79
SliderWidget m_WindMInterpolationTimeSlider
Определения ScriptConsoleWeatherTab.c:145
void OnSandstormStart()
Определения ScriptConsoleWeatherTab.c:441
EditBoxWidget m_WindMInterpolationEditbox
Определения ScriptConsoleWeatherTab.c:152
static float m_OvercastDurationTimeValue
Определения ScriptConsoleWeatherTab.c:53
static float m_WindDirectionValue
Определения ScriptConsoleWeatherTab.c:175
SliderWidget m_SnowfallInterpolationTimeSlider
Определения ScriptConsoleWeatherTab.c:81
DebugWeatherRPCData GetRPCDataImmediate()
Определения ScriptConsoleWeatherTab.c:1281
EditBoxWidget m_VolFogHeightDensityEditbox
Определения ScriptConsoleWeatherTab.c:108
ButtonWidget m_StopSandstormWeatherButton
Определения ScriptConsoleWeatherTab.c:188
TextWidget m_SnowfallDurationMaxText
Определения ScriptConsoleWeatherTab.c:85
TextWidget m_VolFogDistanceDensityMinText
Определения ScriptConsoleWeatherTab.c:98
EditBoxWidget m_WindDValueEditbox
Определения ScriptConsoleWeatherTab.c:171
EditBoxWidget m_WindMDurationEditbox
Определения ScriptConsoleWeatherTab.c:153
ButtonWidget m_DeletePresetButton
Определения ScriptConsoleWeatherTab.c:200
TextWidget m_OvercastInterpolationMaxText
Определения ScriptConsoleWeatherTab.c:44
ButtonWidget m_StopSandstormButton
Определения ScriptConsoleWeatherTab.c:185
TextWidget m_WindDInterpolationMaxText
Определения ScriptConsoleWeatherTab.c:168
TextWidget m_VolFogHeightBiasTimeMinText
Определения ScriptConsoleWeatherTab.c:128
bool m_UIVisibilityState
Определения ScriptConsoleWeatherTab.c:212
SliderWidget m_RainInterpolationTimeSlider
Определения ScriptConsoleWeatherTab.c:61
string CopyValues()
Определения ScriptConsoleWeatherTab.c:774
static float m_SnowfallInterpolationTimeValue
Определения ScriptConsoleWeatherTab.c:92
void ReloadWeatherPresetsList()
Определения ScriptConsoleWeatherTab.c:446
SliderWidget m_RainValueGetSlider
Определения ScriptConsoleWeatherTab.c:57
TextWidget m_FogValueSetText
Определения ScriptConsoleWeatherTab.c:19
TextWidget m_FogInterpolationMaxText
Определения ScriptConsoleWeatherTab.c:24
Widget m_WeatherPresetsPanel
Определения ScriptConsoleWeatherTab.c:209
SliderWidget m_WindMValueSetSlider
Определения ScriptConsoleWeatherTab.c:140
TextWidget m_VolFogHeightDensityTimeMinText
Определения ScriptConsoleWeatherTab.c:116
static float m_WindDDurationTimeValue
Определения ScriptConsoleWeatherTab.c:177
TextWidget m_VolFogDistanceDensityTimeMaxText
Определения ScriptConsoleWeatherTab.c:105
static float m_VolFogHeightBiasTimeValue
Определения ScriptConsoleWeatherTab.c:137
class ScriptConsoleWeatherValues m_RPCTimer
static float m_WindMDurationTimeValue
Определения ScriptConsoleWeatherTab.c:157
void ~ScriptConsoleWeatherTab()
Определения ScriptConsoleWeatherTab.c:220
SliderWidget m_WindDValueSetSlider
Определения ScriptConsoleWeatherTab.c:160
TextWidget m_VolFogHeightBiasTimeSetText
Определения ScriptConsoleWeatherTab.c:130
TextWidget m_VolFogHeightDensityMaxText
Определения ScriptConsoleWeatherTab.c:111
void ButtonNormal(Widget w)
Определения ScriptConsoleWeatherTab.c:1534
EditBoxWidget m_WindMValueEditbox
Определения ScriptConsoleWeatherTab.c:151
TextWidget m_VolFogDistanceDensityTimeSetText
Определения ScriptConsoleWeatherTab.c:106
static float m_FogInterpolationTimeValue
Определения ScriptConsoleWeatherTab.c:32
SliderWidget m_WindMValueGetSlider
Определения ScriptConsoleWeatherTab.c:141
void LoadWeatherPreset()
Определения ScriptConsoleWeatherTab.c:1199
ButtonWidget m_SavePresetButton
Определения ScriptConsoleWeatherTab.c:201
SliderWidget m_SnowfallDurationTimeSlider
Определения ScriptConsoleWeatherTab.c:82
TextWidget m_RainDurationMaxText
Определения ScriptConsoleWeatherTab.c:65
TextWidget m_StandstormDurationText
Определения ScriptConsoleWeatherTab.c:181
EditBoxWidget m_RainInterpolationEditbox
Определения ScriptConsoleWeatherTab.c:68
TextWidget m_OvercastDurationMaxText
Определения ScriptConsoleWeatherTab.c:45
SliderWidget m_VolFogHeightBiasSlider
Определения ScriptConsoleWeatherTab.c:121
SliderWidget m_FogInterpolationTimeSlider
Определения ScriptConsoleWeatherTab.c:21
static float m_SnowfallValue
Определения ScriptConsoleWeatherTab.c:91
EditBoxWidget m_VolFogDistanceDensityEditbox
Определения ScriptConsoleWeatherTab.c:96
const int DURATION_MAX
Определения ScriptConsoleWeatherTab.c:13
SliderWidget m_WindMDurationTimeSlider
Определения ScriptConsoleWeatherTab.c:146
void OnListItemSelected(int row, int column)
Определения ScriptConsoleWeatherTab.c:1219
ButtonWidget m_StartSandstormButton
Определения ScriptConsoleWeatherTab.c:184
EditBoxWidget m_OvercastValueEditbox
Определения ScriptConsoleWeatherTab.c:47
TextWidget m_VolFogDistanceDensityMaxText
Определения ScriptConsoleWeatherTab.c:99
ButtonWidget m_ApplyButton
Определения ScriptConsoleWeatherTab.c:207
TextWidget m_VolFogHeightDensityTimeSetText
Определения ScriptConsoleWeatherTab.c:118
DebugSandstormRPCData GetSandstormRPCData(bool startStorm=false)
Определения ScriptConsoleWeatherTab.c:1424
SliderWidget m_VolFogDistanceDensitySlider
Определения ScriptConsoleWeatherTab.c:97
EditBoxWidget m_SnowfallDurationEditbox
Определения ScriptConsoleWeatherTab.c:89
ref ScriptConsolePresetsList m_WeatherPresetsList
Определения ScriptConsoleWeatherTab.c:214
SliderWidget m_OvercastValueSetSlider
Определения ScriptConsoleWeatherTab.c:36
TextWidget m_WindMInterpolationMaxText
Определения ScriptConsoleWeatherTab.c:148
void InvokeSendSandstormRPC()
Определения ScriptConsoleWeatherTab.c:1442
SliderWidget m_VolFogHeightDensitySlider
Определения ScriptConsoleWeatherTab.c:109
TextWidget m_RainValueSetText
Определения ScriptConsoleWeatherTab.c:59
void UpdateEditboxValues()
Определения ScriptConsoleWeatherTab.c:1022
static float m_VolFogDistanceDensityTimeValue
Определения ScriptConsoleWeatherTab.c:133
EditBoxWidget m_RainDurationEditbox
Определения ScriptConsoleWeatherTab.c:69
const int INTERPOLATION_MAX
Определения ScriptConsoleWeatherTab.c:12
EditBoxWidget m_RainValueEditbox
Определения ScriptConsoleWeatherTab.c:67
TextWidget m_OvercastValueSetText
Определения ScriptConsoleWeatherTab.c:39
static float m_FogDurationTimeValue
Определения ScriptConsoleWeatherTab.c:33
EditBoxWidget m_OvercastInterpolationEditbox
Определения ScriptConsoleWeatherTab.c:48
EditBoxWidget m_WindDDurationEditbox
Определения ScriptConsoleWeatherTab.c:173
ImageWidget m_HideUIIcon
Определения ScriptConsoleWeatherTab.c:197
TextWidget m_FogDurationMaxText
Определения ScriptConsoleWeatherTab.c:25
EditBoxWidget m_WindDInterpolationEditbox
Определения ScriptConsoleWeatherTab.c:172
ButtonWidget m_UpdateButton
Определения ScriptConsoleWeatherTab.c:206
TextWidget m_WindDValueSetText
Определения ScriptConsoleWeatherTab.c:163
bool m_CanUseMovement
Определения ScriptConsoleWeatherTab.c:217
SliderWidget m_WindDValueGetSlider
Определения ScriptConsoleWeatherTab.c:161
TextWidget m_StandstormSpeedText
Определения ScriptConsoleWeatherTab.c:182
void StopSandstormFromWeather()
Определения ScriptConsoleWeatherTab.c:1462
ScriptConsoleWeatherTab m_WeatherTab
Определения ScriptConsoleWeatherTab.c:190
SliderWidget m_OvercastDurationTimeSlider
Определения ScriptConsoleWeatherTab.c:42
void ButtonHighlight(Widget w)
Определения ScriptConsoleWeatherTab.c:1517
Widget m_Root
Определения SizeToChild.c:91
override bool OnMouseEnter(Widget w, int x, int y)
Определения UiHintPanel.c:561
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
Определения UiHintPanel.c:570
Super root of all classes in Enforce script.
Определения EnScript.c:11
float m_FogValue
Определения DebugWeatherRPCData.c:3
float m_RainDuration
Определения DebugWeatherRPCData.c:15
float m_OvercastInterpolation
Определения DebugWeatherRPCData.c:9
float m_SnowfallInterpolation
Определения DebugWeatherRPCData.c:11
float m_WindDirectionValue
Определения DebugWeatherRPCData.c:35
float m_SnowfallDuration
Определения DebugWeatherRPCData.c:16
float m_VolFogDistanceDensity
Определения DebugWeatherRPCData.c:18
float m_VolFogHeightBiasTime
Определения DebugWeatherRPCData.c:25
float m_WindMDuration
Определения DebugWeatherRPCData.c:33
float m_VolFogDistanceDensityTime
Определения DebugWeatherRPCData.c:19
float m_VolFogHeightDensityTime
Определения DebugWeatherRPCData.c:22
float m_WindDInterpolation
Определения DebugWeatherRPCData.c:36
float m_VolFogHeightDensity
Определения DebugWeatherRPCData.c:21
float m_SnowfallValue
Определения DebugWeatherRPCData.c:6
float m_WindDDuration
Определения DebugWeatherRPCData.c:37
float m_OvercastValue
Определения DebugWeatherRPCData.c:4
float m_FogInterpolation
Определения DebugWeatherRPCData.c:8
float m_FogDuration
Определения DebugWeatherRPCData.c:13
float m_RainValue
Определения DebugWeatherRPCData.c:5
float m_RainInterpolation
Определения DebugWeatherRPCData.c:10
float m_WindMInterpolation
Определения DebugWeatherRPCData.c:32
float m_VolFogHeightBias
Определения DebugWeatherRPCData.c:24
float m_OvercastDuration
Определения DebugWeatherRPCData.c:14
float m_WindMagnitudeValue
Определения DebugWeatherRPCData.c:31
Определения EnWidgets.c:354
Определения EnMath.c:7
The class that will be instanced (moddable)
Определения gameplay.c:389
proto native float GetRemainingMovementDuration()
Returns the remaining movement duration until the sandstorm reached its end (final) position at its c...
proto native float GetSpeed()
Returns the speed in m/s at which the sandstorm advances. The sandstorm must be active prior to this ...
proto native bool IsActive()
Returns whether sandstorm is currently active.
proto native float GetMagnitude()
Returns the magnitude of the sandstorm - the intensity independent of its position.
ScriptConsoleTabBase m_Parent
Определения ScriptConsoleTabBase.c:10
static void SetDefaultValues()
Определения ScriptConsoleWeatherTab.c:3
void ScriptConsoleWeatherWindTab(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
Определения ScriptConsoleWeatherTab.c:1556
ScriptConsoleWeatherTab m_WeatherTab
Определения ScriptConsoleWeatherTab.c:1554
proto bool Insert(func fn, int flags=EScriptInvokerInsertFlags.IMMEDIATE)
insert method to list
proto native ParamsReadContext GetReadContext()
proto native ParamsWriteContext GetWriteContext()
ScriptInvoker GetSandstormStartSI()
Определения ScriptedSandstormController.c:376
proto bool Write(void value_out)
Определения EnWidgets.c:220
Определения DayZPlayerImplement.c:39
proto native Fog GetFog()
Returns a fog phenomenon object.
proto native float GetDynVolFogHeightBias()
Returns the current 'dynamic' volumetric fog height bias in meters.
proto native WindMagnitude GetWindMagnitude()
Returns a wind magnitude phenomenon object.
proto native Sandstorm GetSandstorm()
Returns the sandstorm phenomenon weather controller.
proto native Snowfall GetSnowfall()
Returns a snowfall phenomenon object.
proto native WindDirection GetWindDirection()
Returns a wind direction phenomenon object.
proto native Rain GetRain()
Returns a rain phenomenon object.
proto native Overcast GetOvercast()
Returns an overcast phenomenon object.
proto native float GetDynVolFogHeightDensity()
Returns the current 'dynamic' volumetric fog height density.
proto native float GetDynVolFogDistanceDensity()
Returns the current 'dynamic' volumetric fog distance density.
Определения Weather.c:168
proto native float GetActual()
Определения EnWidgets.c:190
proto string ToString(bool simple=true)
Serializer ParamsReadContext
Определения gameplay.c:15
Serializer ParamsWriteContext
Определения gameplay.c:16
enum ShapeType ErrorEx
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
class array< Class T > TStringArray
KeyCode
Определения EnSystem.c:157
proto native int KeyState(KeyCode key)
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
MouseState
Определения EnSystem.c:311
proto native int GetMouseState(MouseState index)
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
Определения EnString.c:396
proto native Widget GetFocus()
proto native volatile void Update()
Определения PlayerSoundManager.c:125
proto native Widget GetWidgetUnderCursor()
int ARGB(int a, int r, int g, int b)
Определения proto.c:322