Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_InputButtonDisplay.c
Go to the documentation of this file.
2{
3 protected const float HOLD_ANIMATION_FAILED_ANIMATION_SPEED = -2.5;
4
5 protected string m_sButtonText;
6 protected ref array<ref SCR_ButtonTexture> m_aButtonTextures = {};
10
11 protected ref array<ImageWidget> m_aAdditionalWidgets = {};
12
13 protected int m_iWidth;
14 protected float m_fMediumButtonWidhtModifier = 1.5;
15 protected float m_fLargeButtonWidhtModifier = 1.78;
16 protected float m_fButtonTextSizeModifier = 3;
17
20 protected float m_fMaxHoldtime;
21 protected float m_fDoubleTapTime;
24
25 protected bool m_bIsHoldAction;
26 protected bool m_bIsHoldActionOnce;
27 protected bool m_bIsDoubleTapAction;
28 protected bool m_bPressedInput;
29 protected bool m_bCanBeToggled;
30 protected bool m_bIsContinuous;
31 protected bool m_bIsToggled;
32 protected bool m_bIsOverwritten;
33 protected bool m_bIsUsingImage;
34 protected bool m_bIsUsingImageGlow;
35 protected bool m_bIsUsingText;
36
37 protected bool m_bKeybindActive = true;
38
42
43 protected Widget m_wRoot;
44 protected Widget m_wParent;
45
57
58 //------------------------------------------------------------------------------------------------
59 override void HandlerAttached(Widget w)
60 {
61 super.HandlerAttached(w);
62
63 m_wRoot = w;
64
65 m_wOverlay = OverlayWidget.Cast(m_wRoot.FindAnyWidget("m_Overlay"));
66 m_wShadowOverlay = OverlayWidget.Cast(m_wRoot.FindAnyWidget("Shadow_Overlay"));
67 m_wGlow = ImageWidget.Cast(m_wRoot.FindAnyWidget("m_Glow"));
68 m_wOutlineClear = ImageWidget.Cast(m_wRoot.FindAnyWidget("m_OutlineClear"));
69 m_wOutline = ImageWidget.Cast(m_wRoot.FindAnyWidget("m_Outline"));
70 m_wKeyBG = ImageWidget.Cast(m_wRoot.FindAnyWidget("m_KeyBG"));
71 m_wDoubleTabIndicator = ImageWidget.Cast(m_wRoot.FindAnyWidget("m_DoubleTabIndicator"));
72 m_wButtonImgGlow = ImageWidget.Cast(m_wRoot.FindAnyWidget("m_ButtonImgGlow"));
73 m_wButtonImg = ImageWidget.Cast(m_wRoot.FindAnyWidget("m_ButtonImg"));
74 m_wHoldIndicator = ImageWidget.Cast(m_wRoot.FindAnyWidget("m_HoldIndicator"));
75 m_wButtonText = RichTextWidget.Cast(m_wRoot.FindAnyWidget("m_ButtonText"));
76 }
77
78 //------------------------------------------------------------------------------------------------
81 void Init(Widget parent)
82 {
83 m_wParent = parent;
84 if (!m_wParent)
85 return;
86
89 return;
90
91 m_fAnimationRate = m_InputButtonComp.GetAnimationRate();
92 m_fAnimationTime = m_InputButtonComp.GetAnimationTime();
93
94 m_InputButtonComp.GetOnAnimateHover().Insert(AnimateHover);
95 m_InputButtonComp.GetOnUpdateEnableColor().Insert(UpdateEnableColor);
96 m_InputButtonComp.GetOnHoldAnimComplete().Insert(AnimateClick);
97 }
98
99 //------------------------------------------------------------------------------------------------
105 {
106 m_bIsUsingImage = false;
107 m_bIsUsingText = false;
108 m_bIsUsingImageGlow = false;
109
110 GetFilter(filter);
111
112 data.Get("m_sText", m_sButtonText);
113 data.Get("m_aTextures", m_aButtonTextures);
114 data.Get("m_eType", m_eButtonType);
115
116 GameProject.GetModuleConfig("ChimeraGlobalConfig").Get("InputButtonLayoutConfig", m_sButtonLayoutConfig);
117
118 Resource resource = BaseContainerTools.LoadContainer(m_sButtonLayoutConfig);
119 if (!resource || !resource.IsValid())
120 {
121 Print("Cannot load " + m_sButtonLayoutConfig + " | " + FilePath.StripPath(__FILE__) + ":" + __LINE__, LogLevel.WARNING);
122 return false;
123 }
124
125 SCR_InputButtonLayoutConfig m_cInput = SCR_InputButtonLayoutConfig.Cast(BaseContainerTools.CreateInstanceFromContainer(resource.GetResource().ToBaseContainer()));
126
127 m_ButtonLayout = m_cInput.GetButtonSize(m_eButtonType);
128
129 m_fHoldIndicatorDefaultPosition = {0, m_InputButtonComp.m_fHoldIndicatorDefaultPosition};
130 m_fHoldIndicatorAnimationPosition = {0, m_InputButtonComp.m_fHoldIndicatorHoldPosition};
131
133 return false;
134
137
138 m_wOutline.SetVisible(m_bIsHoldAction);
142
144 GetGame().GetCallqueue().Call(UpdateEnableColor);
145
146 return false;
147 }
148
149 //------------------------------------------------------------------------------------------------
150 void ForceSetHoldAction(bool state)
151 {
152 m_bIsHoldAction = state;
153
156 }
157
158 //------------------------------------------------------------------------------------------------
161 void OverrideTexture(string imagePath, string image = string.Empty, Color color = Color.White, SCR_EButtonSize buttonType = SCR_EButtonSize.KEYBOARD_MEDIUM, bool setOverride = true)
162 {
163 m_bIsOverwritten = setOverride;
164 m_bIsUsingImage = false;
165 m_bIsUsingText = false;
166 m_bIsUsingImageGlow = false;
167
168 GameProject.GetModuleConfig("ChimeraGlobalConfig").Get("InputButtonLayoutConfig", m_sButtonLayoutConfig);
169
170 Resource resource = BaseContainerTools.LoadContainer(m_sButtonLayoutConfig);
171 if (!resource || !resource.IsValid())
172 {
173 Print("Cannot load " + m_sButtonLayoutConfig + " | " + FilePath.StripPath(__FILE__) + ":" + __LINE__, LogLevel.WARNING);
174 return;
175 }
176
177 SCR_InputButtonLayoutConfig m_cInput = SCR_InputButtonLayoutConfig.Cast(BaseContainerTools.CreateInstanceFromContainer(resource.GetResource().ToBaseContainer()));
178 if (!m_cInput)
179 {
180 Print("Wrong config type " + m_sButtonLayoutConfig + " | " + FilePath.StripPath(__FILE__) + ":" + __LINE__, LogLevel.WARNING);
181 return;
182 }
183
184 m_eButtonType = buttonType;
185 m_ButtonLayout = m_cInput.GetButtonSize(m_eButtonType);
186
187 if (!m_ButtonLayout)
188 return;
189
191
192 m_wKeyBG.LoadImageFromSet(0, m_ButtonLayout.m_sImageSet, m_ButtonLayout.m_sKeyBackground);
193 m_wOutline.LoadImageFromSet(0, m_ButtonLayout.m_sImageSet, m_ButtonLayout.m_sKeyOutline);
194 m_wOutlineClear.LoadImageFromSet(0, m_ButtonLayout.m_sImageSet, m_ButtonLayout.m_sKeyOutline);
195 m_wGlow.LoadImageFromSet(0, m_ButtonLayout.m_sGlowImageSet, m_ButtonLayout.m_sGlow);
196 m_wHoldIndicator.LoadImageFromSet(0, m_ButtonLayout.m_sImageSet, m_ButtonLayout.m_sHoldIndicator);
197
198 GetWidth();
199
200 m_wKeyBG.SetSize(m_iWidth, m_InputButtonComp.m_iHeightInPixel);
201 m_wOutline.SetSize(m_iWidth, m_InputButtonComp.m_iHeightInPixel);
202 m_wOutlineClear.SetSize(m_iWidth, m_InputButtonComp.m_iHeightInPixel);
203 m_wGlow.SetSize(m_iWidth, m_InputButtonComp.m_iHeightInPixel);
204 m_wHoldIndicator.SetSize(m_InputButtonComp.m_iHeightInPixel, (m_InputButtonComp.m_iHeightInPixel * 0.5));
205
206 m_wButtonText.SetVisible(false);
207
208 if (image)
209 m_wButtonImg.LoadImageFromSet(0, imagePath, image);
210 else
211 m_wButtonImg.LoadImageTexture(0, imagePath);
212
213 m_wButtonImg.SetColor(Color.FromInt(color.PackToInt()));
214
215 if (m_bKeybindActive)
216 m_wButtonImg.SetVisible(true);
217
218 m_bIsUsingImage = true;
219
220 m_wButtonImg.SetSize(m_InputButtonComp.m_iHeightInPixel * 0.5, m_InputButtonComp.m_iHeightInPixel * 0.5);
221 }
222
223 //------------------------------------------------------------------------------------------------
226 void ChangeInputVisibility(bool visible)
227 {
228 m_bKeybindActive = visible;
229
230 if (visible)
231 {
232 // Check if an Image or Text is used for this Button, to enable the correct widgets
234 m_wButtonImg.SetVisible(true);
235
237 m_wButtonImgGlow.SetVisible(true);
238
240 m_wButtonText.SetVisible(true);
241 }
242 else
243 {
244 if (m_wButtonImg)
245 m_wButtonImg.SetVisible(false);
246
248 m_wButtonImgGlow.SetVisible(false);
249
250 if (m_wButtonText)
251 m_wButtonText.SetVisible(false);
252 }
253 }
254
255 //------------------------------------------------------------------------------------------------
258 void Resize()
259 {
260 GetWidth();
261
262 m_wKeyBG.SetSize(m_iWidth, m_InputButtonComp.m_iHeightInPixel);
263 m_wOutline.SetSize(m_iWidth, m_InputButtonComp.m_iHeightInPixel);
264 m_wOutlineClear.SetSize(m_iWidth, m_InputButtonComp.m_iHeightInPixel);
265 m_wGlow.SetSize(m_iWidth, m_InputButtonComp.m_iHeightInPixel);
266 m_wHoldIndicator.SetSize(m_InputButtonComp.m_iHeightInPixel, (m_InputButtonComp.m_iHeightInPixel * 0.5));
267
269 {
270 m_wButtonImg.SetSize(m_InputButtonComp.m_iHeightInPixel * 0.5, m_InputButtonComp.m_iHeightInPixel * 0.5);
271 }
272 else
273 {
274 m_wButtonImg.SetSize(m_InputButtonComp.m_iHeightInPixel, m_InputButtonComp.m_iHeightInPixel);
275 m_wButtonImgGlow.SetSize(m_InputButtonComp.m_iHeightInPixel, m_InputButtonComp.m_iHeightInPixel);
276 }
277
278 m_wButtonText.SetDesiredFontSize((int)m_InputButtonComp.m_iHeightInPixel / m_fButtonTextSizeModifier);
279
280
281 if (m_aAdditionalWidgets && !m_aButtonTextures.IsEmpty())
282 {
283 foreach (ImageWidget widget : m_aAdditionalWidgets)
284 {
285 widget.SetSize(m_InputButtonComp.m_iHeightInPixel, m_InputButtonComp.m_iHeightInPixel);
286 }
287 }
288 }
289
290 //------------------------------------------------------------------------------------------------
291 protected void GetFilter(BaseContainer filter)
292 {
293 m_bIsHoldAction = false;
294 m_bIsHoldActionOnce = false;
295 m_bIsDoubleTapAction = false;
296 m_bPressedInput = false;
297 m_bCanBeToggled = false;
298 m_bIsContinuous = false;
299
300 if (!filter)
301 return;
302
303 switch (filter.GetClassName())
304 {
305 case "InputFilterHold":
306 m_bIsHoldAction = true;
307 break;
308 case "InputFilterHoldOnce":
309 {
310 m_bIsHoldActionOnce = true;
311 m_bIsHoldAction = true;
312 break;
313 }
314 case "InputFilterDoubleClick":
316 break;
317 case "InputFilterPressed":
318 m_bPressedInput = true;
319 break;
320 case "InputFilterToggle":
321 m_bCanBeToggled = true;
322 break;
323 case "InputFilterValue":
324 m_bIsContinuous = true;
325 break;
326 }
327 }
328
329 //------------------------------------------------------------------------------------------------
332 protected bool ApplyTextureToButton()
333 {
334 m_wKeyBG.LoadImageFromSet(0, m_ButtonLayout.m_sImageSet, m_ButtonLayout.m_sKeyBackground);
335 m_wOutline.LoadImageFromSet(0, m_ButtonLayout.m_sImageSet, m_ButtonLayout.m_sKeyOutline);
336 m_wOutlineClear.LoadImageFromSet(0, m_ButtonLayout.m_sImageSet, m_ButtonLayout.m_sKeyOutline);
337 m_wHoldIndicator.LoadImageFromSet(0, m_ButtonLayout.m_sImageSet, m_ButtonLayout.m_sHoldIndicator);
338
339
340 if (m_bIsHoldAction)
341 {
342 m_wGlow.LoadImageFromSet(0, m_ButtonLayout.m_sGlowImageSet, m_ButtonLayout.m_sGlowOutline);
343 m_wOutline.LoadMaskFromSet(m_ButtonLayout.m_sImageSet, m_ButtonLayout.m_sAlphaMask);
344 }
345 else
346 {
347 m_wGlow.LoadImageFromSet(0, m_ButtonLayout.m_sGlowImageSet, m_ButtonLayout.m_sGlow);
348 }
349
350 m_wDoubleTabIndicator.LoadImageFromSet(0, m_ButtonLayout.m_sImageSet, m_ButtonLayout.m_sDoubleTabText);
351
352 GetWidth();
353
354 m_wKeyBG.SetSize(m_iWidth, m_InputButtonComp.m_iHeightInPixel);
355 m_wOutline.SetSize(m_iWidth, m_InputButtonComp.m_iHeightInPixel);
356 m_wOutlineClear.SetSize(m_iWidth, m_InputButtonComp.m_iHeightInPixel);
357 m_wGlow.SetSize(m_iWidth, m_InputButtonComp.m_iHeightInPixel);
358 m_wDoubleTabIndicator.SetSize(m_InputButtonComp.m_iHeightInPixel, m_InputButtonComp.m_iHeightInPixel);
359 m_wHoldIndicator.SetSize(m_InputButtonComp.m_iHeightInPixel, (m_InputButtonComp.m_iHeightInPixel * 0.5));
360
362 if (m_aButtonTextures && !m_aButtonTextures.IsEmpty())
363 {
364 m_wButtonImg.LoadImageFromSet(0, m_ButtonLayout.m_sImageSet, m_aButtonTextures[0].m_sTexture);
366
368 m_wButtonImg.SetVisible(true);
369
370 m_bIsUsingImage = true;
371
372 if (m_aButtonTextures[0].m_bHasShadow)
373 {
374 m_wButtonImgGlow.LoadImageFromSet(0, m_ButtonLayout.m_sGlowImageSet, m_aButtonTextures[0].m_sTexture);
375
377 m_wButtonImgGlow.SetVisible(true);
378
379 m_bIsUsingImageGlow = true;
380 }
381 else
382 {
383 m_wButtonImgGlow.SetVisible(false);
384 }
385
386 m_wButtonImg.SetSize(m_InputButtonComp.m_iHeightInPixel, m_InputButtonComp.m_iHeightInPixel);
387 m_wButtonImgGlow.SetSize(m_InputButtonComp.m_iHeightInPixel, m_InputButtonComp.m_iHeightInPixel);
389 if (!m_aAdditionalWidgets.IsEmpty())
391
392 if (m_aButtonTextures.Count() > 1)
394 }
395 else
396 {
398 m_wButtonText.SetVisible(true);
399
400 m_bIsUsingText = true;
401
402 m_wButtonImg.SetVisible(false);
403 m_wButtonImgGlow.SetVisible(false);
405 if (!m_aAdditionalWidgets.IsEmpty())
407 }
408
410 m_wButtonText.SetDesiredFontSize((int)m_InputButtonComp.m_iHeightInPixel / m_fButtonTextSizeModifier);
411
412 m_wOutlineClear.SetColor(m_ButtonLayout.m_OutlineColor);
413
414 return false;
415 }
416
417 //------------------------------------------------------------------------------------------------
418 protected void GetWidth()
419 {
421 switch (m_eButtonType)
422 {
423 case SCR_EButtonSize.KEYBOARD_MEDIUM:
425 break;
426 case SCR_EButtonSize.KEYBOARD_BIG:
428 break;
429 //Square keyboard button + Gamepad / Mouse buttons
430 default:
431 m_iWidth = m_InputButtonComp.m_iHeightInPixel;
432 break;
433 }
434 }
435
436 //------------------------------------------------------------------------------------------------
439 protected bool CreateAdditionalWidgets()
440 {
441 for (int i = 1, count = m_aButtonTextures.Count(); i < count; i++)
442 {
444 if (m_aButtonTextures[i].m_bHasShadow)
445 {
446 Widget w_additionalShadow = GetGame().GetWorkspace().CreateWidget(WidgetType.ImageWidgetTypeID, WidgetFlags.VISIBLE | WidgetFlags.BLEND | WidgetFlags.STRETCH | WidgetFlags.IGNORE_CURSOR | WidgetFlags.INHERIT_CLIPPING, new Color(0.000000, 0.000000, 0.000000, 0.502007), 0, m_wShadowOverlay);
447 ImageWidget additionalWidgetshadow = ImageWidget.Cast(w_additionalShadow);
448 additionalWidgetshadow.LoadImageFromSet(0, m_ButtonLayout.m_sGlowImageSet, m_aButtonTextures[i].m_sTexture);
449 additionalWidgetshadow.SetSize(m_InputButtonComp.m_iHeightInPixel, m_InputButtonComp.m_iHeightInPixel);
450 m_aAdditionalWidgets.Insert(additionalWidgetshadow);
451 }
452
453 Widget w_additional = GetGame().GetWorkspace().CreateWidget(WidgetType.ImageWidgetTypeID, WidgetFlags.VISIBLE | WidgetFlags.BLEND | WidgetFlags.STRETCH | WidgetFlags.IGNORE_CURSOR | WidgetFlags.INHERIT_CLIPPING, m_aButtonTextures[i].m_Color, 0, m_wOverlay);
454 ImageWidget additionalWidget = ImageWidget.Cast(w_additional);
455 additionalWidget.LoadImageFromSet(0, m_ButtonLayout.m_sImageSet, m_aButtonTextures[i].m_sTexture);
456 additionalWidget.SetSize(m_InputButtonComp.m_iHeightInPixel, m_InputButtonComp.m_iHeightInPixel);
457 m_aAdditionalWidgets.Insert(additionalWidget);
458 }
459 return false;
460 }
461
462 //------------------------------------------------------------------------------------------------
464 protected bool DeleteAdditionalWidgets()
465 {
466 foreach (ImageWidget img : m_aAdditionalWidgets)
467 {
468 if (img)
469 img.RemoveFromHierarchy();
470 }
471
472 m_aAdditionalWidgets.Clear();
473 return false;
474 }
475
476 //------------------------------------------------------------------------------------------------
479 void ActionPressed(bool isHoldAction = false)
480 {
481 if (m_bIsHoldAction)
482 {
483 AnimateHold();
484 return;
485 }
486
487 if (isHoldAction)
488 return;
489
490 if (m_bCanBeToggled)
491 {
493 return;
494 }
495
497 {
498 OnDoubleTap();
499 return;
500 }
501
502 if (m_bIsContinuous)
503 {
505 return;
506 }
507
508 AnimateClick();
509 }
510
511 //------------------------------------------------------------------------------------------------
539
540 //------------------------------------------------------------------------------------------------
541 protected void SetToggled(bool toggled, bool animate = true, bool invokeChange = true)
542 {
543 if (!m_bCanBeToggled)
544 return;
545
546 m_bIsToggled = toggled;
547 m_InputButtonComp.PlaySoundClicked();
548
549 AnimateClick();
550
551 if (m_bIsToggled)
553 else
554 ResetColor();
555 }
556
557 //------------------------------------------------------------------------------------------------
560 {
561 ChimeraWorld world = GetGame().GetWorld();
562 WorldTimestamp replicationTime = world.GetServerTimestamp();
563
564 if (!m_InputButtonComp.m_bIsDoubleTapStated)
565 {
567 m_fDoubleTapTime = replicationTime.DiffMilliseconds(replicationTime);
568 !m_InputButtonComp.m_bIsDoubleTapStated = true;
569 }
570 else
571 {
572 if (replicationTime.DiffMilliseconds(replicationTime) - m_fDoubleTapTime <= m_InputButtonComp.m_iDoubleTapThreshold)
573 {
575 }
576 else
577 {
578 ResetColor();
579 }
580
581 !m_InputButtonComp.m_bIsDoubleTapStated = false;
582 }
583 }
584
585 //------------------------------------------------------------------------------------------------
587 {
588 return m_wOutline;
589 }
590
591 //------------------------------------------------------------------------------------------------
593 {
594 return m_wKeyBG;
595 }
596
597 //------------------------------------------------------------------------------------------------
599 protected void AnimateHover()
600 {
602 return;
603
604 if (m_InputButtonComp.m_bIsHovered)
605 {
607 }
608 else
609 {
610 if (m_bIsToggled)
612 else
613 ResetColor();
614 }
615 }
616
617 //------------------------------------------------------------------------------------------------
619 protected void AnimateClick()
620 {
621 if (m_bCanBeToggled)
622 return;
623
625 {
628
630 GetGame().GetCallqueue().CallLater(ResetColor, m_fAnimationTime * 600 + 1, false);
631 }
632 }
633
634 //------------------------------------------------------------------------------------------------
636 {
637 m_wOutline.SetMaskProgress(0);
638
640 m_HoldingAnimation = SCR_InputButtonAnimations.ButtonAlphaMask(m_wOutline, 1, (1 / m_InputButtonComp.m_fMaxHoldtime), true);
641 else
642 m_HoldingAnimation = SCR_InputButtonAnimations.ButtonAlphaMask(m_wOutline, 1, (1 / m_InputButtonComp.m_fMaxHoldtime), false);
643
645 }
646
647 //------------------------------------------------------------------------------------------------
649 {
652
654
655 m_InputButtonComp.GetOnHoldAnimComplete().Invoke(this);
656 }
657
658 //------------------------------------------------------------------------------------------------
663
664 //------------------------------------------------------------------------------------------------
665 protected void AnimateDoubleTab()
666 {
667 if (!m_InputButtonComp.m_bIsDoubleTapStated)
668 {
670
671 m_wKeyBG.SetColor(m_InputButtonComp.m_ActionHovered);
673 GetGame().GetCallqueue().CallLater(ResetColor, m_fAnimationTime * 300 + 1, false);
674 }
675 else
676 {
678 m_wKeyBG.SetColor(Color.FromInt(Color.WHITE));
680 GetGame().GetCallqueue().CallLater(ResetColor, m_fAnimationTime * 300 + 1, false);
681 }
682 }
683
684 //------------------------------------------------------------------------------------------------
685 protected void AnimateToggle()
686 {
688 }
689
690 //------------------------------------------------------------------------------------------------
696
697 //------------------------------------------------------------------------------------------------
700 {
702
703 if (!m_wParent.IsEnabled())
704 {
706 }
707 else
708 {
709 if (m_InputButtonComp.m_bIsHovered)
710 AnimateHover();
711 else
713 }
714
715
716 GetGame().GetCallqueue().Remove(ResetColor);
717 }
718
719 //------------------------------------------------------------------------------------------------
721 protected void UpdateEnableColor()
722 {
723 Color color;
724 if (!m_wParent.IsEnabled() && m_InputButtonComp.m_bCanBeDisabled)
725 {
726 color = Color.FromInt(m_InputButtonComp.m_ActionDisabled.PackToInt());
727 if (m_InputButtonComp.m_bChangeLabelColorOnDisabled)
728 m_InputButtonComp.SetLabelColor(color);
729 }
730 else
731 {
732 color = m_InputButtonComp.m_ActionDefault;
733 m_InputButtonComp.SetLabelColor(Color.FromInt(m_InputButtonComp.m_LabelDefault.PackToInt()));
734 }
735
737 m_wKeyBG.SetColor(color);
738
740 {
741 if (m_wParent.IsEnabled())
742 m_wDoubleTabIndicator.SetColor(Color.FromInt(Color.WHITE));
743 else if (m_InputButtonComp.m_bCanBeDisabled)
744 m_wDoubleTabIndicator.SetColor(Color.FromInt(m_InputButtonComp.m_ActionDisabled.PackToInt()));
745 }
746 }
747
748 //------------------------------------------------------------------------------------------------
750 {
752 }
753
754 //------------------------------------------------------------------------------------------------
756 {
757 return m_bIsOverwritten;
758 }
759
760 //------------------------------------------------------------------------------------------------
761 void SetIsOverwritten(bool setOverride)
762 {
763 m_bIsOverwritten = setOverride;
764 }
765}
ArmaReforgerScripted GetGame()
Definition game.c:1398
Get all prefabs that have the spawner data
ref Color m_Color
SCR_EButtonSize
static bool StopAnimation(Widget w, typename typeName)
static WidgetAnimationOpacity Opacity(Widget widget, float targetValue, float speed, bool toggleVisibility=false)
static WidgetAnimationPosition Position(Widget widget, float position[2], float speed)
static WidgetAnimationColor Color(Widget widget, Color color, float speed)
static bool IsAnimating(Widget w)
Definition Color.c:13
Object holding reference to resource. In destructor release the resource.
Definition Resource.c:25
WidgetAnimationPosition m_HoldIndicatorAnimation
bool DeleteAdditionalWidgets()
Go through all previosly created Widgets and delete them, to keep the widget clean.
void AnimateClick()
Animate Widget when action is performed.
void GetFilter(BaseContainer filter)
bool SetAction(BaseContainer data, BaseContainer filter)
void AnimateHover()
Animate Widget when mouse hovers over it.
void UpdateEnableColor()
Sets the correct color when Widget is initialized. (Active or disabled).
void ActionPressed(bool isHoldAction=false)
WidgetAnimationAlphaMask m_HoldingAnimation
void OverrideTexture(string imagePath, string image=string.Empty, Color color=Color.White, SCR_EButtonSize buttonType=SCR_EButtonSize.KEYBOARD_MEDIUM, bool setOverride=true)
void ChangeInputVisibility(bool visible)
override void HandlerAttached(Widget w)
ref array< ref SCR_ButtonTexture > m_aButtonTextures
void SetIsOverwritten(bool setOverride)
SCR_InputButtonComponent m_InputButtonComp
void SetToggled(bool toggled, bool animate=true, bool invokeChange=true)
ref array< ImageWidget > m_aAdditionalWidgets
const float HOLD_ANIMATION_FAILED_ANIMATION_SPEED
SCR_InputButtonStyle m_ButtonLayout
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
WidgetFlags
Widget flags. See enf::Widget::SetFlags().
Definition WidgetFlags.c:14