-
Notifications
You must be signed in to change notification settings - Fork 0
/
CommandMobile.cs
35 lines (32 loc) · 922 Bytes
/
CommandMobile.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using Microsoft.Xna.Framework.Input;
using StardewModdingAPI.Mobile;
namespace VirtualKeyboard;
internal class CommandMobile
{
static CommandMobile Instance;
public static void Init()
{
Instance = new CommandMobile();
}
public const string CMD_opencommand = "opencommand";
CommandMobile()
{
ModEntry.Instance.Helper.ConsoleCommands.Add(
CMD_opencommand, "open command mobile by ImproveGame",
(cmd, args) => Open()
);
}
public void Open()
{
var MessageBoxTitle = "SMAPI Commmand";
var MessageBoxDescription = "in this it's cmd for SMAPI";
Task.Run(async () =>
{
var result = await KeyboardInput.Show(MessageBoxTitle, MessageBoxDescription, "", false);
if (result != null)
{
MobileConsoleTool.WriteLine(result);
}
});
}
}