78 if (m_processing)
return;
118 for (
int i =
Count() - 1; i >= 0; i--)
161 if (m_processing)
return;
178 m_mouse_params.param1 =
mouse_x;
179 m_mouse_params.param2 =
mouse_y;
189 ctx.CallParams(m_mouse_params);
199 m_processing =
false;
321 ErrorEx(
"Attempting to Init a timer when the game does not exist (GetGame() == null)");
362class TimerQueue
extends array<TimerBase>
369 m_processing =
false;
377 for (
int i =
Count() - 1;
i >= 0;
i--)
378 Get(
i).OnTimerQueueDestoryed();
387 if (m_processing)
return;
393 for (
int i =
Count() - 1;
i >= 0;
i--)
397 m_processing =
false;
425 m_alpha =
w.GetAlpha();
441 m_alpha = m_widget.GetAlpha();
442 m_widget.SetAlpha(0);
458 m_alpha =
w.GetAlpha();
475 m_widget.SetAlpha(m_alpha);
488 m_widget.SetAlpha(1);
491 m_widget.SetAlpha(0);
492 m_widget.Show(
false);
578 GetGame().GameScript.CallFunctionParams(m_target, m_function,
NULL, m_params);
582 GetGame().GameScript.CallFunction(m_target, m_function,
NULL, 0);
846 return m_values.Get(
index);
853 return m_values.Get(
index);
858 return m_keys.Get(
index);
888 m_keys.Remove(
index);
889 m_values.Remove(
index);
899 RemoveByIndex(
index);
905 return m_keys.Count();
912 if (m_keys && m_values)
void Remove(Object object)
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
array< ref PlayerStatBase > Get()
void Clear(bool clearFile=false)
AnimationTimer class. This timer is for animating float value. usage:
void AnimationTimer(int category=CALL_CATEGORY_SYSTEM)
override void Tick(float timeslice)
Ticks the timer, is called by timer subsystem.
float m_TargetValueOriginal
void Run(float targetVal, Managed obj, string updateFunc, string finishedFunc, float startingVal=0, bool loop=false, float speed=1.0, Param params=null, int category=CALL_CATEGORY_SYSTEM)
override bool IsRunning()
string m_FinishedFunction
float GetValue()
Returns actual animated value.
void SetValue(float val)
Sets both value and target value.
float GetValue()
Returns actual animated value.
void Animate(float val, float speed=1.0)
Starts animate value until value reaches target value.
void Tick(float timeslice)
Ticks the timer, is called by timer subsystem.
void AnimateLoop(float speed=1.0)
Starts infinite animation loop <-1,1>. Based on sinus transition.
float GetTargetValue()
Returns target value. While AnimateLoop returns angle of cycle in radians.
void CallQueueContext(Class target, string fn, Param params)
void CallParams(Param params)
DragQueue Class provide callbacks while mouse is dragging. Callback function must have exact argument...
override void Tick()
System function, don't call it.
ref Param3< int, int, bool > m_mouse_params
Super root of all classes in Enforce script.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Simple class for fading Widgets.
void FadeOut(Widget w, float time, bool continue_=false)
Make "fade out" effect on Widget (transparency goes from 1.0 to 0.0)
void Timer(int category=CALL_CATEGORY_SYSTEM)
void Run(float duration, Managed obj, string fn_name, Param params=NULL, bool loop=false)
Starts timer.
void FadeIn(Widget w, float time, bool continue_=false)
Make "fade in" effect on Widget (transparency goes from 0.0 to 1.0)
void Tick(float timeslice)
void Call(Class obj, string fn_name, Param params=NULL)
Creates new call request, add it on queue and execute during frame update (depends on call category)
void RemoveCalls(Class obj)
Removes all queued calls for object (call this function when object is going to be deleted)
void Tick()
System function, don't call it.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
ref array< ref array< V > > m_values
K GetKeyByIndex(int index)
void Insert(K key, V value)
array< V > GetByIndex(int index)
void RemoveByIndex(int index)
proto native CGame GetGame()
proto volatile int CallFunctionParams(Class inst, string function, out void returnVal, Class parms)
proto volatile int CallFunction(Class inst, string function, out void returnVal, void parm)
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto int AbsInt(int i)
Returns absolute value.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float Sin(float angle)
Returns sinus of angle in radians.
static proto float AbsFloat(float f)
Returns absolute value.
static proto int GetNumberOfSetBits(int i)
returns the number of bits set in a bitmask i
proto native int GetMouseState(MouseState index)
proto void GetMousePos(out int x, out int y)
int ARGB(int a, int r, int g, int b)