Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
LayerProgress Class Reference
Inheritance diagram for LayerProgress:
ELayer Layer IUISkin

Public Member Functions

void Init (string hint)
 
void Update ()
 
- Public Member Functions inherited from ELayer
override void OnBeforeAddLayer ()
 
void InitInspector ()
 
sealed override void Init ()
 
override void OnAfterAddLayer ()
 
void TryShowHelp ()
 
void AddLayerToUI (string id)
 
void TryShowHint (string _langHint=null)
 
void TalkHomeMemeber (string id)
 
void TalkMaid (string id)
 
override void OnRightClick ()
 
- Public Member Functions inherited from Layer
virtual string GetTextHeader (Window window)
 
virtual bool HeaderIsListOf (int id)
 
virtual void Init ()
 
virtual void OnInit ()
 
virtual void OnAfterInit ()
 
virtual void ApplySkin ()
 
void ShowScreenLock (string id)
 
void UpdateInput ()
 
virtual void OnUpdateInput ()
 
virtual void OnRightClick ()
 
virtual bool OnBack ()
 
virtual void OnChangeLayer ()
 
virtual void OnCreate ()
 
void _AddLayer (string id)
 
Layer AddLayer (string id)
 
AddLayer< T > ()
 
AddLayer< T > (string id)
 
AddLayerDontCloseOthers< T > ()
 
Layer AddLayerDontCloseOthers (Layer l)
 
GetOrAddLayer< T > ()
 
virtual void OnBeforeAddLayer ()
 
virtual void OnAfterAddLayer ()
 
Layer AddLayer (Layer l)
 
void ToggleLayer (string id)
 
ToggleLayer< T > (string id=null)
 
void WaitAndClose ()
 
void OnClickClose ()
 
virtual void Close ()
 
void CloseLayers ()
 
void RemoveLayers (bool removeImportant=false)
 
bool RemoveLayer< T > ()
 
void RemoveLayer (Layer l)
 
virtual void OnKill ()
 
Layer SetOnKill (Action action)
 
void DisableClose ()
 
void Delay (float duration=0.05f)
 
Layer SetDelay (float d)
 
Layer GetLayer (string id)
 
GetLayer< T > (bool fromTop=false)
 
Layer GetTopLayer ()
 
void SwitchContent (int idWindow, int i)
 
virtual void OnSwitchContent (Window window)
 
Layer SetTitles (string langList, string idHeaderRow=null)
 
bool IsBlockWidgetClick ()
 
bool IsHideHud ()
 
bool IsAllowGeneralInput ()
 
bool IsUseBlur ()
 
bool IsPointerOnLayer ()
 
void ApplySkin ()
 

Static Public Member Functions

static LayerProgress StartAsync (string text, UniTask< bool > task, Action onCancel=null)
 
static LayerProgress Start (string text, Action onComplete=null)
 
static void Start (string text, Action thread, Action onComplete)
 
- Static Public Member Functions inherited from ELayer
static int rnd (int a)
 
- Static Public Member Functions inherited from Layer
static T Create< T > ()
 
static T Create< T > (string path)
 
static Layer Create (string path)
 

Public Attributes

float speed
 
float minTime
 
float endTime
 
float minProgress
 
Slider bar
 
Text text
 
Action onComplete
 
Func< bool > funcComplete
 
UniTask< bool > unitask
 
Action onCancel
 
bool useUnitask
 
CanvasGroup cg
 
- Public Attributes inherited from Layer
Option option
 
UnityEvent onKill
 
Anime animeIn
 
Anime animeOut
 
bool closeOthers
 
bool defaultActionMode = true
 
Button screenLock
 
Layer parent
 
string idLayer
 
List< Layerlayers = new List<Layer>()
 
Vector2 lastParentPos
 
List< Windowwindows = new List<Window>()
 
string langHint
 

Static Public Attributes

static bool completed
 
static bool isActive
 
static float progress
 
- Static Public Attributes inherited from Layer
static int skipInput
 
static bool closeOnRightClick
 
static bool rightClicked
 
static bool cancelKeyDown
 
static bool ignoreSounds
 
static Transform blurStopInstance
 
static string[] searchPath = new string[3] { "Layer", "Layer/Dialog", "Layer/LayerHome" }
 

Private Attributes

float value
 

Additional Inherited Members

- Protected Member Functions inherited from ELayer
sealed override void _Close ()
 
sealed override void Kill ()
 
- Protected Member Functions inherited from Layer
virtual void Awake ()
 
virtual void _Close ()
 
virtual void Kill ()
 
- Protected Attributes inherited from Layer
RectTransform _rect
 
bool isDestroyed
 
- Properties inherited from ELayer
static Core core [get]
 
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static FactionBranch Branch [get]
 
