Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
UIQueue Class Reference
Inheritance diagram for UIQueue:
EMono

Public Member Functions

void OnAdd (Queue q, bool insert=false)
 
void OnRemove (Queue q)
 
void OnSetOwner ()
 

Public Attributes

LayoutGroup layout
 
UIButton mold
 

Static Public Attributes

static UIQueue Instance
 
- Static Public Attributes inherited from EMono
static Core core
 

Properties

QueueManager queues [get]
 
- Properties inherited from EMono
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static CoreDebug debug [get]
 

Private Member Functions

void OnEnable ()
 
void OnDisable ()
 
void Update ()
 

Additional Inherited Members

- Static Public Member Functions inherited from EMono
static int rnd (int a)
 

Detailed Description

Definition at line 5 of file UIQueue.cs.

Member Function Documentation

◆ OnAdd()

void UIQueue.OnAdd ( Queue  q,
bool  insert = false 
)
inline

Definition at line 25 of file UIQueue.cs.

26 {
27 UIButton uIButton = (q.button = Util.Instantiate(mold, layout));
28 uIButton.onClick.AddListener(delegate
29 {
30 if (q.CanCancel)
31 {
32 queues.Cancel(q);
33 }
34 });
35 if (insert)
36 {
37 uIButton.transform.SetAsFirstSibling();
38 }
39 uIButton.tooltip.onShowTooltip = delegate(UITooltip a)
40 {
41 string text = q.interaction.GetType().ToString() + "\n";
42 text += q.interaction.status;
43 a.textMain.SetText(text);
44 };
45 uIButton.transform.DOScale(0f, 0.2f).From();
46 }
Status status
Definition: AIAct.cs:16
override string ToString()
Definition: AIAct.cs:124
void Cancel(Queue q)
Definition: QueueManager.cs:68
AIAct interaction
Definition: Queue.cs:3
bool CanCancel
Definition: Queue.cs:12
UIButton mold
Definition: UIQueue.cs:11
LayoutGroup layout
Definition: UIQueue.cs:9
QueueManager queues
Definition: UIQueue.cs:13
void SetText(string s)
Definition: UIText.cs:159
UIText textMain
Definition: UITooltip.cs:17
Definition: Util.cs:10
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67

References Queue.CanCancel, QueueManager.Cancel(), Queue.interaction, layout, mold, queues, UIText.SetText(), AIAct.status, UITooltip.textMain, AIAct.ToString(), and Util.

Referenced by QueueManager.Add().

◆ OnDisable()

void UIQueue.OnDisable ( )
inlineprivate

Definition at line 20 of file UIQueue.cs.

21 {
22 Instance = null;
23 }
static UIQueue Instance
Definition: UIQueue.cs:7

References Instance.

◆ OnEnable()

void UIQueue.OnEnable ( )
inlineprivate

Definition at line 15 of file UIQueue.cs.

16 {
17 Instance = this;
18 }

References Instance.

◆ OnRemove()

void UIQueue.OnRemove ( Queue  q)
inline

Definition at line 48 of file UIQueue.cs.

49 {
50 if (!q.button.interactable)
51 {
52 return;
53 }
54 q.button.interactable = false;
55 q.button.transform.DOScale(0f, 0.3f).OnComplete(delegate
56 {
57 if ((bool)q.button.gameObject)
58 {
59 Object.DestroyImmediate(q.button.gameObject);
60 }
61 });
62 }
UIButton button
Definition: Queue.cs:5

References Queue.button.

Referenced by QueueManager.Remove(), and Update().

◆ OnSetOwner()

void UIQueue.OnSetOwner ( )
inline

Definition at line 64 of file UIQueue.cs.

65 {
66 if (!mold)
67 {
68 mold = layout.CreateMold<UIButton>();
69 }
70 layout.DestroyChildren();
71 }

References layout, and mold.

Referenced by QueueManager.SetOwner().

◆ Update()

void UIQueue.Update ( )
inlineprivate

Definition at line 73 of file UIQueue.cs.

74 {
76 {
78 }
79 }
virtual bool IsRunning
Definition: AIAct.cs:31
Queue currentQueue
Definition: QueueManager.cs:12
List< Queue > list
Definition: QueueManager.cs:7
void OnRemove(Queue q)
Definition: UIQueue.cs:48

References QueueManager.currentQueue, Queue.interaction, AIAct.IsRunning, QueueManager.list, OnRemove(), and queues.

Member Data Documentation

◆ Instance

UIQueue UIQueue.Instance
static

Definition at line 7 of file UIQueue.cs.

Referenced by OnDisable(), and OnEnable().

◆ layout

LayoutGroup UIQueue.layout

Definition at line 9 of file UIQueue.cs.

Referenced by OnAdd(), and OnSetOwner().

◆ mold

UIButton UIQueue.mold

Definition at line 11 of file UIQueue.cs.

Referenced by OnAdd(), and OnSetOwner().

Property Documentation

◆ queues

QueueManager UIQueue.queues
get

Definition at line 13 of file UIQueue.cs.

Referenced by OnAdd(), and Update().


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