9 proto native
bool CanClose();
10 proto native
bool CanCloseOnEscape();
14 proto native
void DestroySubmenu();
15 proto native
bool IsAnyMenuVisible();
16 proto native
bool IsVisible();
17 proto native
bool IsClosing();
21 proto native
bool IsCreatedHidden();
26 void OnVisibilityChanged(
bool isVisible)
31 proto native
void Close();
34 #ifdef PLATFORM_CONSOLE
35 return GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer();
42 #ifdef PLATFORM_CONSOLE
43 return GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer();
70 private Widget m_AnimAlphaWidget;
71 private bool m_AnimAlphaIsIncreasing;
72 private float m_AnimAlphaValue;
75 Widget GetLayoutRoot()
83 if (IsCreatedHidden())
90 GetGame().GetUIManager().ShowUICursor(
true);
104 void UnlockControls()
107 if (IsCreatedHidden())
116 if (GetParentMenu() && GetParentMenu().
UseMouse())
118 GetGame().GetUIManager().ShowUICursor(
true);
122 GetGame().GetUIManager().ShowUICursor(
false);
151 override int GetID() {
155 void SetWidgetAnimAlpha( Widget widget )
157 m_AnimAlphaValue = 0.3;
158 m_AnimAlphaWidget = widget;
178 m_PlayerDeathInvoker =
g_Game.GetPlayer().GetOnDeathStart();
179 m_PlayerDeathInvoker.Insert( OnPlayerDeath );
187 if (m_PlayerDeathInvoker)
189 m_PlayerDeathInvoker.Remove( OnPlayerDeath, EScriptInvokerRemoveFlags.NONE );
190 m_PlayerDeathInvoker = null;
195 void Update(
float timeslice)
197 #ifdef PLATFORM_CONSOLE
198 if ( m_AnimAlphaWidget )
200 float anim_speed = 1.2;
201 float anim_value_max = 1.0;
202 float anim_value_min = 0.3;
203 if ( m_AnimAlphaIsIncreasing )
205 m_AnimAlphaValue += anim_speed * timeslice;
207 if ( m_AnimAlphaValue >= anim_value_max )
209 m_AnimAlphaValue = anim_value_max;
210 m_AnimAlphaIsIncreasing =
false;
215 m_AnimAlphaValue -= anim_speed * timeslice;
217 if ( m_AnimAlphaValue <= anim_value_min )
219 m_AnimAlphaValue = anim_value_min;
220 m_AnimAlphaIsIncreasing =
true;
225 m_AnimAlphaWidget.SetAlpha( m_AnimAlphaValue );
236 proto native
void SetFadingPanels(Widget panel0, Widget panel1, Widget panel2, Widget panel3, Widget panel4);
238 bool OnClick(Widget w,
int x,
int y,
int button)
259 if (
UIScriptedWindow.GetActiveWindows().GetElement( i ).OnModalResult( w,
x,
y, code, result ) )
268 bool OnDoubleClick(Widget w,
int x,
int y,
int button)
274 if (
UIScriptedWindow.GetActiveWindows().GetElement( i ).OnDoubleClick( w,
x,
y, button ) )
283 bool OnSelect(Widget w,
int x,
int y)
298 bool OnItemSelected(Widget w,
int x,
int y,
int row,
int column,
int oldRow,
int oldColumn)
304 if (
UIScriptedWindow.GetActiveWindows().GetElement( i ).OnItemSelected( w,
x,
y, row, column, oldRow, oldColumn ) )
364 if (
UIScriptedWindow.GetActiveWindows().GetElement( i ).OnMouseLeave( w, enterW,
x,
y ) )
379 if (
UIScriptedWindow.GetActiveWindows().GetElement( i ).OnMouseButtonDown( w,
x,
y, button ) )
394 if (
UIScriptedWindow.GetActiveWindows().GetElement( i ).OnMouseButtonUp( w,
x,
y, button ) )
403 bool OnMouseWheel(Widget w,
int x,
int y,
int wheel)
409 if (
UIScriptedWindow.GetActiveWindows().GetElement( i ).OnMouseWheel( w,
x,
y, wheel ) )
424 if (
UIScriptedWindow.GetActiveWindows().GetElement( i ).OnController( w, control, value ) )
448 bool OnKeyUp(Widget w,
int x,
int y,
int key)
478 bool OnChange(Widget w,
int x,
int y,
bool finished)
484 if (
UIScriptedWindow.GetActiveWindows().GetElement( i ).OnChange( w,
x,
y, finished ) )
493 bool OnDrag(Widget w,
int x,
int y)
508 bool OnDragging(Widget w,
int x,
int y, Widget reciever)
514 if (
UIScriptedWindow.GetActiveWindows().GetElement( i ).OnDragging( w,
x,
y, reciever ) )
523 bool OnDraggingOver(Widget w,
int x,
int y, Widget reciever)
529 if (
UIScriptedWindow.GetActiveWindows().GetElement( i ).OnDraggingOver( w,
x,
y, reciever ) )
538 bool OnDrop(Widget w,
int x,
int y, Widget reciever)
544 if (
UIScriptedWindow.GetActiveWindows().GetElement( i ).OnDrop( w,
x,
y, reciever ) )
553 bool OnDropReceived(Widget w,
int x,
int y, Widget reciever)
559 if (
UIScriptedWindow.GetActiveWindows().GetElement( i ).OnDropReceived( w,
x,
y, reciever ) )
569 bool OnEvent(
EventType eventType, Widget target,
int parameter0,
int parameter1)
575 if (
UIScriptedWindow.GetActiveWindows().GetElement( i ).OnEvent( eventType, target, parameter0, parameter1 ) )
590 bool OnXboxEvent(
int xboxEvent)
ScriptInvoker Class provide list of callbacks usage:
Serialization general interface. Serializer API works with:
override void OnEvent(EventType eventTypeId, Param params)
Handles VON-related events.
int GetID()
Get the ID registered in SEffectManager.
void SetID(int id)
Set the ID registered in SEffectManager.
proto native CGame GetGame()
override void OnRPC(ParamsReadContext ctx)