Esempio n. 1
0
	public void SwitchToMenu(MenuTypes menuName)
	{
		placeBackMenus();
		switch (menuName) 
		{
			case MenuTypes.MAIN:
				currentMenu = mainMenu;
			break;

			case MenuTypes.LEVEL_SELECT:
				currentMenu = levelSelect;
			break;

			case MenuTypes.HELP:
				currentMenu = help;
			break;
		
			case MenuTypes.CREDITS:
				currentMenu = credits;
			break;

			default:
			break;
		}
		currentMenu.transform.position = mainCamera.transform.position;
		currentMenu.transform.position += menuOffset;
		return;
	}
Esempio n. 2
0
    public void SwitchToMenu(MenuTypes menuName)
    {
        currentMenu.DeactivateMenu();
        placeBackMenus();
        switch (menuName)
        {
        case MenuTypes.MAIN:
            currentMenu = mainMenu;
            break;

        case MenuTypes.HELP:
            currentMenu = helpMenu;
            break;

        case MenuTypes.CREDITS:
            currentMenu = creditsMenu;
            break;

        default:
            break;
        }
        currentMenu.transform.position  = mainCamera.transform.position;
        currentMenu.transform.position += menuOffset;
        currentMenu.ActivateMenu();
        return;
    }
Esempio n. 3
0
	public void SwitchToMenu(MenuTypes menuName)
	{
		currentMenu.DeactivateMenu();
		placeBackMenus();
		switch (menuName) 
		{
			case MenuTypes.MAIN:
				currentMenu = mainMenu;
			break;

			case MenuTypes.HELP:
				currentMenu = helpMenu;
			break;
		
			case MenuTypes.CREDITS:
				currentMenu = creditsMenu;
			break;

			default:
			break;
		}
		currentMenu.transform.position = mainCamera.transform.position;
		currentMenu.transform.position += menuOffset;
		currentMenu.ActivateMenu();
		return;
	}
Esempio n. 4
0
	void Start () 
	{
		Cursor.visible = true;
		
		epilogueMenuOriginalPosition = epilogueMenu.transform.position;
		menuOffset = new Vector3 (0, 0, 5);
		
		currentMenu = epilogueMenu;
		SwitchToMenu (MenuTypes.MAIN);
	}
Esempio n. 5
0
    void Start()
    {
        mainMenuOriginalPosition    = mainMenu.transform.position;
        helpMenuOriginalPosition    = helpMenu.transform.position;
        creditsMenuOriginalPosition = creditsMenu.transform.position;
        menuOffset = new Vector3(0, 0, 5);

        currentMenu = mainMenu;
        SwitchToMenu(MenuTypes.MAIN);
    }
Esempio n. 6
0
	void Start () 
	{
		mainMenuOriginalPosition = mainMenu.transform.position;
		helpMenuOriginalPosition = helpMenu.transform.position;
		creditsMenuOriginalPosition = creditsMenu.transform.position;
		menuOffset = new Vector3 (0, 0, 5);

		currentMenu = mainMenu;
		SwitchToMenu (MenuTypes.MAIN);
	}
Esempio n. 7
0
	void Start () 
	{
		Cursor.visible = true;

		mainMenuOriginalPosition = mainMenu.transform.position;
		levelSelectOriginalPosition = levelSelect.transform.position;
		helpOriginalPosition = help.transform.position;
		creditsOriginalPosition = credits.transform.position;
		menuOffset = new Vector3 (0, 0, 5);

		currentMenu = mainMenu;
		SwitchToMenu (MenuTypes.MAIN);
	}
Esempio n. 8
0
	public void SwitchToMenu(MenuTypes menuName)
	{
		placeBackMenus();
		switch (menuName) 
		{
			
		case MenuTypes.MAIN:
			currentMenu = epilogueMenu;
			break;
			
		default:
			break;
		}
		currentMenu.transform.position = mainCamera.transform.position;
		currentMenu.transform.position += menuOffset;
		return;
	}
 public void Cancel()
 {
     BuildMenu.SetActive(false); StandardMenu.SetActive(true); isBuilding = false; mouseInd.SetActive(false);
 }
 public void Build()
 {
     BuildMenu.SetActive(true); StandardMenu.SetActive(false);
 }
Esempio n. 11
0
        internal Main(Loader loader)
        {
            InitializeComponent();

            FormClosing += FormClosingHandler;

            // Toolbars

            _menu = new StandardMenu();

            _standardToolbar = new StandardToolbar();
            _tileToolbar     = new TileToolbar();

            toolStripContainer1.TopToolStripPanel.Controls.AddRange(new Control[] {
                _standardToolbar.Strip,
                _tileToolbar.Strip
            });

            Controls.Add(_menu.Strip);
            MainMenuStrip = _menu.Strip;

            _infoStatus = new InfoStatus(statusBar);

            //PresenterManager pm = new PresenterManager();

            //_editor = new EditorPresenter();
            //_editor.Initialize(pm);

            _pm     = loader.InitializePresenterManager();
            _editor = _pm.Lookup <EditorPresenter>();

            loader.InitializeProjectPanelComponents(projectPanel1.ComponentManager);

            //pm.Register(_editor);

            //_editor.SyncContentTabs += SyncContentTabsHandler;
            _editor.SyncContentView  += SyncContentViewHandler;
            _editor.SyncModified     += SyncProjectModified;
            _editor.PanelActivation  += PanelActivated;
            _editor.SyncCurrentLevel += SyncCurrentLevel;

            _editor.ContentWorkspace.ContentOpened += ContentWorkspaceContentOpened;
            _editor.ContentWorkspace.ContentClosed += ContentWorkspaceContentClosed;
            _editor.ContentWorkspace.ProjectReset  += ContentWorkspaceReset;

            //_editor.CommandManager.Perform(Presentation.Commands.CommandKey.OpenProject);
            _editor.NewDefault();

            tabControlEx1.ContextMenuStrip = CommandMenuBuilder.BuildContextMenu(new CommandMenu("", new List <CommandMenuGroup>()
            {
                new CommandMenuGroup()
                {
                    CommandKey.LevelClose, CommandKey.LevelCloseAllOther,
                },
                new CommandMenuGroup()
                {
                    CommandKey.LevelRename, CommandKey.LevelResize,
                },
                new CommandMenuGroup()
                {
                    CommandKey.LevelProperties,
                },
            }));
            tabControlEx1.ContextMenuStrip.Opening += contextMenuStrip1_Opening;

            _commandController = new UICommandController();
            _commandController.BindCommandManager(_editor.CommandManager);
            _commandController.MapMenuItems(tabControlEx1.ContextMenuStrip.Items);
        }