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 text3 = (layer.name = text);
323 layer2.idLayer = text3;
344 return AddLayer(typeof(T).Name) as T;
349 return AddLayer(
id.IsEmpty(typeof(T).Name)) as T;
365 l.closeOthers =
false;
393 l.isDestroyed =
false;
394 l.gameObject.SetActive(value:
true);
402 l.gameObject.SetActive(value:
true);
404 l.transform.SetParent(
rectLayers, worldPositionStays:
false);
412 CanvasGroup canvasGroup = layer.gameObject.GetComponent<CanvasGroup>();
415 canvasGroup = layer.gameObject.AddComponent<CanvasGroup>();
417 canvasGroup.alpha = 0f;
423 l._rect.anchorMin = Vector2.zero;
424 l._rect.anchorMax = Vector2.one;
425 l._rect.anchoredPosition = Vector2.zero;
426 l._rect.sizeDelta = Vector2.zero;
495 for (
int num =
layers.Count - 1; num >= 0; num--)
503 for (
int num =
layers.Count - 1; num >= 0; num--)
514 for (
int num =
layers.Count - 1; num >= 0; num--)
539 CanvasGroup component = layer.GetComponent<CanvasGroup>();
542 component.alpha = 1f;
572 base.gameObject.SetActive(value:
false);
576 UnityEngine.Object.DestroyImmediate(base.gameObject);
586 onKill.AddListener(delegate
595 option.canClose =
false;
602 public void Delay(
float duration = 0.05f)
606 window.setting.anime =
null;
608 _rect.anchoredPosition =
new Vector2(10000f, 10000f);
609 TweenUtil.Tween(0.1f, delegate
613 if ((
bool)
this && (
bool)base.gameObject)
615 _rect.anchoredPosition = new Vector2(0f, 0f);
616 foreach (Window window2 in windows)
618 window2.ClampToScreen();
628 CanvasGroup cg = GetComponent<CanvasGroup>() ?? base.gameObject.AddComponent<CanvasGroup>();
630 TweenUtil.Tween(d,
null, delegate
639 foreach (
Layer layer
in layers)
649 public T GetLayer<T>(
bool fromTop =
false) where T :
Layer
653 for (
int num = layers.Count - 1; num >= 0; num--)
655 Layer layer = layers[num];
664 foreach (
Layer layer2
in layers)
677 if (layers.Count > 0)
686 windows[idWindow].SwitchContent(i);
695 windows[0].
SetTitles(langList, idHeaderRow);
701 foreach (
Layer layer
in layers)
708 return blockWidgetClick;
713 foreach (
Layer layer
in layers)
725 foreach (
Layer layer
in layers)
737 if ((
bool)blurStopInstance)
741 foreach (
Layer layer
in layers)
755 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