Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SoundEventComponent.c
Go to the documentation of this file.
1 class SCR_SoundEventComponent : ScriptedWidgetComponent
2 {
3  [Attribute()]
4  string m_sSoundMouseEnter;
5 
6  [Attribute()]
7  string m_sSoundMouseLeave;
8 
9  [Attribute()]
10  string m_sSoundFocus;
11 
12  [Attribute()]
13  string m_sSoundFocusLost;
14 
15  [Attribute()]
16  string m_sSoundClick;
17 
18  [Attribute()]
19  string m_sSoundMouseButtonDown;
20 
21  [Attribute()]
22  string m_sSoundMouseButtonUp;
23 
24  //------------------------------------------------------------------------------------------------
25  override bool OnMouseEnter(Widget w, int x, int y)
26  {
27  if (m_sSoundMouseEnter != string.Empty)
28  SCR_UISoundEntity.SoundEvent(m_sSoundMouseEnter);
29  return false;
30  }
31 
32  //------------------------------------------------------------------------------------------------
33  override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
34  {
35  if (m_sSoundMouseLeave != string.Empty)
36  SCR_UISoundEntity.SoundEvent(m_sSoundMouseLeave);
37  return false;
38  }
39 
40  //------------------------------------------------------------------------------------------------
41  override bool OnFocus(Widget w, int x, int y)
42  {
43  if (m_sSoundFocus != string.Empty)
44  SCR_UISoundEntity.SoundEvent(m_sSoundFocus);
45  return false;
46  }
47 
48  //------------------------------------------------------------------------------------------------
49  override bool OnFocusLost(Widget w, int x, int y)
50  {
51  if (m_sSoundFocusLost != string.Empty)
52  SCR_UISoundEntity.SoundEvent(m_sSoundFocusLost);
53  return false;
54  }
55 
56  //------------------------------------------------------------------------------------------------
57  override bool OnClick(Widget w, int x, int y, int button)
58  {
59  if (m_sSoundClick != string.Empty)
60  SCR_UISoundEntity.SoundEvent(m_sSoundClick);
61  return false;
62  }
63 
64  //------------------------------------------------------------------------------------------------
65  override bool OnMouseButtonDown(Widget w, int x, int y, int button)
66  {
67  if (m_sSoundMouseButtonDown != string.Empty)
68  SCR_UISoundEntity.SoundEvent(m_sSoundMouseButtonDown);
69  return false;
70  }
71 
72  //------------------------------------------------------------------------------------------------
73  override bool OnMouseButtonUp(Widget w, int x, int y, int button)
74  {
75  if (m_sSoundMouseButtonUp != string.Empty)
76  SCR_UISoundEntity.SoundEvent(m_sSoundMouseButtonUp);
77  return false;
78  }
79 };
SCR_UISoundEntity
Definition: SCR_UISoundEntity.c:7
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_SoundEventComponent
Definition: SCR_SoundEventComponent.c:1