void App_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args) { var locator = Resources["Locator"] as ViewModelLocator; if (locator == null) { return; } var account = new SettingsCommandHandler <AccountFlyout>( "AccountSettings", "Account", f => f.Back); var preferences = new SettingsCommandHandler <PreferencesFlyout>( "PreferencesSettings", "Preferences", f => f.Back); args.Request.ApplicationCommands.Add( account.SettingsCommand); if (locator.CanSetPreferences) { args.Request.ApplicationCommands.Add( preferences.SettingsCommand); } }
public EmitterSettingsController(ImGuiManager imGuiManager, SettingsCommandHandler commandHandler, ApplicationState applicationState, AppOperationQueue appOperationQueue, ITextureFileLoader textureFileLoader, MonoGameImGuiRenderer monoGameImGuiRenderer) { _commandHandler = commandHandler; _applicationState = applicationState; _appOperationQueue = appOperationQueue; _textureFileLoader = textureFileLoader; _monoGameImGuiRenderer = monoGameImGuiRenderer; _workbench = new Workbench(commandHandler) { IsVisible = false }; imGuiManager.AddElement(_workbench); _activeEditorWindow = new ActiveEditorWindow() { IsVisible = false }; imGuiManager.AddElement(_activeEditorWindow); _workbench.PropertyChanged += WorkbenchOnPropertyChanged; _workbench.ModifierRemovalRequested += WorkbenchOnModifierRemovalRequested; }
public EditorUiController(ImGuiManager imGuiManager, SettingsCommandHandler commandHandler, AppOperationQueue appOperationQueue, ApplicationState applicationState, ITextureFileLoader textureFileLoader, MonoGameImGuiRenderer monoGameImGuiRenderer) { _imGuiManager = imGuiManager; _appOperationQueue = appOperationQueue; _applicationState = applicationState; _imguiDemoWindow = new DemoWindow { IsVisible = false }; _imGuiManager.AddElement(_imguiDemoWindow); var appToolbar = new AppToolbar(_appOperationQueue, _applicationState); _imGuiManager.AddElement(appToolbar); _newFileDialog = new NewFileDialog(); _newFileDialog.CreateButtonClicked += NewFileDialogOnCreateButtonClicked; _newFileDialog.ModalClosed += NewFileDialogOnModalClosed; _imGuiManager.AddElement(_newFileDialog); _messagePopup = new MessagePopup(); _messagePopup.ModalClosed += MessagePopupOnModalClosed; _imGuiManager.AddElement(_messagePopup); _emitterSettingsController = new EmitterSettingsController(imGuiManager, commandHandler, applicationState, appOperationQueue, textureFileLoader, monoGameImGuiRenderer); appToolbar.NewMenuItemClicked += AppToolbarOnNewMenuItemClicked; appToolbar.OpenMenuItemClicked += AppToolbarOnOpenMenuItemClicked; appToolbar.SaveMenuItemClicked += AppToolbarOnSaveMenuItemClicked; }