WIP
This commit is contained in:
parent
7131c14d99
commit
858bfaa0ae
@ -36,7 +36,7 @@ namespace NEG.UI.Area
|
||||
|
||||
public void OpenWindow(IWindow window, object data = null) => DefaultWindowSlot.AttachWindow(window, data);
|
||||
|
||||
private void Awake()
|
||||
protected virtual void Awake()
|
||||
{
|
||||
if (setAsDefaultArea)
|
||||
UiManager.Instance.CurrentArea = this;
|
||||
@ -50,10 +50,8 @@ namespace NEG.UI.Area
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
#if !SERVER
|
||||
if (ReferenceEquals(UiManager.Instance.CurrentArea, this))
|
||||
UiManager.Instance.CurrentArea = null;
|
||||
#endif
|
||||
}
|
||||
|
||||
public void TryUseBack(ref IControllable.BackUsed backUsed) => OnBackUsed?.Invoke(backUsed);
|
||||
|
||||
@ -77,13 +77,11 @@ namespace NEG.UI.UnityUi.Buttons
|
||||
|
||||
protected virtual void Awake()
|
||||
{
|
||||
#if !SERVER
|
||||
button.onClick.AddListener(OnClicked);
|
||||
if (groupButtonSettings == null)
|
||||
MonoUiManager.Instance.DefaultUiSettings.Apply(this);
|
||||
else
|
||||
groupButtonSettings.Apply(this);
|
||||
#endif
|
||||
}
|
||||
|
||||
private void Start() => OnDeselect(null);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using KBCore.Refs;
|
||||
using NEG.UI.UnityUi.Window;
|
||||
using NegUtils.NEG.UI;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
@ -10,6 +11,8 @@ namespace NEG.UI.UnityUi
|
||||
public IControllable Controllable => controllable.Value;
|
||||
|
||||
[SerializeField, Self] protected InterfaceRef<IControllable> controllable;
|
||||
|
||||
protected MonoWindow ControllableAsWindow => (MonoWindow)controllable.Value;
|
||||
|
||||
protected virtual void Awake()
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user