public Menu(IHarmonicContainerView harmonicContainerView, IMenuController menuController) { InitializeComponent(); _menuController = menuController; _harmonicContainerView = harmonicContainerView; _harmonicContainerVizualization = new HarmonicContainerReprezentation(_harmonicContainerView, tabPage1, dataGridView1); }
public ActionFactory(RootConfiguration config, IKeyboardSimulator keyboard, IMouseSimulator mouse, IMenuController menuController) { Config = config; Keyboard = keyboard; Mouse = mouse; MenuController = menuController; }
public override void InitializeImpl() { _inputBuffer = new InputBuffer(); _controller = new MenuController(); _name = Factories.RFactory.CreateMenuItem(Name); _race = Factories.RFactory.CreateMenuItem(Race); _archeType = Factories.RFactory.CreateMenuItem(ArcheType); _skillSet = Factories.RFactory.CreateMenuItem(SkillSet); _signatureSpell = Factories.RFactory.CreateMenuItem(SignatureSpell); _normalAttack = Factories.RFactory.CreateMenuItem(NormalAttack); _FIR = Factories.RFactory.CreateMenuItem(FIR); _WAT = Factories.RFactory.CreateMenuItem(WAT); _ICE = Factories.RFactory.CreateMenuItem(ICE); _ARC = Factories.RFactory.CreateMenuItem(ARC); _WND = Factories.RFactory.CreateMenuItem(WND); _HOL = Factories.RFactory.CreateMenuItem(HOL); _DRK = Factories.RFactory.CreateMenuItem(DRK); _GRN = Factories.RFactory.CreateMenuItem(GRN); _LGT = Factories.RFactory.CreateMenuItem(LGT); _createChar = Factories.RFactory.CreateMenuItem(CreateChar, () => { Model.Party.AddCharacter(Model.PreGameModel.Character); Model.OverworldModel.GenerateNewMap(Model.PreGameModel.Character.CurrentLevel); Master.Next(); }); _controller.NoInputUpdate(true); }
public ApplicationLoop(RootConfiguration configuration, ProfileCollection profileCollection, IMenuController menuController, IGamePadStateReader stateReader) { Configuration = configuration; ProfileCollection = profileCollection; MenuController = menuController; StateReader = stateReader; }
protected MenuUIManager(IMenuController menuController) { MenuRoot = UI.Root; MenuRoot.SetDefaultStyle(Game.PackageManager.GetXmlFile("UI/MainMenuStyle.xml", true)); this.MenuController = menuController; MainMenu = new MainMenu(this); OptionsScreen = new OptionsScreen(this); PauseMenu = new PauseMenu(this); LoadingScreen = new LoadingScreen(this); SaveGameScreen = new SaveGameScreen(this); LoadGameScreen = new LoadGameScreen(this); PackagePickingScreen = new PackagePickingScreen(this); LevelPickingScreen = new LevelPickingScreen(this); LevelSettingsScreen = new LevelSettingsScreen(this); LevelCreationScreen = new LevelCreationScreen(this); SaveAsScreen = new SaveAsScreen(this); EndScreen = new EndScreen(this); AboutScreen = new AboutScreen(this); FileBrowsingPopUp = new FileSystemBrowsingPopUp(this); ConfirmationPopUp = new ConfirmationPopUp(this); ErrorPopUp = new ErrorPopUp(this); PreviousScreens = new Stack <MenuScreen>(); }
public void Initialize() { topParent = null; canvas = null; controller = null; try { Scene scene = SceneManager.GetSceneByName(R.S.Scene.ToString(menu.Scene)); foreach (GameObject gameObject in scene.GetRootGameObjects()) { canvas = gameObject.GetComponentInChildren <Canvas>(); if (canvas != null) { topParent = gameObject; break; } } } catch (ArgumentException) { throw new ArgumentException("Missing menu in current activity."); } if (canvas == null || topParent == null) { throw new ArgumentException("Unable to find Canvas and GameObject for Menu."); } if (menu.Controller != R.E.GameObject.None) { string gameObjectName = R.S.GameObject.ToString(menu.Controller); GameObject gameObject = GameObject.Find(gameObjectName); if (gameObject == null) { throw new ArgumentException("Unable to find controller for Menu : no GameObject of name \"" + gameObjectName + "\" found."); } controller = gameObject.GetComponentInChildren <IMenuController>(); if (controller == null) { throw new ArgumentException("Unable to find controller for Menu : no IMenuController exists " + "on GameObject of name \"" + gameObjectName + "\"."); } } if (menu.IsAlwaysVisible()) { OnCreate(menuIndex); OnResume(); } else { topParent.SetActive(false); canvas.sortingOrder = 0; } }
public void before() { serviceLocator = MockRepository.GenerateStub<IServiceLocator>(); shellView = MockRepository.GenerateMock<IShellView>(); menuController = MockRepository.GenerateMock<IMenuController>(); serviceLocator.Stub(x => x.GetInstance<IMenuController>()).Return(menuController); }
public PhaseEventHandler(IMenuController mainMenuController, ListBox harmonicList, ErrorProvider errorProvider, TextBox phaseyTextBox) { _mainMenuController = mainMenuController; _phaseTextBox = phaseyTextBox; _phaseErrorProvider = errorProvider; _harmonicList = harmonicList; _phaseTextBox.TextChanged += new EventHandler(PhaseTextBox_TextChanged); }
public FrequencyEventHandler(IMenuController mainMenuController, ListBox harmonicList, ErrorProvider errorProvider, TextBox frequencyTextBox) { _mainMenuController = mainMenuController; _frequencyTextBox = frequencyTextBox; _frequencyErrorProvider = errorProvider; _harmonicList = harmonicList; _frequencyTextBox.TextChanged += new EventHandler(FrequencyTextBox_TextChanged); }
public AmplitudeEventHandler(IMenuController mainMenuController, ListBox harmonicList, ErrorProvider errorProvider, TextBox amplitudeTextBox) { _mainMenuController = mainMenuController; _amplitudeTextBox = amplitudeTextBox; _amplitudeErrorProvider = errorProvider; _harmonicList = harmonicList; _amplitudeTextBox.TextChanged += new EventHandler(AmplitudeTextBox_TextChanged); }
public void Start() { Debug.Assert(gameObject == null, "Starting an already started UISystem"); InitGameObject(); menuController = new MenuController(); menuController.FirstStart(); }
public MainMenuView(IHarmonicContainerView harmonicContainer, IMenuController mainMenuController) { InitializeComponent(); _mainMenuController = mainMenuController; _harmonicContainer = harmonicContainer; _harmonicContainerVizualization = new HarmonicContainerVizualizer(_harmonicContainer, tabPage1, chartTableView); _harmonicContainer.AddObserver(_harmonicContainerVizualization); InitializeEventHandlers(); }
public HarmonicKindEventHandler(IMenuController mainMenuController, ListBox harmonicList, RadioButton sinRadioButton, RadioButton cosRadioButton) { _mainMenuController = mainMenuController; _sinRadioButton = sinRadioButton; _cosRadioButton = cosRadioButton; _harmonicList = harmonicList; _sinRadioButton.CheckedChanged += new EventHandler(SinRadioButton_CheckedChanged); _cosRadioButton.CheckedChanged += new EventHandler(CosRadioButton_CheckedChanged); }
public ProjectExplorerPresenter(IProjectExplorerView view, IMenuController menuController) : base(view) { _menuController = menuController; _view = view; view.SetPresenter(this); IMenuRegistry toolBar = _menuController.GetMenuFor(typeof(IProjectExplorerPresenter)); view.SetToolbar(toolBar); }
public ProjectExplorerPresenter(IProjectExplorerView view, IMenuController menuController) : base(view) { _menuController = menuController; _view = view; view.SetPresenter(this); IMenuRegistry toolBar = _menuController.GetMenuFor(typeof (IProjectExplorerPresenter)); view.SetToolbar(toolBar); }
private void Arrived() { if (next != null) { current = next; } if (current != null) { lastId = current.Id(); current.DoAfterArrival(); } }
private void OnMenuUpdate(MenuDTO menu, MenuViewModel viewModel) { using (IMenuController controller = factory.CreateMenuController()) { ControllerMessage controllerMessage = controller.UpdateMenu(menu); if (!controllerMessage.IsSuccess) { MessageBox.Show(controllerMessage.Message); } Notify(); } }
public ProfileFactory( RootConfiguration rootConfiguration, IActionFactory actionFactory, IKeyboardSimulator keyboard, IMouseSimulator mouse, IMenuController menuController) { RootConfiguration = rootConfiguration; ActionFactory = actionFactory; Keyboard = keyboard; Mouse = mouse; MenuController = menuController; }
public override void InitializeImpl() { _battleModel = Model.BattleModel; _spell = Factories.RFactory.CreateMenuItem("Spell", () => Master.SetCurrentState((int)BattleMenuState.SelectSpell)); _switch = Factories.RFactory.CreateMenuItem("Switch", () => Master.SetCurrentState((int)BattleMenuState.Switch)); _convince = Factories.RFactory.CreateMenuItem("Convert", () => Master.SetCurrentState((int)BattleMenuState.Convince)); _formation = Factories.RFactory.CreateMenuItem("Set Formation", () => Master.SetCurrentState((int)BattleMenuState.SetFormation)); _controller = new MenuController(); Model.MenuModel.BattleMenu = this; }
public void Update() { Categories.Clear(); using (IMenuController controller = factory.CreateMenuController()) { DataControllerMessage <MenuDTO> controllerMessage = controller.GetMenu(); if (controllerMessage.IsSuccess) { foreach (CategoryMenuDTO categoryMenu in controllerMessage.Data.Categories) { Categories.Add(categoryMenu); } } } }
void Awake() { // Force initialization from here var lm = LevelManager.Instance; Debug.Log("Initialized Level Manager: " + lm); menus.Add(MainMenuController.ID, FindObjectOfType <MainMenuController>()); menus.Add(OptionsMenuController.ID, FindObjectOfType <OptionsMenuController>()); menus.Add(StatsMenuController.ID, FindObjectOfType <StatsMenuController>()); menus.Add(ExitMenuController.ID, FindObjectOfType <ExitMenuController>()); menus.Add(StartMenuController.ID, FindObjectOfType <StartMenuController>()); menus.Add(CreditsMenuController.ID, FindObjectOfType <CreditsMenuController>()); menus.Add(BadgesMenuController.ID, FindObjectOfType <BadgesMenuController>()); next = menus[MainMenuController.ID]; }
/// <summary> /// Second part of the initialization, it creates the appropriate number of controllers (4/8) /// the hologram menu if provided, and place them in their correct initial position /// </summary> private void InitControllers() { //Init Pivot if (m_ManipulationSettings.PivotPrefab != null) { m_PivotInstance = Instantiate(m_ManipulationSettings.PivotPrefab, m_ManipulatorsContainer.transform); } //Init Menu Controller if (m_ManipulationSettings.EnableControllerMenu && m_ManipulationSettings.ControllerMenuPrefab) { m_MenuInstance = Instantiate(m_ManipulationSettings.ControllerMenuPrefab, m_ManipulatorsContainer.transform); if (m_MenuInstance) { m_MenuController = m_MenuInstance.GetComponentInChildren <IMenuController>(true); if (m_MenuController != null) { m_MenuController.Init(gameObject); } } } //Init Hologram Base if (m_ManipulationSettings.EnableBaseDrawing && m_ManipulationSettings.BaseLinePrefab != null) { for (int i = 0; i < 4; i++) { m_BoundaryBase[i] = Instantiate(m_ManipulationSettings.BaseLinePrefab, m_ManipulatorsContainer.transform).GetComponent <BoundaryLineController>(); } } //Init Translate controllers m_TranslateControllerInstance = gameObject.AddComponent <HandTranslating>(); m_TranslateControllerInstance.Init(transform, m_ManipulationSettings); //Init Rotation and Scale controllers switch (HologramType) { case HologramType._2D: Init2DHologramControllers(); break; case HologramType._3D: Init3DHologramControllers(); break; } }
private void setActiveMenu(IMenuController menuController, bool bayClick = false) { if (bayClick && activeMenu != null) { return; } if (activeMenu == null) { MenuPanel.SetActive(true); } else { activeMenu.setActive(false); } activeMenu = menuController; menuController.setActive(true); }
public void CloseMenu() { if (activeMenu == null) { Debug.LogError("Closing menu while not having an active menu open"); return; } if (activeMenu.getSubpanel() != null) { IMenuController subPanel = activeMenu.getSubpanel().GetComponent <IMenuController>(); if (subPanel == null) { throw new ArgumentException("penis in my asshole"); } setActiveMenu(subPanel); SubPanel = null; } else { activeMenu.setActive(false); activeMenu = null; MenuPanel.SetActive(false); } }
public MenuFacility() { _topMenuRegistry = new MenuRegistry(); _menuController = new MenuController(_topMenuRegistry); }
public void Initialize() { isRunning = false; isShown = false; topParent = null; canvas = null; controller = null; try { Scene scene = SceneManager.GetSceneByName(R.S.Scene.ToString(menu.Scene)); foreach (GameObject gameObject in scene.GetRootGameObjects()) { canvas = gameObject.GetComponentInChildren <Canvas>(); if (canvas != null) { topParent = gameObject; break; } } } catch (ArgumentException) { Debug.LogError("Unable to find Canvas for Menu named \"" + menu.name + "\"."); } if (canvas == null || topParent == null) { Debug.LogError("Unable to find Canvas for Menu named \"" + menu.name + "\"."); } if (menu.Controller != R.E.GameObject.None) { string gameObjectName = R.S.GameObject.ToString(menu.Controller); GameObject gameObject = GameObject.Find(gameObjectName); if (gameObject == null) { Debug.LogError("Unable to find controller for Menu : no GameObject of name \"" + gameObjectName + "\" found."); } else { controller = gameObject.GetComponentInChildren <IMenuController>(); if (controller == null) { Debug.LogError("Unable to find controller for Menu : no IMenuController exists " + "on GameObject named \"" + gameObjectName + "\"."); } } } if (topParent != null && canvas != null) { if (!IsAlwaysVisible()) { topParent.SetActive(false); canvas.sortingOrder = 0; } } }
public SpellSelect() { _menu = Factories.RFactory.CreateMenu(); _controller = new MenuController(); }
private void Construct(Camera camera, IMenuController menuController, IWorldPlaceholder worldPlaceholder) { _camera = camera; _menuController = menuController; _worldPlaceholder = worldPlaceholder; }
public MenuPointerActuator(IMenuController menuController) { MenuController = menuController; }
public void InitInEditMode() { menuController = new MenuControllerStub(); }
public MenuFacility() { _topMenuRegistry = new MenuRegistry(); _menuController = new MenuController(_topMenuRegistry); }
public MainWindow(IMenuController menuController) { DataContext = menuController; InitializeComponent(); }
public void Initialize() { menuController = serviceLocator.GetInstance<IMenuController>(); SetupDefaultMenu(); shellView.Display(); }
public MainMenuLogic() { _mainMenuStateMachine = new StateMachine(); _menuController = new MenuController(); }