Simple class for fading Widgets.
Подробнее...
Simple class for fading Widgets.
Timer class. Use when you want call function after some time, or repeatedly in time intervals. Call is not executed after the Timer object is deleted.
usage:
{
{
}
}
void Show()
Definition DayZGame.c:157
ref Timer myTimer1
Definition PluginItemDiagnostic.c:46
void Refresh()
Definition SizeToChild.c:108
Definition DayZPlayerImplement.c:63
◆ FadeIn()
Make "fade in" effect on Widget (transparency goes from 0.0 to 1.0)
- Аргументы
-
w | widget which will be faded |
time | duration of effect |
continue | - if True continue from current alpha value, otherwise always begin from 0.0 alpha |
448 {
450
452 {
455 return;
456 }
457
460
462
464 {
468 }
469
471 {
473 }
474 }
Widget m_widget
Definition tools.c:431
float m_alpha
Definition tools.c:433
bool m_fadeIn
Definition tools.c:432
Перекрестные ссылки m_time и OnStart().
◆ FadeOut()
Make "fade out" effect on Widget (transparency goes from 1.0 to 0.0)
- Аргументы
-
w | widget which will be faded |
time | duration of effect |
continue | - if True continue from current alpha value, otherwise always begin from 1.0 alpha |
483 {
485
487 {
490 return;
491 }
492
495
497
499 {
503 }
504
506 {
508 }
509 }
Перекрестные ссылки m_alpha, m_time и OnStart().
◆ OnTimer() [1/2]
512 {
514 {
516 {
518 }
519 else
520 {
523 }
524 }
525 }
Используется в Tick().
◆ OnTimer() [2/2]
607 {
609 {
612 }
613 else
614 {
616 }
617 }
Managed m_target
Definition tools.c:580
ref Param m_params
Definition tools.c:582
string m_function
Definition tools.c:581
proto native CGame GetGame()
Перекрестные ссылки GetGame().
◆ OnUpdate()
528 {
532 {
534 {
536 }
537 else
538 {
541 }
542
544 }
545 }
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 Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
Перекрестные ссылки Math::Clamp(), Math::Lerp(), m_duration и m_time.
Используется в Tick().
◆ Run()
Starts timer.
- Аргументы
-
duration | function is executed after this time (in seconds). |
obj | target object on which function will be executed |
fn_name | name of function (on object "obj") which will be executed |
params | function arguments see Param for usage, default NULL (no arguments) |
loop | when true, timer is looped endlessly and function is executed after every loop. |
Перекрестные ссылки OnStart().
◆ Stop()
◆ Timer()
585 {
587 }
void OnInit()
Definition AIBehaviour.c:49
Перекрестные ссылки OnInit().
◆ WidgetFadeTimer()
◆ m_alpha
◆ m_fadeIn
◆ m_function
◆ m_params
◆ m_target
◆ m_widget
Объявления и описания членов класса находятся в файле:
- D:/Ishodniki/scripts/3_Game/tools/tools.c