public static void Init(Vector2 screenSize, TextFont font) { ScreenSize = screenSize; MinimizedWindowSize = new Vector2(25, 100); Font = font; DisabledColor = new Color(200, 200, 200); BGColor = new Color(220, 220, 220); BGHoverColor = new Color(200, 200, 200); BGPressedColor = new Color(150, 150, 150); SurfaceColor = new Color(150, 150, 150); SurfaceHoverColor = new Color(100, 100, 100); SurfacePressedColor = new Color(50, 50, 50); HighlightColor = new Color(200, 200, 200); BlueHighlightColor = new Color(100, 150, 255); BGOffset = 1; CurrentInterfaceIndex = 0; KeyList.Init(); }
public override void Update() { base.Update(); if (Mouse.GetState().LeftButton == ButtonState.Pressed && !pressedOnTB && !IntersectingMouse()) { active = false; } if (pressing_) { pressedOnTB = true; } if (Mouse.GetState().LeftButton == ButtonState.Released) { pressedOnTB = false; } if (active) { pointerBlinkCounter++; if (pointerBlinkCounter >= pointerBlinkInterval) { pointerBlinkCounter = 0; pointerShowing = !pointerShowing; } keyCombos.Update(); char c; if (KeyList.TryConvertKeyboardInput(out c, true)) { SetText(tbText.String + c); pointerPos++; } } else { pointerShowing = false; } }
public static void Update() { KeyList.Update(); CurrentInterface.Update(); }