feat(battle-engine): copy-loop closure to 3282 files (member-surface frontier)
This commit is contained in:
38
SVSim.BattleEngine/Engine/Wizard/GuildInputViewerIdDialog.cs
Normal file
38
SVSim.BattleEngine/Engine/Wizard/GuildInputViewerIdDialog.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class GuildInputViewerIdDialog : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private UIInput _inputId;
|
||||
|
||||
public int InputValue => int.Parse(_inputId.value);
|
||||
|
||||
public void InitInput(Action onChangeInputLength)
|
||||
{
|
||||
_inputId.value = string.Empty;
|
||||
_inputId.onChange.Clear();
|
||||
_inputId.onChange.Add(new EventDelegate(delegate
|
||||
{
|
||||
onChangeInputLength();
|
||||
}));
|
||||
}
|
||||
|
||||
public void InitializeDialog(DialogBase dialog)
|
||||
{
|
||||
UIManager.SetObjectToGrey(dialog.button1.gameObject, b: true);
|
||||
InitInput(delegate
|
||||
{
|
||||
if (UIUtil.IsValidViewerId(_inputId.value))
|
||||
{
|
||||
UIManager.SetObjectToGrey(dialog.button1.gameObject, b: false);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIManager.SetObjectToGrey(dialog.button1.gameObject, b: true);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user