コード例 #1
0
ファイル: Menu.cs プロジェクト: NeXuSTrain/OpenBVE
 //
 // PUSH ANOTHER MENU
 //
 public void PushMenu(MenuType type, int data = 0)
 {
     if (!isInitialized)
     {
         Init();
     }
     CurrMenu++;
     if (Menus.Length <= CurrMenu)
     {
         Array.Resize(ref Menus, CurrMenu + 1);
     }
     Menus[CurrMenu] = new Menu.SingleMenu(type, data);
     PositionMenu();
     Game.CurrentInterface = Game.InterfaceType.Menu;
 }
コード例 #2
0
        //
        // PUSH ANOTHER MENU
        //

        /// <summary>Pushes a menu into the menu stack</summary>
        /// <param name= "type">The type of menu to push</param>
        /// <param name= "data">The index of the menu in the menu stack (If pushing an existing higher level menu)</param>
        public void PushMenu(MenuType type, int data = 0)
        {
            if (Program.Renderer.CurrentInterface != InterfaceType.Menu)
            {
                // Deliberately set to the standard cursor, as touch controls may have set to something else
                Program.currentGameWindow.Cursor = MouseCursor.Default;
            }
            if (!isInitialized)
            {
                Init();
            }
            CurrMenu++;
            if (Menus.Length <= CurrMenu)
            {
                Array.Resize(ref Menus, CurrMenu + 1);
            }
            Menus[CurrMenu] = new Menu.SingleMenu(type, data);
            PositionMenu();
            Program.Renderer.CurrentInterface = InterfaceType.Menu;
        }
コード例 #3
0
ファイル: Menu.cs プロジェクト: leezer3/OpenBVE
		//
		// PUSH ANOTHER MENU
		//

		/// <summary>Pushes a menu into the menu stack</summary>
		/// <param name= "type">The type of menu to push</param>
		/// <param name= "data">The index of the menu in the menu stack (If pushing an existing higher level menu)</param>
		public void PushMenu(MenuType type, int data = 0)
		{
			if (!isInitialized)
				Init ();
			CurrMenu++;
			if (Menus.Length <= CurrMenu)
				Array.Resize(ref Menus, CurrMenu + 1);
			Menus[CurrMenu]			= new Menu.SingleMenu(type, data);
			PositionMenu();
			Game.CurrentInterface	= Game.InterfaceType.Menu;
		}