even more GUI

This commit is contained in:
Evil Factory
2021-10-04 11:46:13 -03:00
parent fc811c67fb
commit 1262c47e64
6 changed files with 60 additions and 12 deletions
@@ -25,6 +25,9 @@ namespace Barotrauma
TickBox = UserData.CreateStatic<GUITickBox>();
Image = UserData.CreateStatic<GUIImage>();
ListBox = UserData.CreateStatic<GUIListBox>();
ScrollBar = UserData.CreateStatic<GUIScrollBar>();
Screen = UserData.CreateStatic<Screen>();
Anchor = UserData.CreateStatic<Anchor>();
Alignment = UserData.CreateStatic<Alignment>();
@@ -40,6 +43,8 @@ namespace Barotrauma
}
}
public static object Screen;
public static object RectTransform;
public static object LayoutGroup;
public static object Button;
@@ -50,6 +55,7 @@ namespace Barotrauma
public static object TickBox;
public static object Image;
public static object ListBox;
public static object ScrollBar;
public static object Pivot;
public static object Anchor;
@@ -171,7 +171,7 @@ namespace Barotrauma
}
}
public static class PlayerInput
public class PlayerInput
{
static MouseState mouseState, oldMouseState;
static MouseState latestMouseState; //the absolute latest state, do NOT use for player interaction
@@ -502,6 +502,8 @@ namespace Barotrauma
allowInput = true;
}
GameMain.Lua.hook.Call("keyUpdate", new object[] { deltaTime });
oldMouseState = mouseState;
mouseState = latestMouseState;
UpdateVariable();
@@ -92,6 +92,7 @@ namespace Barotrauma
if (GameMain.GameSession != null) GameMain.GameSession.AddToGUIUpdateList();
Character.AddAllToGUIUpdateList();
base.AddToGUIUpdateList();
}
public override void Draw(double deltaTime, GraphicsDevice graphics, SpriteBatch spriteBatch)