event rename
This commit is contained in:
parent
aafd5dbc75
commit
15ea7f7328
@ -11,7 +11,7 @@ namespace NegUtils.NEG.UI
|
|||||||
|
|
||||||
event Action<object> OnOpened;
|
event Action<object> OnOpened;
|
||||||
event Action OnClosed;
|
event Action OnClosed;
|
||||||
event Action<BackUsed> UseBack;
|
event Action<BackUsed> OnBackUsed;
|
||||||
|
|
||||||
public void TryUseBack(ref BackUsed backUsed);
|
public void TryUseBack(ref BackUsed backUsed);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,9 +9,9 @@ namespace NEG.UI.Area
|
|||||||
{
|
{
|
||||||
public class CloseMainWindowOnBack : MonoController
|
public class CloseMainWindowOnBack : MonoController
|
||||||
{
|
{
|
||||||
protected override void UseBack(IControllable.BackUsed backUsed)
|
protected override void OnBackUsed(IControllable.BackUsed backUsed)
|
||||||
{
|
{
|
||||||
base.UseBack(backUsed);
|
base.OnBackUsed(backUsed);
|
||||||
UiManager.Instance.CurrentMainWindow.Close();
|
UiManager.Instance.CurrentMainWindow.Close();
|
||||||
backUsed.Used = true;
|
backUsed.Used = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,7 @@ namespace NEG.UI.Area
|
|||||||
{
|
{
|
||||||
public event Action<object> OnOpened;
|
public event Action<object> OnOpened;
|
||||||
public event Action OnClosed;
|
public event Action OnClosed;
|
||||||
public event Action<IControllable.BackUsed> UseBack;
|
public event Action<IControllable.BackUsed> OnBackUsed;
|
||||||
|
|
||||||
public IEnumerable<IWindowSlot> AvailableSlots => windowSlots;
|
public IEnumerable<IWindowSlot> AvailableSlots => windowSlots;
|
||||||
public IWindowSlot DefaultWindowSlot => windowSlots[0];
|
public IWindowSlot DefaultWindowSlot => windowSlots[0];
|
||||||
@ -54,6 +54,6 @@ namespace NEG.UI.Area
|
|||||||
UiManager.Instance.CurrentArea = null;
|
UiManager.Instance.CurrentArea = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TryUseBack(ref IControllable.BackUsed backUsed) => UseBack?.Invoke(backUsed);
|
public void TryUseBack(ref IControllable.BackUsed backUsed) => OnBackUsed?.Invoke(backUsed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -15,7 +15,7 @@ namespace NEG.UI.UnityUi
|
|||||||
{
|
{
|
||||||
controllable.Value.OnOpened += OnOpened;
|
controllable.Value.OnOpened += OnOpened;
|
||||||
controllable.Value.OnClosed += OnClosed;
|
controllable.Value.OnClosed += OnClosed;
|
||||||
controllable.Value.UseBack += UseBack;
|
controllable.Value.OnBackUsed += OnBackUsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnValidate() => this.ValidateRefs();
|
private void OnValidate() => this.ValidateRefs();
|
||||||
@ -24,6 +24,6 @@ namespace NEG.UI.UnityUi
|
|||||||
|
|
||||||
protected virtual void OnClosed() { }
|
protected virtual void OnClosed() { }
|
||||||
|
|
||||||
protected virtual void UseBack(IControllable.BackUsed obj) { }
|
protected virtual void OnBackUsed(IControllable.BackUsed obj) { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9,9 +9,9 @@ namespace NEG.UI.UnityUi.Window
|
|||||||
{
|
{
|
||||||
[SerializeField, Self(Flag.Editable)] private MonoWindow window;
|
[SerializeField, Self(Flag.Editable)] private MonoWindow window;
|
||||||
|
|
||||||
protected override void UseBack(IControllable.BackUsed backUsed)
|
protected override void OnBackUsed(IControllable.BackUsed backUsed)
|
||||||
{
|
{
|
||||||
base.UseBack(backUsed);
|
base.OnBackUsed(backUsed);
|
||||||
window.Close();
|
window.Close();
|
||||||
backUsed.Used = true;
|
backUsed.Used = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,7 @@ namespace NEG.UI.UnityUi.Window
|
|||||||
{
|
{
|
||||||
public event Action<object> OnOpened;
|
public event Action<object> OnOpened;
|
||||||
public event Action OnClosed;
|
public event Action OnClosed;
|
||||||
public event Action<IControllable.BackUsed> UseBack;
|
public event Action<IControllable.BackUsed> OnBackUsed;
|
||||||
|
|
||||||
public IEnumerable<IWindowSlot> AvailableSlots => windowSlots;
|
public IEnumerable<IWindowSlot> AvailableSlots => windowSlots;
|
||||||
public IWindowSlot Parent { get; private set; }
|
public IWindowSlot Parent { get; private set; }
|
||||||
@ -66,6 +66,6 @@ namespace NEG.UI.UnityUi.Window
|
|||||||
|
|
||||||
public void SetDefaultSelectedItem(GameObject item) => defaultSelectedItem = item;
|
public void SetDefaultSelectedItem(GameObject item) => defaultSelectedItem = item;
|
||||||
|
|
||||||
public void TryUseBack(ref IControllable.BackUsed backUsed) => UseBack?.Invoke(backUsed);
|
public void TryUseBack(ref IControllable.BackUsed backUsed) => OnBackUsed?.Invoke(backUsed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user