TechbloxModdingAPI/GamecraftModdingAPI/App/UserPrompts.cs

27 lines
1,002 B
C#
Raw Normal View History

2020-07-20 00:05:01 +00:00
using System;
using HarmonyLib;
using RobocraftX.Services;
namespace GamecraftModdingAPI.App
{
public class DualChoicePrompt : MultiChoiceError
{
public DualChoicePrompt(string errorMessage, string title, string firstButtonText, Action firstButtonAction, string secondButtonText, Action secondButtonAction) : base(errorMessage, firstButtonText, firstButtonAction, secondButtonText, secondButtonAction)
{
// internal readonly field smh
new Traverse(this).Field<string>("Title").Value = title;
}
}
public class SingleChoicePrompt : SingleChoiceError
{
public SingleChoicePrompt(string errorMessage, string buttonText, Action buttonClickAction) : base(errorMessage, buttonText, buttonClickAction)
{
}
public SingleChoicePrompt(string titleText, string errorMessage, string buttonText, Action buttonClickAction) : base(titleText, errorMessage, buttonText, buttonClickAction)
{
}
}
}