static Faction Home [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static CoreConfig config [get]
 
static GameSetting setting [get]
 
static ColorProfile Colors [get]
 
static SourceManager sources [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 
bool IsFloat [get]
 
virtual string IdHelp [get]
 
- Properties inherited from Layer
Layer TopLayer [get]
 
string uid [get]
 
virtual RectTransform rectLayers [get]
 
virtual bool blockWidgetClick [get]
 

Detailed Description

Definition at line 8 of file LayerProgress.cs.

Member Function Documentation

◆ Init()

void LayerProgress.Init ( string  hint)
inline

Definition at line 42 of file LayerProgress.cs.

43 {
44 text.text = hint;
45 completed = false;
46 isActive = true;
47 progress = (value = 0f);
48 cg.alpha = 0f;
49 cg.DOFade(1f, 0.1f).SetEase(Ease.InCubic).SetDelay(0.2f);
50 }
@ hint
static bool isActive
static bool completed
static float progress
CanvasGroup cg

References cg, completed, hint, isActive, progress, and value.

Referenced by Start(), and StartAsync().

◆ Start() [1/2]

static LayerProgress LayerProgress.Start ( string  text,
Action  onComplete = null 
)
inlinestatic

Definition at line 100 of file LayerProgress.cs.

101 {
102 LayerProgress layerProgress = ELayer.ui.AddLayer<LayerProgress>();
103 layerProgress.Init(text);
104 layerProgress.onComplete = onComplete;
105 return layerProgress;
106 }
Definition: ELayer.cs:4
static UI ui
Definition: ELayer.cs:21
Action onComplete
void Init(string hint)

References Init(), onComplete, text, and ELayer.ui.

Referenced by Steam.CreateUserContent().

◆ Start() [2/2]

static void LayerProgress.Start ( string  text,
Action  thread,
Action  onComplete 
)
inlinestatic

Definition at line 108 of file LayerProgress.cs.

109 {
111 {
112 thread();
113 onComplete();
114 return;
115 }
116 LayerProgress layerProgress = ELayer.ui.AddLayer<LayerProgress>();
117 layerProgress.Init(text);
118 layerProgress.onComplete = onComplete;
119 ThreadPool.QueueUserWorkItem(delegate
120 {
121 thread();
122 completed = true;
123 });
124 }
bool dontUseThread
Definition: CoreDebug.cs:121
CoreDebug debug
Definition: Core.cs:31
static Core core
Definition: ELayer.cs:7

References completed, ELayer.core, Core.debug, CoreDebug.dontUseThread, Init(), onComplete, text, and ELayer.ui.

◆ StartAsync()

static LayerProgress LayerProgress.StartAsync ( string  text,
UniTask< bool >  task,
Action  onCancel = null 
)
inlinestatic

Definition at line 90 of file LayerProgress.cs.

91 {
92 LayerProgress layerProgress = ELayer.ui.AddLayer<LayerProgress>();
93 layerProgress.Init(text);
94 layerProgress.useUnitask = true;
95 layerProgress.unitask = task;
96 layerProgress.onCancel = onCancel;
97 return layerProgress;
98 }

References Init(), onCancel, text, and ELayer.ui.

Referenced by TraitMoongate.OnUse().

◆ Update()

void LayerProgress.Update ( )
inline

Definition at line 52 of file LayerProgress.cs.

53 {
54 if (onCancel != null && Input.GetKeyDown(KeyCode.Escape))
55 {
56 isActive = false;
57 Close();
58 onCancel();
59 return;
60 }
61 minTime -= Time.deltaTime;
62 if (progress < 0.9f)
63 {
64 progress += minProgress * Time.deltaTime;
65 }
66 value = Mathf.Lerp(value, progress, Time.deltaTime * speed);
67 if (useUnitask && unitask.Status == UniTaskStatus.Succeeded)
68 {
69 completed = true;
70 }
71 bar.value = Mathf.Clamp(value, 0f, 1f);
72 if (!completed || !(minTime < 0f))
73 {
74 return;
75 }
76 progress = 1f;
77 speed *= 5f;
78 endTime -= Time.deltaTime;
79 if (!(endTime > 0f))
80 {
81 isActive = false;
82 Close();
83 if (onComplete != null)
84 {
85 onComplete();
86 }
87 }
88 }
UniTask< bool > unitask
virtual void Close()
Definition: Layer.cs:463

References Layer.Close(), completed, endTime, isActive, minProgress, minTime, onCancel, onComplete, progress, speed, unitask, useUnitask, and value.

Member Data Documentation

◆ bar

Slider LayerProgress.bar

Definition at line 24 of file LayerProgress.cs.

◆ cg

CanvasGroup LayerProgress.cg

Definition at line 38 of file LayerProgress.cs.

Referenced by Init().

◆ completed

bool LayerProgress.completed
static

Definition at line 10 of file LayerProgress.cs.

Referenced by Init(), Start(), and Update().

◆ endTime

float LayerProgress.endTime

Definition at line 20 of file LayerProgress.cs.

Referenced by Update().

◆ funcComplete

Func<bool> LayerProgress.funcComplete

Definition at line 30 of file LayerProgress.cs.

◆ isActive

bool LayerProgress.isActive
static

Definition at line 12 of file LayerProgress.cs.

Referenced by Init(), and Update().

◆ minProgress

float LayerProgress.minProgress

Definition at line 22 of file LayerProgress.cs.

Referenced by Update().

◆ minTime

float LayerProgress.minTime

Definition at line 18 of file LayerProgress.cs.

Referenced by Update().

◆ onCancel

Action LayerProgress.onCancel

Definition at line 34 of file LayerProgress.cs.

Referenced by Steam.CreateUserContent(), StartAsync(), and Update().

◆ onComplete

Action LayerProgress.onComplete

Definition at line 28 of file LayerProgress.cs.

Referenced by Start(), and Update().

◆ progress

float LayerProgress.progress
static

Definition at line 14 of file LayerProgress.cs.

Referenced by Init(), and Update().

◆ speed

float LayerProgress.speed

Definition at line 16 of file LayerProgress.cs.

Referenced by Update().

◆ text

Text LayerProgress.text

Definition at line 26 of file LayerProgress.cs.

Referenced by Start(), and StartAsync().

◆ unitask

UniTask<bool> LayerProgress.unitask

Definition at line 32 of file LayerProgress.cs.

Referenced by Update().

◆ useUnitask

bool LayerProgress.useUnitask

Definition at line 36 of file LayerProgress.cs.

Referenced by Update().

◆ value

float LayerProgress.value
private

Definition at line 40 of file LayerProgress.cs.

Referenced by Init(), and Update().


The documentation for this class was generated from the following file: