some GUI
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Barotrauma.Networking;
|
||||
using MoonSharp.Interpreter;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
@@ -13,6 +14,12 @@ namespace Barotrauma
|
||||
public LuaGUI(LuaSetup _env)
|
||||
{
|
||||
env = _env;
|
||||
|
||||
RectTransform = UserData.CreateStatic<RectTransform>();
|
||||
GUILayoutGroup = UserData.CreateStatic<GUILayoutGroup>();
|
||||
GUIButton = UserData.CreateStatic<GUIButton>();
|
||||
GUITextBox = UserData.CreateStatic<GUITextBox>();
|
||||
Anchor = UserData.CreateStatic<Anchor>();
|
||||
}
|
||||
|
||||
public ChatBox ChatBox
|
||||
@@ -22,6 +29,12 @@ namespace Barotrauma
|
||||
return GameMain.Client.ChatBox;
|
||||
}
|
||||
}
|
||||
|
||||
public static object RectTransform;
|
||||
public static object GUILayoutGroup;
|
||||
public static object GUIButton;
|
||||
public static object GUITextBox;
|
||||
public static object Anchor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -420,6 +420,20 @@ namespace Barotrauma
|
||||
}
|
||||
};
|
||||
#endif
|
||||
new GUIButton(new RectTransform(new Point(300, 30), Frame.RectTransform, Anchor.TopRight) { AbsoluteOffset = new Point(40, 230) },
|
||||
"Remove Client-Side Lua", style: "GUIButtonLarge", color: GUI.Style.Red)
|
||||
{
|
||||
IgnoreLayoutGroups = true,
|
||||
UserData = Tab.Empty,
|
||||
ToolTip = "Remove Client-Side Lua.",
|
||||
OnClicked = (tb, userdata) =>
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
var minButtonSize = new Point(120, 20);
|
||||
var maxButtonSize = new Point(480, 80);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user