Ejemplo n.º 1
0
 private void PrepareMenuPhase2(string caption)
 {
     GTA.Menu menu = new GTA.Menu(String.Format(" {0}", caption), _menuItems.ToArray()) { Width = 400 };
     _viewPort.MenuPosition = new Point(0, 0);
     _viewPort = new Viewport();
     _viewPort.AddMenu(menu);
     _branch = 2;
 }
Ejemplo n.º 2
0
        void MainMenu()
        {
            GTA.MenuButton btnToggleInfection = new GTA.MenuButton("Toggle Infection");
            GTA.MenuButton btnIncreaseRadius = new GTA.MenuButton("Increase Radius");
            GTA.MenuButton btnDecreaseRadius = new GTA.MenuButton("Decrease Radius");

            btnToggleInfection.Activated += btnToggleInfection_Activated;
            btnIncreaseRadius.Activated += btnIncreaseRadius_Activated;
            btnDecreaseRadius.Activated += btnDecreaseRadius_Activated;
            _selectedItem = 0;

            _menuItems = new List<GTA.IMenuItem>()
            {
                btnToggleInfection,
                btnIncreaseRadius,
                btnDecreaseRadius
            };
            _branch = 1;
            GTA.Menu menu = new GTA.Menu("Infection by ZyDevs", _menuItems.ToArray()) { Width = 300 };
            _viewPort = new Viewport();
            menu.HeaderColor = Color.FromArgb(160, Color.Aqua);
            menu.ItemHeight = 30;
            menu.HeaderFont = GTA.Font.Pricedown;
            menu.HeaderHeight = 35;
            menu.SelectedItemColor = Color.FromArgb(150, Color.DimGray);
            menu.SelectedTextColor = Color.FromArgb(255, Color.White);
            menu.UnselectedTextColor = Color.FromArgb(255, Color.DodgerBlue);
            menu.UnselectedItemColor = Color.FromArgb(175, Color.Black);
            menu.HeaderFont = GTA.Font.ChaletComprimeCologne;
            menu.FooterColor = Color.Transparent;
            _viewPort.MenuPosition = new Point(1, 1);
            _viewPort.AddMenu(menu);
            _isMenuOpen = true;
        }