public void Close() { if (!Visible) { return; } UserInterfaceManagerInternal.RemoveModal(this); }
public void Open(UIBox2?box = null) { if (box != null) { Position = box.Value.TopLeft; Size = box.Value.Size; } Visible = true; UserInterfaceManagerInternal.PushModal(this); }
public void Toggle() { var focus = CommandBar.HasKeyboardFocus(); Visible = !Visible; if (Visible) { CommandBar.GrabKeyboardFocus(); } else if (focus) { // We manually need to call this. // See https://github.com/godotengine/godot/pull/15074 UserInterfaceManagerInternal.GDFocusExited(CommandBar); } }
public void Open(UIBox2?box = null) { if (Visible) { UserInterfaceManagerInternal.RemoveModal(this); } if (box != null) { LayoutContainer.SetPosition(this, box.Value.TopLeft); LayoutContainer.SetSize(this, box.Value.Size); } Visible = true; UserInterfaceManagerInternal.PushModal(this); }
public void Open(UIBox2?box = null) { if (Visible) { UserInterfaceManagerInternal.RemoveModal(this); } if (box != null) { PopupContainer.SetPopupOrigin(this, box.Value.TopLeft); _desiredSize = box.Value.Size; } Visible = true; UserInterfaceManagerInternal.PushModal(this); }
public void Open(UIBox2?box = null) { if (GameController.OnGodot) { SceneControl.Call("popup", box?.Convert()); } else { if (box != null) { Position = box.Value.TopLeft; Size = box.Value.Size; } Visible = true; UserInterfaceManagerInternal.PushModal(this); } }
public void Open(UIBox2?box = null, Vector2?altPos = null) { if (Visible) { UserInterfaceManagerInternal.RemoveModal(this); } if (box != null && _desiredSize != box.Value.Size) { PopupContainer.SetPopupOrigin(this, box.Value.TopLeft); PopupContainer.SetAltOrigin(this, altPos); _desiredSize = box.Value.Size; MinimumSizeChanged(); } Visible = true; UserInterfaceManagerInternal.PushModal(this); }
public void Open(UIBox2?box = null, Vector2?altPos = null) { if (Visible) { UserInterfaceManagerInternal.RemoveModal(this); } if (box != null && (_desiredSize != box.Value.Size || PopupContainer.GetPopupOrigin(this) != box.Value.TopLeft || PopupContainer.GetAltOrigin(this) != altPos)) { PopupContainer.SetPopupOrigin(this, box.Value.TopLeft); PopupContainer.SetAltOrigin(this, altPos); _desiredSize = box.Value.Size; InvalidateMeasure(); } Visible = true; UserInterfaceManagerInternal.PushModal(this); }
private void __treeExitedHook() { // Eh maybe make a separate event later. UserInterfaceManagerInternal.GDFocusEntered(this); FocusExited(); }
private void __focusExitedHook() { UserInterfaceManagerInternal.GDFocusExited(this); FocusExited(); }
private void __mouseExitedHook() { UserInterfaceManagerInternal.GDMouseExited(this); MouseExited(); }