2using System.Collections.Generic;
5using UnityEngine.Events;
110 public List<Layer>
layers =
new List<Layer>();
116 public List<Window>
windows =
new List<Window>();
121 public static string[]
searchPath =
new string[3] {
"Layer",
"Layer/Dialog",
"Layer/LayerHome" };
125 public string uid => base.name;
138 return "_listOf".lang(text);
149 foreach (
Window componentsInDirectChild
in this.GetComponentsInDirectChildren<Window>())
151 windows.Add(componentsInDirectChild);
153 for (
int i = 0; i <
windows.Count; i++)
159 windows[0].transform.SetAsLastSibling();
170 for (
int i = 0; i <
windows.Count; i++)
183 SoundManager.current.PlayBGM(
option.
bgm);
191 this.RebuildLayout(recursive:
true);
211 UnityEngine.Object.DestroyImmediate(
screenLock.gameObject);
223 else if (
layers.Count > 0)
225 layers.LastItem().UpdateInput();
271 return layers.LastItem().OnBack();
291 return Create(typeof(T).Name) as T;
302 string text = path.Split(
'/').LastItem();
304 foreach (
string text2
in array)
306 layer = Resources.Load<
Layer>(
"UI/" + text2 +
"/" + path);
309 layer = Resources.Load<
Layer>(
"UI/" + text2 +
"/" + path +
"/" + text);
318 Debug.Log(path +
" --- " + text);
320 layer = UnityEngine.Object.Instantiate(layer);
321 Layer layer2 = layer;
322 string text4 = (layer.name = text);
323 layer2.idLayer = text4;
344 return AddLayer(typeof(T).Name) as T;
349 return AddLayer(
id.IsEmpty(typeof(T).Name)) as T;
360 l.closeOthers =
false;
388 l.isDestroyed =
false;
389 l.gameObject.SetActive(value:
true);
397 l.gameObject.SetActive(value:
true);
399 l.transform.SetParent(
rectLayers, worldPositionStays:
false);
407 CanvasGroup canvasGroup = layer.gameObject.GetComponent<CanvasGroup>();
410 canvasGroup = layer.gameObject.AddComponent<CanvasGroup>();
412 canvasGroup.alpha = 0f;
418 l._rect.anchorMin = Vector2.zero;
419 l._rect.anchorMax = Vector2.one;
420 l._rect.anchoredPosition = Vector2.zero;
421 l._rect.sizeDelta = Vector2.zero;
490 for (
int num =
layers.Count - 1; num >= 0; num--)
498 for (
int num =
layers.Count - 1; num >= 0; num--)
509 for (
int num =
layers.Count - 1; num >= 0; num--)
534 CanvasGroup component = layer.GetComponent<CanvasGroup>();
537 component.alpha = 1f;
567 base.gameObject.SetActive(value:
false);
571 UnityEngine.Object.DestroyImmediate(base.gameObject);
581 onKill.AddListener(delegate
590 option.canClose =
false;
597 public void Delay(
float duration = 0.05f)
601 window.setting.anime =
null;
603 _rect.anchoredPosition =
new Vector2(10000f, 10000f);
604 TweenUtil.Tween(0.1f, delegate
608 if ((
bool)
this && (
bool)base.gameObject)
610 _rect.anchoredPosition = new Vector2(0f, 0f);
611 foreach (Window window2 in windows)
613 window2.ClampToScreen();
623 CanvasGroup cg = GetComponent<CanvasGroup>() ?? base.gameObject.AddComponent<CanvasGroup>();
625 TweenUtil.Tween(d,
null, delegate
634 foreach (
Layer layer
in layers)
644 public T GetLayer<T>(
bool fromTop =
false) where T :
Layer
648 for (
int num = layers.Count - 1; num >= 0; num--)
650 Layer layer = layers[num];
659 foreach (
Layer layer2
in layers)
672 if (layers.Count > 0)
681 windows[idWindow].SwitchContent(i);
690 windows[0].
SetTitles(langList, idHeaderRow);
696 foreach (
Layer layer
in layers)
703 return blockWidgetClick;
708 foreach (
Layer layer
in layers)
720 foreach (
Layer layer
in layers)
732 if ((
bool)blurStopInstance)
736 foreach (
Layer layer
in layers)
750 if (
item.GetComponentInParent<
Layer>() ==
this)
virtual Tween Play(Transform trans, UnityAction onComplete=null, float duration=-1f, float delay=0f)
void WaitForEndOfFrame(Action action)
static Func< bool > BlockInput
static void SetCursor(CursorInfo info=null, int _priority=0)
bool allowInventoryInteraction
SoundData soundDeactivate
bool screenClickCloseRight
ScreenlockType screenlockType
void RemoveLayer(Layer l)
static Transform blurStopInstance
virtual bool blockWidgetClick
T GetLayer< T >(bool fromTop=false)
Layer SetTitles(string langList, string idHeaderRow=null)
void _RemoveLayer(Layer l)
virtual void OnAfterInit()
void _AddLayer(string id)
Layer GetLayer(string id)
T ToggleLayer< T >(string id=null)
static string[] searchPath
virtual void OnSwitchContent(Window window)
virtual void OnAfterAddLayer()
virtual bool HeaderIsListOf(int id)
void ShowScreenLock(string id)
virtual void OnUpdateInput()
Layer AddLayer(string id)
virtual void OnChangeLayer()
void SwitchContent(int idWindow, int i)
bool IsBlockWidgetClick()
virtual void OnRightClick()
T AddLayerDontCloseOthers< T >()
static bool closeOnRightClick
virtual void OnBeforeAddLayer()
Layer AddLayerDontCloseOthers(Layer l)
void ToggleLayer(string id)
bool IsAllowGeneralInput()
static bool cancelKeyDown
virtual string GetTextHeader(Window window)
virtual RectTransform rectLayers
void RemoveLayers(bool removeImportant=false)
void Delay(float duration=0.05f)
static Layer Create(string path)
Layer SetOnKill(Action action)
static UIDropdown activeInstance