public void Hide(uint id) { if (_activeForm != null) { if (_activeForm.FormId == id) { GuiManager.HideDialog(_activeForm); _activeForm = null; } } }
public void Show(uint id, Form form) { if (_activeForm != null) { GuiManager.HideDialog(_activeForm); } if (form is SimpleForm simpleForm) { GuiManager.ShowDialog(_activeForm = new SimpleFormDialog(id, this, simpleForm, InputManager)); } else if (form is CustomForm customForm) { GuiManager.ShowDialog(_activeForm = new CustomFormDialog(id, this, customForm, InputManager)); } else { Log.Warn($"Form type not supported: {form.GetType()}"); } }