Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ButtonEffectSound.c
Go to the documentation of this file.
1 [BaseContainerProps(configRoot : true), SCR_ButtonEffectTitleAttribute("Sound", "")]
3 class SCR_ButtonEffectSound : SCR_ButtonEffectBase
4 {
5  [Attribute(SCR_SoundEvent.CLICK, UIWidgets.EditBox, "")]
6  protected string m_sSound;
7 
8  //------------------------------------------------------------------------------------------------
9  override void OnStateDefault(bool instant)
10  {
11  Apply(instant);
12  }
13 
14  //------------------------------------------------------------------------------------------------
15  override void OnStateHovered(bool instant)
16  {
17  Apply(instant);
18  }
19 
20  //------------------------------------------------------------------------------------------------
21  override void OnStateActivated(bool instant)
22  {
23  Apply(instant);
24  }
25 
26  //------------------------------------------------------------------------------------------------
27  override void OnStateActivatedHovered(bool instant)
28  {
29  Apply(instant);
30  }
31 
32  //------------------------------------------------------------------------------------------------
33  override void OnStateDisabled(bool instant)
34  {
35  Apply(instant);
36  }
37 
38  //------------------------------------------------------------------------------------------------
39  override void OnStateDisabledActivated(bool instant)
40  {
41  Apply(instant);
42  }
43 
44  //------------------------------------------------------------------------------------------------
45  override void OnClicked(bool instant)
46  {
47  Apply(instant);
48  }
49 
50  //------------------------------------------------------------------------------------------------
51  override void OnFocusGained(bool instant)
52  {
53  Apply(instant);
54  }
55 
56  //------------------------------------------------------------------------------------------------
57  override void OnFocusLost(bool instant)
58  {
59  Apply(instant);
60  }
61 
62  //------------------------------------------------------------------------------------------------
63  override void OnToggledOn(bool instant)
64  {
65  Apply(instant);
66  }
67 
68  //------------------------------------------------------------------------------------------------
69  override void OnToggledOff(bool instant)
70  {
71  Apply(instant);
72  }
73 
74  //------------------------------------------------------------------------------------------------
75  override void OnMouseEnter(bool instant)
76  {
77  Apply(instant);
78  }
79 
80  //------------------------------------------------------------------------------------------------
81  override void OnMouseLeave(bool instant)
82  {
83  Apply(instant);
84  }
85 
86  //------------------------------------------------------------------------------------------------
87  protected void Apply(bool instant)
88  {
89  if (!instant && !m_sSound.IsEmpty())
90  SCR_UISoundEntity.SoundEvent(m_sSound);
91  }
92 }
SCR_UISoundEntity
Definition: SCR_UISoundEntity.c:7
SCR_SoundEvent
Definition: SCR_SoundEvent.c:1
SCR_ButtonEffectSound
Plays a sound.
Definition: SCR_ButtonEffectSound.c:3
Attribute
typedef Attribute
Post-process effect of scripted camera.
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468