breakpoint
before update unity version
This commit is contained in:
@@ -40,7 +40,43 @@ namespace BITKit.UX
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public struct UnityDialogue : IUXDialogue
|
||||
{
|
||||
public void Show(string content, string title = "Alert", Action confirmAction = null, Action<bool> onChoose = null)
|
||||
{
|
||||
switch (confirmAction,onChoose)
|
||||
{
|
||||
case (null, null):
|
||||
Alert.Print(title, content);
|
||||
break;
|
||||
case (not null, null):
|
||||
Alert.Print(new AlertMessage()
|
||||
{
|
||||
title = title,
|
||||
message = content,
|
||||
OnConfirm = confirmAction
|
||||
});
|
||||
break;
|
||||
case (null, not null):
|
||||
Alert.Print(new AlertMessage()
|
||||
{
|
||||
title = title,
|
||||
message = content,
|
||||
OnChoice = onChoose
|
||||
});
|
||||
break;
|
||||
case (not null, not null):
|
||||
Alert.Print(new AlertMessage()
|
||||
{
|
||||
title = title,
|
||||
message = content,
|
||||
OnConfirm = confirmAction,
|
||||
OnChoice = onChoose
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
public static class Alert
|
||||
{
|
||||
public static void Print(AlertMessage message)
|
||||
@@ -72,6 +108,8 @@ namespace BITKit.UX
|
||||
private Button _cancelButton;
|
||||
private void Start()
|
||||
{
|
||||
DI.Register<IUXDialogue,UnityDialogue>();
|
||||
|
||||
Singleton = this;
|
||||
UXUtils.Inject(this);
|
||||
|
||||
|
Reference in New Issue
Block a user