Ejemplo n.º 1
0
    private void SublimeWeaponComponentMenu(MenuButton buttonSender, WeaponHash weaponHash)
    {
        List <IMenuItem> componentButtons = new List <IMenuItem>();

        foreach (KeyValuePair <string, string> weaponComponent in weaponComponentItems)
        {
            int  weaponComponentHash    = Function.Call <int>(Hash.GET_HASH_KEY, weaponComponent.Key);
            bool canWeaponHaveComponent = Function.Call <bool>(Hash._CAN_WEAPON_HAVE_COMPONENT, (int)weaponHash, weaponComponentHash);
            if (canWeaponHaveComponent)
            {
                var componentActivateButton = new MenuButton(weaponComponent.Value);
                componentActivateButton.Activated += (sender, args) => WeaponFunctions.ChangeWeaponComponent(weaponHash, weaponComponent);
                componentButtons.Add(componentActivateButton);
            }
        }

        foreach (KeyValuePair <string, int> tintIndex in weaponTintIndexDict)
        {
            var tintActivateButton = new MenuButton(tintIndex.Key);
            tintActivateButton.Activated += (sender, args) => WeaponFunctions.ChangeWeaponTint(weaponHash, tintIndex.Value);
            componentButtons.Add(tintActivateButton);
        }

        WeaponComponentsMenu = new GTA.Menu(buttonSender.Caption, componentButtons.ToArray());
        DrawMenu(WeaponComponentsMenu);
    }
Ejemplo n.º 2
0
 private void onKeyUp(object sender, KeyEventArgs e) {
     if (e.KeyCode == Keys.T) {
         if (this.menuState == MenuState.CLOSED) {
             List<GTA.MenuItem> menuItems = new List<GTA.MenuItem>();
             List<string> tnames = Team.getTeamNames();
             tnames.ForEach((string name) => {
                 menuItems.Add(
                     new TeamSpawnerButton(name,
                         Messages.get("app-button-spawn-label", new string[] {name}), this.onTeamSelected
                     )
                 );
             });
             GTA.Menu menu = new GTA.Menu(Messages.get("app-menu-title"), menuItems.ToArray());
             menu.HeaderColor = Color.DarkBlue;
             menu.SelectedItemColor = Color.Aqua;
             menu.FooterColor = Color.White;
             menu.FooterHeight = 5;
             View.AddMenu(menu);
             this.menuState = MenuState.OPEN;
         } else {
             View.CloseAllMenus();
             this.menuState = MenuState.CLOSED;
         }
     } else if (e.KeyCode == Keys.L) {
         UI.Notify(Messages.get("app-notify-config-reload"));
         this.loadConfig();
     }
 }
Ejemplo n.º 3
0
        public AngryPedsScript()
        {
            GTA.MenuButton btnKill = new MenuButton("Kill All");
            btnKill.Activated += delegate { ExecuteKill(KillMode.KillAll); };
            GTA.MenuButton btnExplode = new MenuButton("Explode All");
            btnExplode.Activated += delegate { ExecuteKill(KillMode.ExplodeAll); };
            GTA.MenuButton btnSafeKill = new MenuButton("Electrocute Hostiles");
            btnSafeKill.Activated += delegate { ExecuteKill(KillMode.SafeKill); };
            GTA.MenuButton btnDisarmAll = new MenuButton("Disarm All");
            btnDisarmAll.Activated += delegate { ExecuteKill(KillMode.Disarm); };
            GTA.MenuButton btnSpawnTank = new MenuButton("Spawn Tank");
            btnSpawnTank.Activated += delegate { SpawnVehicle(VehicleHash.Rhino); };
            GTA.MenuButton btnSpawnBuzzard = new MenuButton("Spawn Buzzard");
            btnSpawnBuzzard.Activated += delegate { SpawnVehicle(VehicleHash.Buzzard); };
            GTA.MenuButton btnSpawnKuruma = new MenuButton("Spawn Kuruma");
            btnSpawnKuruma.Activated += delegate { SpawnVehicle(VehicleHash.Kuruma2); };
            menu = new GTA.Menu("Ultimate Kill", new GTA.IMenuItem[]
            {
                btnKill, btnExplode, btnDisarmAll, btnSafeKill, btnSpawnTank, btnSpawnBuzzard, btnSpawnKuruma,
            });
            menu.HasFooter = false;

            LeftKey     = Keys.NumPad4;
            RightKey    = Keys.NumPad6;
            UpKey       = Keys.NumPad8;
            DownKey     = Keys.NumPad2;
            ActivateKey = Keys.NumPad5;
            BackKey     = Keys.NumPad0;

            this.KeyDown += OnKeyDown;
        }
Ejemplo n.º 4
0
    void SupplyMenu()
    {
        List <IMenuItem> WeaponMenuList = new List <IMenuItem>();

        var button = new GTA.MenuButton("Weapons");

        button.Activated += (sender, args) => Exit();
        WeaponMenuList.Add(button);

        button            = new GTA.MenuButton("Health & Armour");
        button.Activated += (sender, args) => Exit();
        WeaponMenuList.Add(button);

        button            = new GTA.MenuButton("Food & Supplies");
        button.Activated += (sender, args) => Exit();
        WeaponMenuList.Add(button);

        button            = new GTA.MenuButton("Return");
        button.Activated += (sender, args) => Exit();
        WeaponMenuList.Add(button);

        var mainMenu = new Menu("Weapon Menu", WeaponMenuList.ToArray());

        DrawMenu(mainMenu);
    }
Ejemplo n.º 5
0
    private void DrawMenu(GTA.Menu name, bool hasFooter)
    {
        // Header Layout
        name.HeaderHeight += 2;
        name.HeaderFont    = GTA.Font.Pricedown;
        name.HeaderColor   = System.Drawing.Color.FromArgb(233, 0, 16, 99);

        // Items Layout
        name.ItemTextCentered    = false;
        name.ItemHeight         -= 7;
        name.ItemTextScale       = 0.32f;
        name.SelectedItemColor   = System.Drawing.Color.FromArgb(112, 0, 16, 115);
        name.UnselectedItemColor = System.Drawing.Color.FromArgb(112, 0, 16, 0);
        name.SelectedTextColor   = System.Drawing.Color.White;
        name.UnselectedTextColor = System.Drawing.Color.AntiqueWhite;

        // Footer Layout
        name.HasFooter       = hasFooter;
        name.FooterHeight   -= 32;
        name.FooterFont      = GTA.Font.Pricedown;
        name.FooterColor     = System.Drawing.Color.FromArgb(233, 0, 16, 99);
        name.FooterTextColor = System.Drawing.Color.White;

        View.MenuPosition = new System.Drawing.Point(5, 5);
        View.AddMenu(name);
    }
Ejemplo n.º 6
0
    private void SublimeVehicleMenu()
    {
        List<IMenuItem> vehicleMenuItems = new List<IMenuItem>();

        var buttonVehicleSpawnerMenu = new MenuButton("Vehicle Spawner Menu");
        buttonVehicleSpawnerMenu.Activated += (sender, args) => SublimeVehicleSpawnerMenu();
        vehicleMenuItems.Add(buttonVehicleSpawnerMenu);

        var buttonVehicleModKitMenu = new MenuButton("Vehicle Mod Menu");
        buttonVehicleModKitMenu.Activated += (sender, args) => SublimeVehicleModCategoriesMenu();
        vehicleMenuItems.Add(buttonVehicleModKitMenu);

        var toggleWarpInSpawned = new MenuToggle("Warp in Spawned Vehicle", "", VehicleFunctions.IsWarpInSpawnedVehicleEnabled);
        toggleWarpInSpawned.Changed += (sender, args) => VehicleFunctions.ToggleWarpInSpawnedVehicle();
        vehicleMenuItems.Add(toggleWarpInSpawned);

        var buttonFixVehicle = new MenuButton("Fix Vehicle");
        buttonFixVehicle.Activated += (sender, args) => VehicleFunctions.FixVehicle();
        vehicleMenuItems.Add(buttonFixVehicle);

        var toggleIndestructible = new MenuToggle("Indestructible", "", VehicleFunctions.IsVehicleIndestructible);
        toggleIndestructible.Changed += (sender, args) => VehicleFunctions.ToggleVehicleIndestructible();
        vehicleMenuItems.Add(toggleIndestructible);

        var toggleSeatBelt = new MenuToggle("Seat Belt", "", VehicleFunctions.IsSeatBeltEnabled);
        toggleSeatBelt.Changed += (sender, args) => VehicleFunctions.ToggleSeatBelt();
        vehicleMenuItems.Add(toggleSeatBelt);

        var toggleLockDoors = new MenuToggle("Lock Doors", "", VehicleFunctions.IsLockedDoorsEnabled);
        toggleLockDoors.Changed += (sender, args) => VehicleFunctions.ToggleLockDoors();
        vehicleMenuItems.Add(toggleLockDoors);

        var toggleNeverFallOffBike = new MenuToggle("Never Fall-Off Bike", "", VehicleFunctions.IsNeverFallOffBikeEnabled);
        toggleNeverFallOffBike.Changed += (sender, args) => VehicleFunctions.ToggleNeverFallOffBike();
        vehicleMenuItems.Add(toggleNeverFallOffBike);

        var toggleSpeedBoost = new MenuToggle("Speed Boost", "", VehicleFunctions.IsSpeedBoostEnabled);
        toggleSpeedBoost.Changed += (sender, args) => VehicleFunctions.ToggleSpeedBoost();
        vehicleMenuItems.Add(toggleSpeedBoost);

        var toggleVehicleJump = new MenuToggle("Vehicle Jump", "", VehicleFunctions.CanVehiclesJump);
        toggleVehicleJump.Changed += (sender, args) => VehicleFunctions.ToggleVehicleJump();
        vehicleMenuItems.Add(toggleVehicleJump);

        var enumVehicleWeaponAssets = new MenuEnumScroller("Vehicle Weapon", "", VehicleFunctions.VehicleWeaponAssetsDict.Keys.ToArray(), VehicleFunctions.VehicleWeaponAssetIndex);
        enumVehicleWeaponAssets.Changed += (sender, args) => VehicleFunctions.VehicleWeaponAssetIndex = enumVehicleWeaponAssets.Index;
        vehicleMenuItems.Add(enumVehicleWeaponAssets);

        var toggleVehicleWeapons = new MenuToggle("Vehicle Weapons", "", VehicleFunctions.IsVehicleWeaponsEnabled);
        toggleVehicleWeapons.Changed += (sender, args) => VehicleFunctions.ToggleVehicleWeapons();
        vehicleMenuItems.Add(toggleVehicleWeapons);

        VehicleMenu = new GTA.Menu("Vehicle Options", vehicleMenuItems.ToArray());
        DrawMenu(VehicleMenu);
    }
Ejemplo n.º 7
0
        public UIHandler()
        {
            RPG.UIHandler = this;
            //Use some fancy transitions
            View.MenuTransitions = true;
            View.PopMenu();
            View.MenuOffset = new Point(-302, 0);
            View.MenuPosition = new Point(UI.WIDTH -300, 0);

            OptionsMenu = new RPGMenu("Options", new GTASprite("CommonMenu", "interaction_bgd", Color.ForestGreen), new IMenuItem[] {
                        new MenuButton("Save Game", "").WithActivate(() => { RPG.SaveAllData(); RPG.Subtitle("Saved");}),
                        new MenuButton("New Game", "").WithActivate(NewGame),
                        new MenuNumericScroller("SafeArea Setting","",0,10,1,RPG.PlayerData.Setup.SafeArea).WithNumericActions(ChangeSafeArea,d => { }),
                        new MenuToggle("Toggle Skill Bar", "",ShowSkillBar).WithToggles(() => ShowSkillBar = true, () => ShowSkillBar = false),
                        new MenuToggle("Toggle Quest Tracker", "").WithToggles(() => ShowQuestTracker = true, () => ShowQuestTracker = false),
                        new MenuButton("Version", RPG.Version),
                        new MenuButton("Back", "").WithActivate(() => View.PopMenu())
                    });
            CharacterMenu = new RPGMenu("Character Menu", new GTASprite("CommonMenu", "interaction_bgd", Color.ForestGreen), new IMenuItem[] {
                        new MenuButton("Quests", "").WithActivate(OpenQuestLog),
                        new MenuButton("Set Skillbar", "").WithActivate(OpenSkillBarMenu),
                        new MenuButton("Skills", "").WithActivate(OpenSkillsMenu),
                        //new MenuButton("Talents", "", () => { View.PopMenu(); }),
                        //new MenuButton("Mod Weapons", "", () => { View.PopMenu(); }),
                        //new MenuButton("Mod Cars", "", () => { View.PopMenu();}),
                        new MenuButton("Back", "").WithActivate(() => View.PopMenu())
                    });

            ActionsMenu = new RPGMenu("ACTIONS", new GTASprite("CommonMenu", "interaction_bgd", Color.Red), new IMenuItem[] {
                        new MenuButton("Spawn Personal Vehicle", "").WithActivate(() => RPGMethods.SpawnCar()),
                        new MenuButton("Get Random Contract", "").WithActivate(GetRandomContract),
                        new MenuButton("Purchase Goods", "").WithActivate(OpenShop),
                        new MenuButton("Craft Items", "").WithActivate(OpenCrafting),
                        new MenuButton("Back", "").WithActivate(View.PopMenu)
                    });

            SkillTreeMenu = RPG.SkillHandler.GetSkillMenu();

            //var o = new MenuNumericScroller("Number", "", d => { }, d => { }, 0, 100, 1);
            //var p = new MenuToggle("Toggle", "", ()=> { }, () => { });

            MainMenu = new RPGMenu("RPG Menu", new GTASprite("CommonMenu", "interaction_bgd", Color.DodgerBlue), new IMenuItem[] {
                new MenuButton("Inventory", "").WithActivate(OpenInventory),
                new MenuButton("Character Menu", "").WithActivate(OpenCharacterMenu),
                new MenuButton("Actions ", "").WithActivate(() => View.AddMenu(ActionsMenu)),
                new MenuButton("Options", "").WithActivate(() => OpenOptionsMenu()),
                new MenuButton("Return to Normal Mode ", "").WithActivate(ConfirmReturnToNormal),
                new MenuButton("Close", "").WithActivate(View.PopMenu)
            });

            RPGUI.FormatMenu(OptionsMenu);
            RPGUI.FormatMenu(ActionsMenu);
            RPGUI.FormatMenu(MainMenu);
            RPGUI.FormatMenu(CharacterMenu);
        }
Ejemplo n.º 8
0
    private void SublimeVehicleModWheelsMenu(Vehicle currentVehicle)
    {
        List<IMenuItem> wheelCategoriesList = new List<IMenuItem>();

        var buttonWheelType = new MenuButton("Wheel Type");
        buttonWheelType.Activated += (sender, args) => SublimeVehicleModWheelTypesMenu(currentVehicle);
        wheelCategoriesList.Add(buttonWheelType);

        var vehicleModWheelsMenu = new GTA.Menu("Wheels", wheelCategoriesList.ToArray());
        DrawMenu(vehicleModWheelsMenu);
    }
Ejemplo n.º 9
0
        public UIHandler()
        {
            RPG.UIHandler = this;
            KeyDown      += OnKeyDown;
            //Use some fancy transitions
            View.MenuTransitions = true;
            View.PopMenu();
            View.MenuOffset   = new Point(-302, 0);
            View.MenuPosition = new Point(UI.WIDTH - 300, 0);

            CharacterMenu = new RPGMenu("Character Menu", new GTASprite("CommonMenu", "interaction_bgd", Color.ForestGreen), new IMenuItem[] {
                new MenuButton("Quests", "").WithActivate(OpenQuestLog),
                new MenuButton("Set Skillbar", "").WithActivate(OpenSkillBarMenu),
                new MenuButton("Skills", "").WithActivate(OpenSkillsMenu),
                new MenuButton("Weapons", "").WithActivate(OpenWeaponsMenu),
                //new MenuButton("Talents", "", () => { View.PopMenu(); }),
                //new MenuButton("Mod Weapons", "", () => { View.PopMenu(); }),
                //new MenuButton("Mod Cars", "", () => { View.PopMenu();}),
                new MenuButton("Back", "").WithActivate(() => View.PopMenu())
            });

            ActionsMenu = new RPGMenu("ACTIONS", new GTASprite("CommonMenu", "interaction_bgd", Color.Red), new IMenuItem[] {
                new MenuButton("Spawn Personal Vehicle", "").WithActivate(() => RPGMethods.SpawnCar()),
                new MenuButton("Get Random Contract", "").WithActivate(GetRandomContract),
                new MenuButton("Purchase Goods", "").WithActivate(OpenShop),
                new MenuButton("Craft Items", "").WithActivate(OpenCrafting),
                new MenuButton("Back", "").WithActivate(View.PopMenu)
            });

            SkillTreeMenu  = RPG.SkillHandler.GetSkillMenu();
            WeaponTreeMenu = RPG.WeaponHandler.GetWeaponMenu();

            //var o = new MenuNumericScroller("Number", "", d => { }, d => { }, 0, 100, 1);
            //var p = new MenuToggle("Toggle", "", ()=> { }, () => { });

            MainMenu = new RPGMenu("RPG Menu", new GTASprite("CommonMenu", "interaction_bgd", Color.DodgerBlue), new IMenuItem[] {
                new MenuButton("Inventory", "").WithActivate(OpenInventory),
                new MenuButton("Character Menu", "").WithActivate(OpenCharacterMenu),
                new MenuButton("Actions ", "").WithActivate(() => View.AddMenu(ActionsMenu)),
                new MenuButton("Options", "").WithActivate(() => OpenOptionsMenu()),
                new MenuButton("Play as Michael, Franklin and Trevor ", "").WithActivate(ConfirmPlayAsTrio),
                new MenuButton("Play as Yourself", "").WithActivate(ConfirmPlayAsYourCharacter),
                new MenuButton("Return to Normal Mode ", "").WithActivate(ConfirmReturnToNormal),
                new MenuButton("Close", "").WithActivate(View.PopMenu)
            });



            RPGUI.FormatMenu(ActionsMenu);
            RPGUI.FormatMenu(MainMenu);
            RPGUI.FormatMenu(CharacterMenu);
        }
Ejemplo n.º 10
0
    private void SublimeVehicleModWheelsMenu(Vehicle currentVehicle)
    {
        List <IMenuItem> wheelCategoriesList = new List <IMenuItem>();

        var buttonWheelType = new MenuButton("Wheel Type");

        buttonWheelType.Activated += (sender, args) => SublimeVehicleModWheelTypesMenu(currentVehicle);
        wheelCategoriesList.Add(buttonWheelType);

        var vehicleModWheelsMenu = new GTA.Menu("Wheels", wheelCategoriesList.ToArray());

        DrawMenu(vehicleModWheelsMenu);
    }
Ejemplo n.º 11
0
    private void SublimeVehicleModCategoriesMenu()
    {
        List <IMenuItem> vehicleModCategoriesList = new List <IMenuItem>();

        Vehicle currentVehicle = Game.Player.Character.CurrentVehicle;

        Function.Call(Hash.SET_VEHICLE_MOD_KIT, currentVehicle, 0);

        foreach (VehicleMod vehicleMod in Enum.GetValues(typeof(VehicleMod)))
        {
            int vehicleModCount = Function.Call <int>(Hash.GET_NUM_VEHICLE_MODS, currentVehicle, (int)vehicleMod);

            if (vehicleModCount != 0)
            {
                if (vehicleMod != VehicleMod.BackWheels && vehicleMod != VehicleMod.FrontWheels)
                {
                    var buttonModCategory = new MenuButton(vehicleMod.ToString());
                    //buttonModCategory.Activated += (sender, args) => SublimeVehicleModTypeMenu(currentVehicle);
                    vehicleModCategoriesList.Add(buttonModCategory);
                }
            }
        }

        var buttonRespray = new MenuButton("Respray");

        vehicleModCategoriesList.Add(buttonRespray);

        var buttonLights = new MenuButton("Lights");

        vehicleModCategoriesList.Add(buttonLights);

        var buttonPlates = new MenuButton("Plates");

        vehicleModCategoriesList.Add(buttonPlates);

        var buttonWindows = new MenuButton("Windows");

        vehicleModCategoriesList.Add(buttonWindows);

        var buttonWheels = new MenuButton("Wheels");

        buttonWheels.Activated += (sender, args) => SublimeVehicleModWheelsMenu(currentVehicle);
        vehicleModCategoriesList.Add(buttonWheels);

        var toggleTurbo = new MenuToggle("Turbo", "", true);

        vehicleModCategoriesList.Add(toggleTurbo);

        VehicleModCategoriesMenu = new GTA.Menu("Mod Categories", vehicleModCategoriesList.OrderBy(item => item.Caption).ToArray());
        DrawMenu(VehicleModCategoriesMenu);
    }
Ejemplo n.º 12
0
        public UIHandler()
        {
            RPG.UIHandler = this;
            KeyDown += OnKeyDown;
            //Use some fancy transitions
            View.MenuTransitions = true;
            View.PopMenu();
            View.MenuOffset = new Point(-302, 0);
            View.MenuPosition = new Point(UI.WIDTH -300, 0);

            CharacterMenu = new RPGMenu("Character Menu", new GTASprite("CommonMenu", "interaction_bgd", Color.ForestGreen), new IMenuItem[] {
                        new MenuButton("Quests", "").WithActivate(OpenQuestLog),
                        new MenuButton("Set Skillbar", "").WithActivate(OpenSkillBarMenu),
                        new MenuButton("Skills", "").WithActivate(OpenSkillsMenu),
                        new MenuButton("Weapons", "").WithActivate(OpenWeaponsMenu),
                        //new MenuButton("Talents", "", () => { View.PopMenu(); }),
                        //new MenuButton("Mod Weapons", "", () => { View.PopMenu(); }),
                        //new MenuButton("Mod Cars", "", () => { View.PopMenu();}),
                        new MenuButton("Back", "").WithActivate(() => View.PopMenu())
                    });

            ActionsMenu = new RPGMenu("ACTIONS", new GTASprite("CommonMenu", "interaction_bgd", Color.Red), new IMenuItem[] {
                        new MenuButton("Spawn Personal Vehicle", "").WithActivate(() => RPGMethods.SpawnCar()),
                        new MenuButton("Get Random Contract", "").WithActivate(GetRandomContract),
                        new MenuButton("Purchase Goods", "").WithActivate(OpenShop),
                        new MenuButton("Craft Items", "").WithActivate(OpenCrafting),
                        new MenuButton("Back", "").WithActivate(View.PopMenu)
                    });

            SkillTreeMenu = RPG.SkillHandler.GetSkillMenu();
            WeaponTreeMenu = RPG.WeaponHandler.GetWeaponMenu();

            //var o = new MenuNumericScroller("Number", "", d => { }, d => { }, 0, 100, 1);
            //var p = new MenuToggle("Toggle", "", ()=> { }, () => { });

            MainMenu = new RPGMenu("RPG Menu", new GTASprite("CommonMenu", "interaction_bgd", Color.DodgerBlue), new IMenuItem[] {
                new MenuButton("Inventory", "").WithActivate(OpenInventory),
                new MenuButton("Character Menu", "").WithActivate(OpenCharacterMenu),
                new MenuButton("Actions ", "").WithActivate(() => View.AddMenu(ActionsMenu)),
                new MenuButton("Options", "").WithActivate(() => OpenOptionsMenu()),
                new MenuButton("Play as Michael, Franklin and Trevor ", "").WithActivate(ConfirmPlayAsTrio),
                new MenuButton("Play as Yourself", "").WithActivate(ConfirmPlayAsYourCharacter),
                new MenuButton("Return to Normal Mode ", "").WithActivate(ConfirmReturnToNormal),
                new MenuButton("Close", "").WithActivate(View.PopMenu)
            });

            RPGUI.FormatMenu(ActionsMenu);
            RPGUI.FormatMenu(MainMenu);
            RPGUI.FormatMenu(CharacterMenu);
        }
Ejemplo n.º 13
0
    private void WeaponMenu()
    {
        List <IMenuItem> WeaponMenuList = new List <IMenuItem>();

        var button = new GTA.MenuButton("Melee List");

        button.Activated += (sender, args) => Melee();
        WeaponMenuList.Add(button);

        button            = new GTA.MenuButton("Pistol List");
        button.Activated += (sender, args) => Pistol();
        WeaponMenuList.Add(button);

        button            = new GTA.MenuButton("SMG List");
        button.Activated += (sender, args) => SMG();
        WeaponMenuList.Add(button);

        button            = new GTA.MenuButton("Shotgun List");
        button.Activated += (sender, args) => Shotgun();
        WeaponMenuList.Add(button);

        button            = new GTA.MenuButton("Rifle List");
        button.Activated += (sender, args) => Rifle();
        WeaponMenuList.Add(button);

        button            = new GTA.MenuButton("MG List");
        button.Activated += (sender, args) => MG();
        WeaponMenuList.Add(button);

        button            = new GTA.MenuButton("Sniper List");
        button.Activated += (sender, args) => Sniper();
        WeaponMenuList.Add(button);

        button            = new GTA.MenuButton("Heavy List");
        button.Activated += (sender, args) => Heavy();
        WeaponMenuList.Add(button);

        button            = new GTA.MenuButton("Thrown List");
        button.Activated += (sender, args) => Thrown();
        WeaponMenuList.Add(button);

        button            = new GTA.MenuButton("Return");
        button.Activated += (sender, args) => PreviousMenu();
        WeaponMenuList.Add(button);

        var mainMenu = new Menu("Weapon Menu", WeaponMenuList.ToArray());

        DrawMenu(mainMenu);
    }
Ejemplo n.º 14
0
    private void subWeapons()
    {
        List <IMenuItem> WeaponCategoriesList = new List <IMenuItem>();

        var button = new GTA.MenuButton("Melee");

        button.Activated += (sender, args) => meleeList();
        WeaponCategoriesList.Add(button);

        button            = new GTA.MenuButton("Pistol");
        button.Activated += (sender, args) => pistolList();
        WeaponCategoriesList.Add(button);

        button            = new GTA.MenuButton("SMG");
        button.Activated += (sender, args) => SMGList();
        WeaponCategoriesList.Add(button);

        button            = new GTA.MenuButton("Shotgun");
        button.Activated += (sender, args) => shotgunList();
        WeaponCategoriesList.Add(button);

        button            = new GTA.MenuButton("Rifle");
        button.Activated += (sender, args) => rifleList();
        WeaponCategoriesList.Add(button);

        button            = new GTA.MenuButton("MG");
        button.Activated += (sender, args) => mgList();
        WeaponCategoriesList.Add(button);

        button            = new GTA.MenuButton("Sniper");
        button.Activated += (sender, args) => sniperList();
        WeaponCategoriesList.Add(button);

        button            = new GTA.MenuButton("Heavy");
        button.Activated += (sender, args) => heavyList();
        WeaponCategoriesList.Add(button);

        button            = new GTA.MenuButton("Thrown");
        button.Activated += (sender, args) => thrownList();
        WeaponCategoriesList.Add(button);

        button            = new GTA.MenuButton("Back", "Return to the previous page");
        button.Activated += (sender, args) => View.HandleBack();
        WeaponCategoriesList.Add(button);

        var mainMenu = new Menu("Weapon Categories", WeaponCategoriesList.ToArray());

        DrawMenu(mainMenu);
    }
Ejemplo n.º 15
0
    private void SublimeMainMenu()
    {
        List<IMenuItem> mainMenuItems = new List<IMenuItem>();

        var buttonPlayer = new MenuButton("Player");
        buttonPlayer.Activated += (sender, args) => SublimePlayerMenu();
        mainMenuItems.Add(buttonPlayer);

        var buttonWeapon = new MenuButton("Weapon");
        buttonWeapon.Activated += (sender, args) => SublimeWeaponMenu();
        mainMenuItems.Add(buttonWeapon);

        MainMenu = new GTA.Menu("Sublime Mod", mainMenuItems.ToArray());
        DrawMenu(MainMenu);
    }
Ejemplo n.º 16
0
    private void SublimeVehicleSpawnerMenu()
    {
        List <IMenuItem> vehicleSpawnerMenuItems = new List <IMenuItem>();

        Dictionary <string, int> vehicleCategoriesDict = new Dictionary <string, int>()
        {
            { "Compacts", 0 }, { "Sedans", 1 }, { "SUVs", 2 }, { "Coupes", 3 }, { "Muscle", 4 },
            { "Sports Classic", 5 }, { "Sports", 6 }, { "Super", 7 }, { "Motorcycle", 8 },
            { "Off-Road", 9 }, { "Industrial", 10 }, { "Utility", 11 }, { "Vans/Pickups", 12 },
            { "Bicycles", 13 }, { "Boats", 14 }, { "Helicopters", 15 }, { "Airplanes", 16 },
            { "Service", 17 }, { "Emergency", 18 }, { "Military", 19 }, { "Commercial", 20 },
            { "Trains/Containers", 21 }
        };

        foreach (KeyValuePair <string, int> vehicleType in vehicleCategoriesDict)
        {
            var buttonVehicleCategoryMenu = new MenuButton(vehicleType.Key);

            // Add vehicle categories
            buttonVehicleCategoryMenu.Activated += (sender, args) =>
            {
                List <IMenuItem> vehicleSpawnerVehicleItems = new List <IMenuItem>();

                // Add vehicles to each category
                foreach (VehicleHash vehicle in Enum.GetValues(typeof(VehicleHash)))
                {
                    int    vehicleClass              = Function.Call <int>((Hash)0xDEDF1C8BD47C2200, (int)vehicle);
                    string getDisplayModel           = Function.Call <string>(Hash.GET_DISPLAY_NAME_FROM_VEHICLE_MODEL, (int)vehicle);
                    string convertDisplayModelToName = Function.Call <string>(Hash._GET_LABEL_TEXT, getDisplayModel);

                    if (vehicleClass == vehicleType.Value && convertDisplayModelToName != null)
                    {
                        var buttonSpawnVehicle = new MenuButton(convertDisplayModelToName);
                        buttonSpawnVehicle.Activated += (subSender, subArgs) => VehicleFunctions.SpawnVehicle(vehicle);
                        vehicleSpawnerVehicleItems.Add(buttonSpawnVehicle);
                    }
                }

                ListMenu vehicleSpawnerVehiclesMenu = new ListMenu(vehicleType.Key, vehicleSpawnerVehicleItems.OrderBy(v => v.Caption).ToArray(), 20);
                DrawMenu(vehicleSpawnerVehiclesMenu);
            };

            vehicleSpawnerMenuItems.Add(buttonVehicleCategoryMenu);
        }

        VehicleSpawnerCategoriesMenu = new GTA.Menu("Vehicle Spawner", vehicleSpawnerMenuItems.ToArray());
        DrawMenu(VehicleSpawnerCategoriesMenu);
    }
Ejemplo n.º 17
0
    private void SublimeWeaponMenu()
    {
        List <IMenuItem> weaponMenuItems = new List <IMenuItem>();

        var buttonWeaponComponents = new MenuButton("Weapon Components Menu");

        buttonWeaponComponents.Activated += (sender, args) => SublimeWeaponSelectionMenu();
        weaponMenuItems.Add(buttonWeaponComponents);

        var buttonGiveAllWeapons = new MenuButton("Give All Weapons");

        buttonGiveAllWeapons.Activated += (sender, args) => WeaponFunctions.GiveAllWeapons();
        weaponMenuItems.Add(buttonGiveAllWeapons);

        var toggleInfiniteAmmo = new MenuToggle("Infinite Ammunition", "", WeaponFunctions.HasWeaponInfiniteAmmo);

        toggleInfiniteAmmo.Changed += (sender, args) => WeaponFunctions.ToggleInfiniteAmmo();
        weaponMenuItems.Add(toggleInfiniteAmmo);

        var toggleFireBullets = new MenuToggle("Fire Bullets", "", WeaponFunctions.HasWeaponFireBullets);

        toggleFireBullets.Changed += (sender, args) => WeaponFunctions.ToggleFireBullets();
        weaponMenuItems.Add(toggleFireBullets);

        var toggleExplosiveBullets = new MenuToggle("Explosive Bullets", "", WeaponFunctions.HasWeaponExplosiveBullets);

        toggleExplosiveBullets.Changed += (sender, args) => WeaponFunctions.ToggleExplosiveBullets();
        weaponMenuItems.Add(toggleExplosiveBullets);

        var toggleExplosiveMelee = new MenuToggle("Explosive Melee", "", WeaponFunctions.IsExplosiveMeleeEnabled);

        toggleExplosiveMelee.Changed += (sender, args) => WeaponFunctions.ToggleExplosiveMelee();
        weaponMenuItems.Add(toggleExplosiveMelee);

        var toggleOneHitKill = new MenuToggle("One-Hit Kill", "", WeaponFunctions.IsOneHitKillEnabled);

        toggleOneHitKill.Changed += (sender, args) => WeaponFunctions.ToggleOneHitKill();
        weaponMenuItems.Add(toggleOneHitKill);

        var toggleGravityGun = new MenuToggle("Gravity Gun", "", WeaponFunctions.IsGravityGunEnabled);

        toggleGravityGun.Changed += (sender, args) => WeaponFunctions.ToggleGravityGun();
        weaponMenuItems.Add(toggleGravityGun);

        WeaponMenu = new GTA.Menu("Weapon Options", weaponMenuItems.ToArray());
        DrawMenu(WeaponMenu);
    }
Ejemplo n.º 18
0
    private void subWeapons()
    {
        List<IMenuItem> WeaponCategoriesList = new List<IMenuItem>();

        var button = new GTA.MenuButton("Melee");
        button.Activated += (sender, args) => meleeList();
        WeaponCategoriesList.Add(button);

        button = new GTA.MenuButton("Pistol");
        button.Activated += (sender, args) => pistolList();
        WeaponCategoriesList.Add(button);

        button = new GTA.MenuButton("SMG");
        button.Activated += (sender, args) => SMGList();
        WeaponCategoriesList.Add(button);

        button = new GTA.MenuButton("Shotgun");
        button.Activated += (sender, args) => shotgunList();
        WeaponCategoriesList.Add(button);

        button = new GTA.MenuButton("Rifle");
        button.Activated += (sender, args) => rifleList();
        WeaponCategoriesList.Add(button);

        button = new GTA.MenuButton("MG");
        button.Activated += (sender, args) => mgList();
        WeaponCategoriesList.Add(button);

        button = new GTA.MenuButton("Sniper");
        button.Activated += (sender, args) => sniperList();
        WeaponCategoriesList.Add(button);

        button = new GTA.MenuButton("Heavy");
        button.Activated += (sender, args) => heavyList();
        WeaponCategoriesList.Add(button);

        button = new GTA.MenuButton("Thrown");
        button.Activated += (sender, args) => thrownList();
        WeaponCategoriesList.Add(button);

        button = new GTA.MenuButton("Back", "Return to the previous page");
        button.Activated += (sender, args) => View.HandleBack();
        WeaponCategoriesList.Add(button);

        var mainMenu = new Menu("Weapon Categories", WeaponCategoriesList.ToArray());
        DrawMenu(mainMenu);
    }
Ejemplo n.º 19
0
    private void SublimeVehicleModCategoriesMenu()
    {
        List<IMenuItem> vehicleModCategoriesList = new List<IMenuItem>();

        Vehicle currentVehicle = Game.Player.Character.CurrentVehicle;
        Function.Call(Hash.SET_VEHICLE_MOD_KIT, currentVehicle, 0);

        foreach (VehicleMod vehicleMod in Enum.GetValues(typeof(VehicleMod)))
        {
            int vehicleModCount = Function.Call<int>(Hash.GET_NUM_VEHICLE_MODS, currentVehicle, (int) vehicleMod);

            if (vehicleModCount != 0)
            {
                if (vehicleMod != VehicleMod.BackWheels && vehicleMod != VehicleMod.FrontWheels)
                {
                    var buttonModCategory = new MenuButton(vehicleMod.ToString());
                    //buttonModCategory.Activated += (sender, args) => SublimeVehicleModTypeMenu(currentVehicle);
                    vehicleModCategoriesList.Add(buttonModCategory);
                }
            }
        }

        var buttonRespray = new MenuButton("Respray");
        vehicleModCategoriesList.Add(buttonRespray);

        var buttonLights = new MenuButton("Lights");
        vehicleModCategoriesList.Add(buttonLights);

        var buttonPlates = new MenuButton("Plates");
        vehicleModCategoriesList.Add(buttonPlates);

        var buttonWindows = new MenuButton("Windows");
        vehicleModCategoriesList.Add(buttonWindows);

        var buttonWheels = new MenuButton("Wheels");
        buttonWheels.Activated += (sender, args) => SublimeVehicleModWheelsMenu(currentVehicle);
        vehicleModCategoriesList.Add(buttonWheels);

        var toggleTurbo = new MenuToggle("Turbo", "", true);
        vehicleModCategoriesList.Add(toggleTurbo);

        VehicleModCategoriesMenu = new GTA.Menu("Mod Categories", vehicleModCategoriesList.OrderBy(item => item.Caption).ToArray());
        DrawMenu(VehicleModCategoriesMenu);
    }
Ejemplo n.º 20
0
    private void SublimeVehicleModWheelTypesMenu(Vehicle currentVehicle)
    {
        List <MenuButton> wheelTypesList = new List <MenuButton>();

        foreach (VehicleWheelType wheelType in Enum.GetValues(typeof(VehicleWheelType)))
        {
            var buttonWheels = new MenuButton(wheelType.ToString());
            buttonWheels.Activated += (sender, args) =>
            {
                List <MenuButton> wheelsList = new List <MenuButton>();

                Function.Call(Hash.SET_VEHICLE_WHEEL_TYPE, currentVehicle, (int)wheelType);

                int numFrontWheels = Function.Call <int>(Hash.GET_NUM_VEHICLE_MODS, currentVehicle, (int)VehicleMod.FrontWheels);

                for (int wheelIndex = 0; wheelIndex < numFrontWheels; wheelIndex++)
                {
                    string getModLocalizationText = Function.Call <string>(Hash.GET_MOD_TEXT_LABEL, currentVehicle, (int)VehicleMod.FrontWheels, wheelIndex);
                    string getModDisplayText      = Function.Call <string>(Hash._GET_LABEL_TEXT, getModLocalizationText);

                    int value = wheelIndex;

                    var buttonSetVehicleWheel = new MenuButton(getModDisplayText);
                    buttonSetVehicleWheel.Description = string.Format("Wheel {0} / {1}", wheelIndex + 1, numFrontWheels);
                    buttonSetVehicleWheel.Activated  += (subSender, subArgs) =>
                    {
                        currentVehicle.SetMod(VehicleMod.FrontWheels, value, false);
                    };
                    wheelsList.Add(buttonSetVehicleWheel);
                }

                ListMenu vehicleWheelsMenu = new ListMenu(buttonWheels.Caption, wheelsList.ToArray(), 20);
                DrawMenu(vehicleWheelsMenu, true);
            };
            wheelTypesList.Add(buttonWheels);
        }

        var vehicleModWheelTypesMenu = new GTA.Menu("Wheel Types", wheelTypesList.ToArray());

        DrawMenu(vehicleModWheelTypesMenu);
    }
Ejemplo n.º 21
0
    private void SublimeTeleportMenu()
    {
        List <IMenuItem> teleportMenuItems = new List <IMenuItem>();

        var buttonTeleportToMarker = new MenuButton("Marker");

        buttonTeleportToMarker.Activated += (sender, args) => PlayerFunctions.TeleportToMarker();
        teleportMenuItems.Add(buttonTeleportToMarker);

        Dictionary <string, Vector3> teleportDict = new Dictionary <string, Vector3>()
        {
            { "Michael's House", new Vector3(-852.4f, 160.0f, 65.6f) },
            { "Franklin's House", new Vector3(7.9f, 548.1f, 175.5f) },
            { "Franklin's Aunt", new Vector3(-14.8f, -1454.5f, 30.5f) },
            { "Trevor's Trailer", new Vector3(1985.7f, 3812.2f, 32.2f) },
            { "Airport Entrance", new Vector3(-1034.6f, -2733.6f, 13.8f) },
            { "Airport Field", new Vector3(-1336.0f, -3044.0f, 13.9f) },
            { "Elysian Island", new Vector3(338.2f, -2715.9f, 38.5f) },
            { "Jetsam", new Vector3(760.4f, -2943.2f, 5.8f) },
            { "Strip Club", new Vector3(127.4f, -1307.7f, 29.2f) },
            { "Elburro Heights", new Vector3(1384.0f, -2057.1f, 52.0f) },
            { "Ferris Wheel", new Vector3(-1670.7f, -1125.0f, 13.0f) },
            { "Chumash", new Vector3(-3192.6f, 1100.0f, 20.2f) },
            { "Windfarm", new Vector3(2354.0f, 1830.3f, 101.1f) },
            { "Military Base", new Vector3(-2047.4f, 3132.1f, 32.8f) },
            { "McKenzie Airfield", new Vector3(2121.7f, 4796.3f, 41.1f) },
            { "Desert Airfield", new Vector3(1747.0f, 3273.7f, 41.1f) },
            { "Chilliad", new Vector3(425.4f, 5614.3f, 766.5f) },
        };

        foreach (KeyValuePair <string, Vector3> location in teleportDict)
        {
            var buttonTeleportToLocation = new MenuButton(location.Key);
            buttonTeleportToLocation.Activated += (sender, args) => PlayerFunctions.TeleportToLocation(location);
            teleportMenuItems.Add(buttonTeleportToLocation);
        }

        TeleportMenu = new GTA.Menu("Teleport Options", teleportMenuItems.ToArray());
        DrawMenu(TeleportMenu);
    }
Ejemplo n.º 22
0
    private void SublimeMainMenu()
    {
        List <IMenuItem> mainMenuItems = new List <IMenuItem>();

        var buttonPlayer = new MenuButton("Player");

        buttonPlayer.Activated += (sender, args) => SublimePlayerMenu();
        mainMenuItems.Add(buttonPlayer);

        var buttonWeapon = new MenuButton("Weapon");

        buttonWeapon.Activated += (sender, args) => SublimeWeaponMenu();
        mainMenuItems.Add(buttonWeapon);

        var buttonVehicle = new MenuButton("Vehicle");

        buttonVehicle.Activated += (sender, args) => SublimeVehicleMenu();
        mainMenuItems.Add(buttonVehicle);

        MainMenu = new GTA.Menu("Sublime Mod", mainMenuItems.ToArray());
        DrawMenu(MainMenu);
    }
Ejemplo n.º 23
0
        protected override void Start()
        {
            RPGSettings.AudioVolume             = RPG.Settings.GetValue("Options", "AudioVolume", 35);
            RPGSettings.PlayKillstreaks         = RPG.Settings.GetValue("Options", "PlayKillAnnouncements", true);
            RPGSettings.ShowKillstreaks         = RPG.Settings.GetValue("Options", "ShowKillAnnouncements", true);
            RPGSettings.ShowPrerequisiteWarning = RPG.Settings.GetValue("Options", "ShowPrerequisiteWarning", true);
            RPGSettings.ShowPressYToStart       = RPG.Settings.GetValue("Options", "ShowPressYToStart", true);
            RPGSettings.EnableAutoSave          = RPG.Settings.GetValue("Options", "EnableAutoSave", true);
            RPGSettings.AutosaveInterval        = RPG.Settings.GetValue("Options", "AutosaveIntervalSeconds", 30);
            RPGSettings.AutostartRPGMode        = RPG.Settings.GetValue("Options", "AutostartRPGMode", true);
            RPGSettings.ShowQuestTracker        = RPG.Settings.GetValue("Options", "ShowQuestTracker", true);
            RPGSettings.ShowSkillBar            = RPG.Settings.GetValue("Options", "ShowSkillBar", true);
            RPGSettings.SafeArea = RPG.Settings.GetValue("Options", "SafeArea", 10);

            NpcCamera   = World.CreateCamera(Game.Player.Character.Position, Game.Player.Character.Rotation, GameplayCamera.FieldOfView);
            OptionsMenu = new RPGMenu("Options", new GTASprite("CommonMenu", "interaction_bgd", Color.ForestGreen), new IMenuItem[] {
                new MenuButton("Save Game", "").WithActivate(() => { RPG.SaveAllData(); RPG.Subtitle("Saved"); }),
                new MenuButton("New Game", "").WithActivate(NewGame),
                new MenuNumericScroller("AudioVolume", "", 0, 100, 10, RPGSettings.AudioVolume / 10).WithNumericActions(ChangeAudioVolume, d => { }),
                new MenuNumericScroller("SafeArea Setting", "", 0, 10, 1, RPGSettings.SafeArea).WithNumericActions(ChangeSafeArea, d => { }),
                new MenuToggle("Toggle Skill Bar", "", RPGSettings.ShowSkillBar).WithToggles(ToggleSkillBar, ToggleSkillBar),
                new MenuToggle("Toggle Quest Tracker", "", RPGSettings.ShowQuestTracker).WithToggles(ToggleQuestTracker, ToggleQuestTracker),

                new MenuToggle("Play Kill Announcer Sounds", "", RPGSettings.PlayKillstreaks).WithToggles(ToggleKillAnnounceSounds, ToggleKillAnnounceSounds),
                new MenuToggle("Show Killstreak Text", "", RPGSettings.ShowKillstreaks).WithToggles(ToggleShowKillAnnounce, ToggleShowKillAnnounce),
                new MenuToggle("Show Prerequisite Warning", "", RPGSettings.ShowPrerequisiteWarning).WithToggles(ToggleWarning, ToggleWarning),
                new MenuToggle("Show Press Y To Start", "", RPGSettings.ShowPressYToStart).WithToggles(ToggleShowPressY, ToggleShowPressY),
                new MenuToggle("Enable Auto Save", "", RPGSettings.EnableAutoSave).WithToggles(ToggleAutoSave, ToggleAutoSave),
                new MenuNumericScroller("Autosave Interval (s)", "", 0, 120, 10, RPGSettings.AutosaveInterval / 10).WithNumericActions(ChangeAutosaveInterval, d => { }),
                new MenuToggle("Autostart RPG Mode", "", RPGSettings.AutostartRPGMode).WithToggles(ToggleAutostartRPG, ToggleAutostartRPG),


                new MenuButton("Mod Version: " + RPG.Version, ""),
                new MenuButton("Back", "").WithActivate(() => View.PopMenu())
            });
            RPGUI.FormatMenu(OptionsMenu);
        }
Ejemplo n.º 24
0
        private void UpdateSkillBarMenu()
        {
            var items      = new IMenuItem[6];
            var skillSlots = RPG.PlayerData.SkillSlots;
            var entries    = RPG.SkillHandler.GetEntriesFormatted();

            for (int i = 0; i < 5; i++)
            {
                var slot = skillSlots[i];
                if (!slot.IsEmpty)
                {
                    var indexOfCur = Array.IndexOf(entries, slot.Name);
                    items[i] = new MenuEnumScroller(slot.GetMenuKeyName() + ":", "Skill for " + slot.Key, RPG.SkillHandler.GetEntriesFormatted(), indexOfCur).WithEnumActions(ChangeAction, ClearAction);
                }
                else
                {
                    items[i] = new MenuEnumScroller(slot.GetMenuKeyName() + ":", "Skill for " + slot.Key, RPG.SkillHandler.GetEntriesFormatted()).WithEnumActions(ChangeAction, ClearAction);
                }
            }
            items[5] = new MenuButton("Back").WithActivate(View.PopMenu);

            SkillbarMenu = new RPGMenu("Set skills", new GTASprite("Commonmenu", "interaction_bgd", Color.LightBlue), items);
            RPGUI.FormatMenuWithFooter(SkillbarMenu);
        }
Ejemplo n.º 25
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.º 26
0
    private void OpenSpawnMenuPickup2(int curpage)
    {
        var menuItems = new List<IMenuItem>();

        if (curpage > 2) //3 or bigger
        {
            View.RemoveMenu(lastmenu5);
            var buttonm = new MenuButton(("Page " + (curpage - 1)), ("See page " + (curpage - 1)));
            buttonm.Activated += (sender, args) => this.openspawnpickup2(curpage - 1);
            menuItems.Add(buttonm);
        }

        int currentno = 0;
        int skipno = 0;
        foreach (string name in pickuplist.Keys)
        {
            if (skipno == (15 * (curpage - 1)))
            {
                if (currentno == 15)
                {
                    var buttonm = new MenuButton(("Page " + (curpage + 1)), ("See page " + (curpage + 1)));
                    buttonm.Activated += (sender, args) => this.OpenSpawnMenuPickup2(curpage + 1);
                    menuItems.Add(buttonm);
                    break;
                }
                currentno++;
                int mdll;
                pickuplist.TryGetValue(name, out mdll);

                var button = new MenuButton(name, (mdll.ToString()));
                button.Activated += (sender, args) => this.spawnpickup(((Model)mdll), Game.Player.Character.Position);
                menuItems.Add(button);
            }
            else
            {
                skipno++;
            }
        }
        Menu thismenu = new Menu(("(Pickup) Spawn Menu " + curpage), menuItems.ToArray());
        lastmenu5 = thismenu;
        this.View.AddMenu(thismenu);
    }
Ejemplo n.º 27
0
        public CharCreationNew()
        {
            KeyDown += OnKeyDown;
            Instance = this;
            CurrentCarModel = Random.Range(0, 50);
            CurrentCharModel = Random.Range(0, 50);
            View.MenuTransitions = false;
            View.MenuPosition = new Point(UI.WIDTH - 300, 0);
            View.MenuOffset = new Point(-300, 0);
            //Instantiate our menu
            State = CharCreationState.PickMotives;
            SetupMenu = new RPGMenu("RPG Setup", new GTASprite("commonmenu","interaction_bgd",Color.DodgerBlue), new IMenuItem[] {
                        new MenuNumericScroller("SafeArea Setting","Change the safearea setting until the RPG UI covers the bottom area of your minimap.",0,10,1,SafeArea).WithNumericActions(ChangeSafeArea,d => { }),
                        new MenuButton("Finish Setup", "").WithActivate(() => { View.PopMenu(); SetupFinished = true;
                        })
            });
            CharSelectMenu = new RPGMenu("Character Creation", new GTASprite("commonmenu","interaction_bgd",Color.DodgerBlue), new IMenuItem[] {
                        //new MenuButton("Next Character", NextModel),
                        //new MenuButton("Previous Character", "", PreviousModel),
                        new MenuButton("Random Character", "").WithActivate(RandomModel),
                        new MenuEnumScroller("Character Model","",AvailablePeds.Select(x => x.ToString()).ToArray()).WithEnumActions(SetCharModel,d=> { }),
                        //new MenuButton("Try Out New Clothes", "", RandomiseLook),
                        //new MenuButton("Switch To Car Select", "", SwitchBetweenModelAndCar),
                        //new MenuButton("Choose Name", "", ChooseName),
                        new MenuButton("Continue", "").WithActivate(() => { View.PopMenu(); State = CharCreationState.Car;})
            });
            var colors = ((VehicleColor[]) Enum.GetValues(typeof (VehicleColor))).Select(x => x.ToString()).ToArray();
            CarSelectMenu = new RPGMenu("Vehicle Selection", new GTASprite("commonmenu", "interaction_bgd", Color.Red), new IMenuItem[] {
                        //new MenuButton("Next Car", NextModel),
                        //new MenuButton("Previous Car", "", PreviousModel),
                        new MenuButton("Random Vehicle", "").WithActivate(RandomModel),
                        new MenuEnumScroller("Vehicle","",AvailableCars.Select(x => x.ToString()).ToArray()).WithEnumActions(SetCarModel,d=> { }),
                        //new MenuButton("Switch To Model Select", "", SwitchBetweenModelAndCar),
                        new MenuEnumScroller("Primary Color Group","",ColorGroups).WithEnumActions(SetPrimaryColorGroup,d=> { }),
                        new MenuEnumScroller("Primary Color","",AvailableColors.Select(x => x.ToString()).ToArray()).WithEnumActions(SetColor,d=> { }),
                        new MenuEnumScroller("Secondary Color Group","",ColorGroups).WithEnumActions(SetSecondaryColorGroup,d=> { }),
                        new MenuEnumScroller("Secondary Color","",AvailableSecondaryColors.Select(x => x.ToString()).ToArray()).WithEnumActions(SetSecondaryColor,d=> { }),
                        new MenuButton("Number Plate").WithActivate(ChooseNumberPlate),
                        new MenuButton("Continue", "").WithActivate(() => {View.PopMenu(); State = CharCreationState.Finalise;})
            });

            FinaliseMenu = new RPGMenu("Finish", new GTASprite("commonmenu", "interaction_bgd", Color.SkyBlue), new IMenuItem[] {
                        new MenuButton("Choose Name", "").WithActivate(ChooseName),
                        new MenuButton("", ""),
                        new MenuButton("Continue", "").WithActivate(() => { if(PlayerName != "") FinishCreation();})
            });
            CharSelectMenu.Width = 200;

            RPGUI.FormatMenuWithFooter(SetupMenu);
            RPGUI.FormatMenu(CharSelectMenu);
            RPGUI.FormatMenu(CarSelectMenu);
            RPGUI.FormatMenu(FinaliseMenu);
            SetupMenu.HeaderHeight = 25;
            CharSelectMenu.HeaderHeight = 25;
            CarSelectMenu.HeaderHeight = 25;
            FinaliseMenu.HeaderHeight = 25;
        }
Ejemplo n.º 28
0
        private void SetSecondaryColorGroup(int obj)
        {
            SelectedSecondaryColorGroup = obj;
            CurrentCarSecondaryColor = 0;
            var index = CarSelectMenu.SelectedIndex;
            View.RemoveMenu(CarSelectMenu);
            CarSelectMenu = new RPGMenu("Vehicle Selection", new GTASprite("commonmenu", "interaction_bgd", Color.Red), new IMenuItem[] {
                        new MenuButton("Random Vehicle", "").WithActivate(RandomModel),
                        new MenuEnumScroller("Vehicle","",AvailableCars.Select(x => x.ToString()).ToArray()).WithEnumActions(SetCarModel,d=> { }),
                        new MenuEnumScroller("Primary Color Group","",ColorGroups,SelectedColorGroup).WithEnumActions(SetPrimaryColorGroup,d=> { }),
                        new MenuEnumScroller("Primary Color","",AvailableColors.Select(x => x.ToString()).ToArray(),CurrentCarColor).WithEnumActions(SetColor,d=> { }),
                        new MenuEnumScroller("Secondary Color Group","",ColorGroups,SelectedSecondaryColorGroup).WithEnumActions(SetSecondaryColorGroup,d=> { }),
                        new MenuEnumScroller("Secondary Color","",AvailableSecondaryColors.Select(x => x.ToString()).ToArray()).WithEnumActions(SetSecondaryColor,d=> { }),
                        new MenuButton("Number Plate").WithActivate(ChooseNumberPlate),
                        new MenuButton("Continue", "").WithActivate(() => {View.PopMenu();State = CharCreationState.Finalise;})
            });
            RPGUI.FormatMenu(CarSelectMenu);
            CarSelectMenu.HeaderHeight = 25;
            View.AddMenu(CarSelectMenu);

            CarSelectMenu.SelectedIndex = index;
            if (CarModel != null)
            {
                CarModel.PrimaryColor = AvailableColors[CurrentCarColor];
                CarModel.SecondaryColor = AvailableSecondaryColors[CurrentCarSecondaryColor];
                CarModel.NumberPlate = "";
                CarModel.NumberPlate = CarPlate;
            }
        }
Ejemplo n.º 29
0
    private void WeaponMenu()
    {
        List<IMenuItem> WeaponMenuList = new List<IMenuItem>();

        var button = new GTA.MenuButton("Melee List");
        button.Activated += (sender, args) => Melee();
        WeaponMenuList.Add(button);

        button = new GTA.MenuButton("Pistol List");
        button.Activated += (sender, args) => Pistol();
        WeaponMenuList.Add(button);

        button = new GTA.MenuButton("SMG List");
        button.Activated += (sender, args) => SMG();
        WeaponMenuList.Add(button);

        button = new GTA.MenuButton("Shotgun List");
        button.Activated += (sender, args) => Shotgun();
        WeaponMenuList.Add(button);

        button = new GTA.MenuButton("Rifle List");
        button.Activated += (sender, args) => Rifle();
        WeaponMenuList.Add(button);

        button = new GTA.MenuButton("MG List");
        button.Activated += (sender, args) => MG();
        WeaponMenuList.Add(button);

        button = new GTA.MenuButton("Sniper List");
        button.Activated += (sender, args) => Sniper();
        WeaponMenuList.Add(button);

        button = new GTA.MenuButton("Heavy List");
        button.Activated += (sender, args) => Heavy();
        WeaponMenuList.Add(button);

        button = new GTA.MenuButton("Thrown List");
        button.Activated += (sender, args) => Thrown();
        WeaponMenuList.Add(button);

        button = new GTA.MenuButton("Return");
        button.Activated += (sender, args) => PreviousMenu();
        WeaponMenuList.Add(button);

        var mainMenu = new Menu("Weapon Menu", WeaponMenuList.ToArray());
        DrawMenu(mainMenu);
    }
Ejemplo n.º 30
0
    private void SublimeWeaponMenu()
    {
        List<IMenuItem> weaponMenuItems = new List<IMenuItem>();

        var buttonWeaponComponents = new MenuButton("Weapon Components Menu");
        buttonWeaponComponents.Activated += (sender, args) => SublimeWeaponSelectionMenu();
        weaponMenuItems.Add(buttonWeaponComponents);

        var buttonGiveAllWeapons = new MenuButton("Give All Weapons");
        buttonGiveAllWeapons.Activated += (sender, args) => WeaponFunctions.GiveAllWeapons();
        weaponMenuItems.Add(buttonGiveAllWeapons);

        var toggleInfiniteAmmo = new MenuToggle("Infinite Ammunition", "", WeaponFunctions.HasWeaponInfiniteAmmo);
        toggleInfiniteAmmo.Changed += (sender, args) => WeaponFunctions.ToggleInfiniteAmmo();
        weaponMenuItems.Add(toggleInfiniteAmmo);

        var toggleFireBullets = new MenuToggle("Fire Bullets", "", WeaponFunctions.HasWeaponFireBullets);
        toggleFireBullets.Changed += (sender, args) => WeaponFunctions.ToggleFireBullets();
        weaponMenuItems.Add(toggleFireBullets);

        var toggleExplosiveBullets = new MenuToggle("Explosive Bullets", "", WeaponFunctions.HasWeaponExplosiveBullets);
        toggleExplosiveBullets.Changed += (sender, args) => WeaponFunctions.ToggleExplosiveBullets();
        weaponMenuItems.Add(toggleExplosiveBullets);

        var toggleExplosiveMelee = new MenuToggle("Explosive Melee", "", WeaponFunctions.IsExplosiveMeleeEnabled);
        toggleExplosiveMelee.Changed += (sender, args) => WeaponFunctions.ToggleExplosiveMelee();
        weaponMenuItems.Add(toggleExplosiveMelee);

        var toggleOneHitKill = new MenuToggle("One-Hit Kill", "", WeaponFunctions.IsOneHitKillEnabled);
        toggleOneHitKill.Changed += (sender, args) => WeaponFunctions.ToggleOneHitKill();
        weaponMenuItems.Add(toggleOneHitKill);

        var toggleGravityGun = new MenuToggle("Gravity Gun", "", WeaponFunctions.IsGravityGunEnabled);
        toggleGravityGun.Changed += (sender, args) => WeaponFunctions.ToggleGravityGun();
        weaponMenuItems.Add(toggleGravityGun);

        WeaponMenu = new GTA.Menu("Weapon Options", weaponMenuItems.ToArray());
        DrawMenu(WeaponMenu);
    }
Ejemplo n.º 31
0
    public void subWeather()
    {
        List <IMenuItem> weatherList = new List <IMenuItem>();

        var Button = new GTA.MenuButton("Blizzard");

        Button.Activated += (sender, args) => World.Weather = Weather.Blizzard;
        weatherList.Add(Button);

        Button            = new GTA.MenuButton("Christmas");
        Button.Activated += (sender, args) => World.Weather = Weather.Christmas;
        weatherList.Add(Button);

        Button            = new GTA.MenuButton("Clear");
        Button.Activated += (sender, args) => World.Weather = Weather.Clear;
        weatherList.Add(Button);

        Button            = new GTA.MenuButton("Clearing");
        Button.Activated += (sender, args) => World.Weather = Weather.Clearing;
        weatherList.Add(Button);

        Button            = new GTA.MenuButton("Clouds");
        Button.Activated += (sender, args) => World.Weather = Weather.Clouds;
        weatherList.Add(Button);

        Button            = new GTA.MenuButton("Extra Sunny");
        Button.Activated += (sender, args) => World.Weather = Weather.ExtraSunny;
        weatherList.Add(Button);

        Button            = new GTA.MenuButton("Foggy");
        Button.Activated += (sender, args) => World.Weather = Weather.Foggy;
        weatherList.Add(Button);

        Button            = new GTA.MenuButton("Neutral");
        Button.Activated += (sender, args) => World.Weather = Weather.Neutral;
        weatherList.Add(Button);

        Button            = new GTA.MenuButton("Overcast");
        Button.Activated += (sender, args) => World.Weather = Weather.Overcast;
        weatherList.Add(Button);

        Button            = new GTA.MenuButton("Raining");
        Button.Activated += (sender, args) => World.Weather = Weather.Raining;
        weatherList.Add(Button);

        Button            = new GTA.MenuButton("Smog");
        Button.Activated += (sender, args) => World.Weather = Weather.Smog;
        weatherList.Add(Button);

        Button            = new GTA.MenuButton("Snowing");
        Button.Activated += (sender, args) => World.Weather = Weather.Snowing;
        weatherList.Add(Button);

        Button            = new GTA.MenuButton("Snowlight");
        Button.Activated += (sender, args) => World.Weather = Weather.Snowlight;
        weatherList.Add(Button);

        Button            = new GTA.MenuButton("Thunderstorm");
        Button.Activated += (sender, args) => World.Weather = Weather.ThunderStorm;
        weatherList.Add(Button);

        Button            = new GTA.MenuButton("Back", "Return to the previous page");
        Button.Activated += (sender, args) => View.HandleBack();
        weatherList.Add(Button);

        var mainMenu = new Menu("Change Weather", weatherList.ToArray());

        DrawMenu(mainMenu);
    }
Ejemplo n.º 32
0
    private void OpenPedMarkMenu()
    {
        var menuItems = new List<IMenuItem>();
        //TODO: Shoot with explosions of the selected ped
        var toggle = new MenuToggle("Use markgun", "Just aim at a ped", markgunped);
        toggle.Changed += (sender, args) =>
        {
            var tg = sender as MenuToggle;
            if (tg == null)
            {
                return;
            }
            markgunped = tg.Value;
        };
        menuItems.Add(toggle);

        if (markedped != null && markedped.Exists() && markedped.IsAlive)
        {
            var button = new MenuButton("Unmark", "");
            button.Activated += (sender, args) => this.UnMark();
            menuItems.Add(button);

            button = new MenuButton("Set as Framed Ped", "Go to weapon menu to activate");
            button.Activated += (sender, args) => this.FramePed();
            menuItems.Add(button);
        }
        else
        {
            markedped = null;
            if (curmarkped == 1)
            {
                markedped1 = markedped;
            }
            else if (curmarkped == 2)
            {
                markedped2 = markedped;
            }
            else if (curmarkped == 3)
            {
                markedped3 = markedped;
            }
        }
        if (markedped1 != null && markedped1.Exists() && markedped1.IsAlive)
        {
            var button = new MenuButton("Open Marked Menu 1", "");
            button.Activated += (sender, args) => this.OpenPlayerMenu(markedped1);
            menuItems.Add(button);
            Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedped1, true);
        }
        else
        {
            markedped1 = null;
        }

        if (markedped2 != null && markedped2.Exists() && markedped2.IsAlive)
        {
            var button = new MenuButton("Open Marked Menu 2", "");
            button.Activated += (sender, args) => this.OpenPlayerMenu(markedped2);
            menuItems.Add(button);
            Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedped2, true);
        }
        else
        {
            markedped2 = null;
        }

        if (markedped3 != null && markedped3.Exists() && markedped3.IsAlive)
        {
            var button = new MenuButton("Open Marked Menu 3", "");
            button.Activated += (sender, args) => this.OpenPlayerMenu(markedped3);
            menuItems.Add(button);
            Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedped3, true);
        }
        else
        {
            markedped3 = null;
        }

        var numerog = new MenuNumericScroller(("Switch Marked Ped"), "", 1, 3, 1, (curmarkped - 1));
        numerog.Changed += numerog_Changed;
        menuItems.Add(numerog);

        Markmenu = new Menu("(Ped) Mark Menu", menuItems.ToArray());
        this.View.AddMenu(Markmenu);
    }
Ejemplo n.º 33
0
    private void OpenChangeModelMenu2(int curpage)
    {
        var menuItems = new List<IMenuItem>();

        if (curpage > 2) //3 or bigger
        {
            View.RemoveMenu(lastmenu4);
            var buttonm = new MenuButton(("Page " + (curpage - 1)), ("See page " + (curpage - 1)));
            buttonm.Activated += (sender, args) => this.openchangemodel2(curpage - 1);
            menuItems.Add(buttonm);
        }

        int currentno = 0;
        int skipno = 0;
        foreach (string name in pedlist.Keys)
        {
            if (skipno == (15 * (curpage - 1)))
            {
                if (currentno == 15)
                {
                    var buttonm = new MenuButton(("Page " + (curpage + 1)), ("See page " + (curpage + 1)));
                    buttonm.Activated += (sender, args) => this.openchangemodel2(curpage + 1);
                    menuItems.Add(buttonm);
                    break;
                }
                currentno++;
                int mdll;
                pedlist.TryGetValue(name, out mdll);

                var button = new MenuButton(name, (mdll.ToString()));
                button.Activated += (sender, args) => Function.Call(Hash.SET_PLAYER_MODEL, Game.Player, mdll);
                menuItems.Add(button);
            }
            else
            {
                skipno++;
            }
        }
        Menu thismenu = new Menu(("Change Model Menu " + curpage), menuItems.ToArray());
        lastmenu4 = thismenu;
        this.View.AddMenu(thismenu);
    }
Ejemplo n.º 34
0
        //Build function
        public ReID_Gen()
        {
            GTA.MenuButton btnTest = new MenuButton("Test");
            btnTest.Activated += delegate { Test(); };
            GTA.MenuButton btnCaptureAllInOne = new MenuButton("CaptureAllInOne");
            btnCaptureAllInOne.Activated += delegate { CaptureAllInOne(); };
            GTA.MenuButton btnCapture = new MenuButton("Capture");
            btnCapture.Activated += delegate { capture(); };
            GTA.MenuButton btnCreate = new MenuButton("Create");
            btnCreate.Activated += delegate { create(); };
            GTA.MenuButton btnCloth = new MenuButton("Cloth");
            btnCloth.Activated += delegate { setCloth(); };
            GTA.MenuButton btnWeather = new MenuButton("Weather");
            btnWeather.Activated += delegate { ChooseFunction(FunctionMode.Weather); };
            GTA.MenuButton btnHourForward = new MenuButton("Hour Forward");
            btnHourForward.Activated += delegate { HourForward(); };
            GTA.MenuButton btnHourBack = new MenuButton("Hour Back");
            btnHourBack.Activated += delegate { HourBack(); };
            menu_0a = new GTA.Menu("ReID Generator", new GTA.IMenuItem[]
            {
                btnCaptureAllInOne, btnCapture, btnCreate, btnCloth, btnWeather, btnHourForward, btnHourBack, btnTest,
            });

            GTA.MenuButton btnBlizzard = new MenuButton("Blizzard");
            btnBlizzard.Activated += delegate { ChooseWeather(Weather.Blizzard); };
            GTA.MenuButton btnClear = new MenuButton("Clear");
            btnClear.Activated += delegate { ChooseWeather(Weather.Clear); };
            GTA.MenuButton btnClearing = new MenuButton("Clearing");
            btnClearing.Activated += delegate { ChooseWeather(Weather.Clearing); };
            GTA.MenuButton btnClouds = new MenuButton("Clouds");
            btnClouds.Activated += delegate { ChooseWeather(Weather.Clouds); };
            GTA.MenuButton btnExtrasunny = new MenuButton("Extrasunny");
            btnExtrasunny.Activated += delegate { ChooseWeather(Weather.ExtraSunny); };
            GTA.MenuButton btnFoggy = new MenuButton("Foggy");
            btnFoggy.Activated += delegate { ChooseWeather(Weather.Foggy); };
            GTA.MenuButton btnNetural = new MenuButton("Netural");
            btnNetural.Activated += delegate { ChooseWeather(Weather.Neutral); };
            GTA.MenuButton btnOvercast = new MenuButton("Overcast");
            btnOvercast.Activated += delegate { ChooseWeather(Weather.Overcast); };
            GTA.MenuButton btnSmog = new MenuButton("Smog");
            btnSmog.Activated += delegate { ChooseWeather(Weather.Smog); };
            GTA.MenuButton btnSnowlight = new MenuButton("Snowlight");
            btnSnowlight.Activated += delegate { ChooseWeather(Weather.Snowlight); };

            menu_1a = new GTA.Menu("Weather", new GTA.IMenuItem[]
            {
                btnBlizzard, btnClear, btnClearing, btnClouds, btnExtrasunny,
                btnFoggy, btnNetural, btnOvercast, btnSmog,
                btnSnowlight,
            });


            menu_0a.HasFooter = false;
            menu_1a.HasFooter = false;

            LeftKey     = Keys.NumPad4;
            RightKey    = Keys.NumPad6;
            UpKey       = Keys.NumPad8;
            DownKey     = Keys.NumPad2;
            ActivateKey = Keys.NumPad5;
            BackKey     = Keys.NumPad0;

            this.KeyDown += OnKeyDown;
        }
Ejemplo n.º 35
0
    private void OpenSpawnMenuObject()
    {
        var menuItems = new List<IMenuItem>();

        var button = new MenuButton("Custom Input", "Example Input:\n-1818980770");
        button.Activated += (sender, args) => this.spawnprop(((Model)(int.Parse(Game.GetUserInput(20)))), Game.Player.Character.Position, false, true, Game.Player.Character.Heading);
        menuItems.Add(button);

        if (isontestmode)
        {
            var toggle = new MenuToggle("Object Mark gun", "Saves the ped you aim at", objmarkgun);
            toggle.Changed += (sender, args) =>
            {
                var tg = sender as MenuToggle;
                if (tg == null)
                {
                    return;
                }
                objmarkgun = tg.Value;
            };
            menuItems.Add(toggle);
        }

        button = new MenuButton("From File", "Example Input:\nblabla.txt");
        button.Activated += (sender, args) => this.fromfileobject(Game.GetUserInput(25));
        menuItems.Add(button);

        button = new MenuButton("From Objects.ini File", "Example Input:\nObjects.ini\nThis was added to help you get more creations");
        button.Activated += (sender, args) => this.readobjectsini(Game.GetUserInput(25));
        menuItems.Add(button);

        button = new MenuButton("Last Prop", "");
        button.Activated += (sender, args) => this.OpenLastPropMenu();
        menuItems.Add(button);

        int numbr = 0;
        foreach (string str in mdllist.Keys)
        {
            if (!(numbr == 15))
            {
                numbr++;
                int blabla;
                mdllist.TryGetValue(str, out blabla);

                button = new MenuButton(str, blabla.ToString());
                button.Activated += (sender, args) => this.spawnprop(((Model)blabla), Game.Player.Character.Position, false, true, Game.Player.Character.Heading);
                menuItems.Add(button);
            }
        }
        if (numbr == 15)
        {
            button = new MenuButton("Page 2", "");
            button.Activated += (sender, args) => this.openspawnprop2(2);
            menuItems.Add(button);
        }
        lastmenu2 = new Menu("(Object) Spawn Menu", menuItems.ToArray());
        this.View.AddMenu(lastmenu2);
    }
Ejemplo n.º 36
0
    private void OpenSpawnMenuPed()
    {
        var menuItems = new List<IMenuItem>();

        var button = new MenuButton("Custom Input", "Example Input:\n-1818980770");
        button.Activated += (sender, args) => this.spawnped(((Model)(int.Parse(Game.GetUserInput(26)))), Game.Player.Character.Position, Game.Player.Character.Heading);
        menuItems.Add(button);

        if (isontestmode)
        {
            var toggle = new MenuToggle("Ped Mark gun", "Saves the ped you aim at", pedmarkgun);
            toggle.Changed += (sender, args) =>
            {
                var tg = sender as MenuToggle;
                if (tg == null)
                {
                    return;
                }
                pedmarkgun = tg.Value;
            };
            menuItems.Add(toggle);
        }

        int numbr = 0;
        foreach (string str in pedlist.Keys)
        {
            if (!(numbr == 15))
            {
                numbr++;
                int blabla;
                pedlist.TryGetValue(str, out blabla);

                button = new MenuButton(str, blabla.ToString());
                button.Activated += (sender, args) => this.spawnped(((Model)blabla), Game.Player.Character.Position, Game.Player.Character.Heading);
                menuItems.Add(button);
            }
        }
        if (numbr == 15)
        {
            button = new MenuButton("Page 2", "");
            button.Activated += (sender, args) => this.openspawnped2(2);
            menuItems.Add(button);
        }
        lastmenu3 = new Menu("(Ped) Spawn Menu", menuItems.ToArray());
        this.View.AddMenu(lastmenu3);
    }
Ejemplo n.º 37
0
    public void subVehicles()
    {
        List <IMenuItem> vehicleCategoriesList = new List <IMenuItem>();

        var Button = new GTA.MenuButton("Super");

        Button.Activated += (sender, args) => superList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("Sport");
        Button.Activated += (sender, args) => sportList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("MotorCycles ");
        Button.Activated += (sender, args) => motorcycleList();
        vehicleCategoriesList.Add(Button);

        /*
         * Button = new GTA.MenuButton("Utility");
         * Button .Activated += (sender, args) => utilityList();
         * vehicleCategoriesList.Add(Button);
         */
        Button            = new GTA.MenuButton("Helicopters ");
        Button.Activated += (sender, args) => helicopterList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("Planes");
        Button.Activated += (sender, args) => planeList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("Sport Classic ");
        Button.Activated += (sender, args) => sportclassicList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("Sedan ");
        Button.Activated += (sender, args) => sedanList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("Muscle ");
        Button.Activated += (sender, args) => muscleList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("Off-Road ");
        Button.Activated += (sender, args) => offroadList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("SUV ");
        Button.Activated += (sender, args) => suvList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("Van ");
        Button.Activated += (sender, args) => vanList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("Industrial ");
        Button.Activated += (sender, args) => industrialList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("Commercial");
        Button.Activated += (sender, args) => commercialList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("Military ");
        Button.Activated += (sender, args) => militaryList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("Service ");
        Button.Activated += (sender, args) => serviceList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("Cycles");
        Button.Activated += (sender, args) => cycleList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("Compacts");
        Button.Activated += (sender, args) => compactList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("Coupes");
        Button.Activated += (sender, args) => coupeList();
        vehicleCategoriesList.Add(Button);

        Button            = new GTA.MenuButton("Back", "Return to the previous page");
        Button.Activated += (sender, args) => View.HandleBack();
        vehicleCategoriesList.Add(Button);

        var mainMenu = new Menu("Vehicle Categories", vehicleCategoriesList.ToArray());

        DrawMenu(mainMenu);
    }
Ejemplo n.º 38
0
    public void subVehicles()
    {
        List<IMenuItem> vehicleCategoriesList = new List<IMenuItem>();

        var Button = new GTA.MenuButton("Super");
        Button .Activated += (sender, args) => superList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("Sport");
        Button .Activated += (sender, args) => sportList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("MotorCycles ");
        Button .Activated += (sender, args) => motorcycleList();
        vehicleCategoriesList.Add(Button);
        /*
        Button = new GTA.MenuButton("Utility");
        Button .Activated += (sender, args) => utilityList();
        vehicleCategoriesList.Add(Button);
        */
        Button = new GTA.MenuButton("Helicopters ");
        Button .Activated += (sender, args) => helicopterList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("Planes");
        Button .Activated += (sender, args) => planeList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("Sport Classic ");
        Button .Activated += (sender, args) => sportclassicList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("Sedan ");
        Button .Activated += (sender, args) => sedanList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("Muscle ");
        Button .Activated += (sender, args) => muscleList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("Off-Road ");
        Button .Activated += (sender, args) => offroadList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("SUV ");
        Button .Activated += (sender, args) => suvList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("Van ");
        Button .Activated += (sender, args) => vanList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("Industrial ");
        Button .Activated += (sender, args) => industrialList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("Commercial");
        Button .Activated += (sender, args) => commercialList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("Military ");
        Button .Activated += (sender, args) => militaryList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("Service ");
        Button .Activated += (sender, args) => serviceList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("Cycles");
        Button .Activated += (sender, args) => cycleList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("Compacts");
        Button .Activated += (sender, args) => compactList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("Coupes");
        Button .Activated += (sender, args) => coupeList();
        vehicleCategoriesList.Add(Button);

        Button = new GTA.MenuButton("Back", "Return to the previous page");
        Button.Activated += (sender, args) => View.HandleBack();
        vehicleCategoriesList.Add(Button);

        var mainMenu = new Menu("Vehicle Categories", vehicleCategoriesList .ToArray());
        DrawMenu(mainMenu);
    }
Ejemplo n.º 39
0
        private void UpdateSkillBarMenu()
        {
            var items = new IMenuItem[6];
            var skillSlots = RPG.PlayerData.SkillSlots;
            var entries = RPG.SkillHandler.GetEntriesFormatted();
            for (int i = 0; i < 5; i++)
            {
                var slot = skillSlots[i];
                if (!slot.IsEmpty)
                {
                    var indexOfCur = Array.IndexOf(entries, slot.Name);
                    items[i] = new MenuEnumScroller(slot.GetMenuKeyName() + ":", "Skill for " + slot.Key, RPG.SkillHandler.GetEntriesFormatted(), indexOfCur).WithEnumActions(ChangeAction, ClearAction);
                }
                else
                {
                    items[i] = new MenuEnumScroller(slot.GetMenuKeyName() + ":", "Skill for " + slot.Key, RPG.SkillHandler.GetEntriesFormatted()).WithEnumActions(ChangeAction, ClearAction);
                }

            }
            items[5] = new MenuButton("Back").WithActivate(View.PopMenu);

            SkillbarMenu = new RPGMenu("Set skills", new GTASprite("Commonmenu", "interaction_bgd", Color.LightBlue), items);
            RPGUI.FormatMenuWithFooter(SkillbarMenu);
        }
Ejemplo n.º 40
0
    private void OpenChangeModelMenu()
    {
        var menuItems = new List<IMenuItem>();

        var button = new MenuButton("Custom Input", "Example Input:\n-1818980770");
        button.Activated += (sender, args) => Function.Call(Hash.SET_PLAYER_MODEL, Game.Player, Game.GetUserInput(26));
        menuItems.Add(button);

        int numbr = 0;
        foreach (string str in pedlist.Keys)
        {
            if (!(numbr == 15))
            {
                numbr++;
                int blabla;
                pedlist.TryGetValue(str, out blabla);

                button = new MenuButton(str, blabla.ToString());
                button.Activated += (sender, args) => Function.Call(Hash.SET_PLAYER_MODEL, Game.Player, blabla);
                menuItems.Add(button);
            }
        }
        if (numbr == 15)
        {
            button = new MenuButton("Page 2", "");
            button.Activated += (sender, args) => this.openspawnped2(2);
            menuItems.Add(button);
        }
        lastmenu4 = new Menu("Change Model Menu", menuItems.ToArray());
        this.View.AddMenu(lastmenu4);
    }
Ejemplo n.º 41
0
    private void SpawnMenu()
    {
        List <IMenuItem> SpawnMenuList = new List <IMenuItem>();

        var button = new GTA.MenuButton("Super List");

        button.Activated += (sender, args) => Super();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("Sport List");
        button.Activated += (sender, args) => Sport();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("MotorCycles List");
        button.Activated += (sender, args) => MotorCycle();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("Utility List");
        button.Activated += (sender, args) => Exit();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("Helicopters List");
        button.Activated += (sender, args) => Helicopter();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("Planes List");
        button.Activated += (sender, args) => Plane();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("Sport Classic List");
        button.Activated += (sender, args) => SportClassic();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("Sedan List");
        button.Activated += (sender, args) => Sedan();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("Muscle List");
        button.Activated += (sender, args) => Muscle();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("Off-Road List");
        button.Activated += (sender, args) => OffRoad();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("SUV List");
        button.Activated += (sender, args) => SUV();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("Van List");
        button.Activated += (sender, args) => Van();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("Industrial List");
        button.Activated += (sender, args) => Industrial();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("Commercial List");
        button.Activated += (sender, args) => Commercial();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("Military List");
        button.Activated += (sender, args) => Military();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("Service List");
        button.Activated += (sender, args) => Service();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("Cycles List");
        button.Activated += (sender, args) => Cycle();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("Compacts List");
        button.Activated += (sender, args) => Compact();
        SpawnMenuList.Add(button);

        button            = new GTA.MenuButton("Coupes List");
        button.Activated += (sender, args) => Coupe();
        SpawnMenuList.Add(button);

        var returnButton = new GTA.MenuButton("Return");

        returnButton.Activated += (sender, args) => PreviousMenu();
        SpawnMenuList.Add(returnButton);

        var mainMenu = new Menu("Vehicle Menu", SpawnMenuList.ToArray());

        DrawMenu(mainMenu);
    }
Ejemplo n.º 42
0
    private void SublimeVehicleMenu()
    {
        List <IMenuItem> vehicleMenuItems = new List <IMenuItem>();

        var buttonVehicleSpawnerMenu = new MenuButton("Vehicle Spawner Menu");

        buttonVehicleSpawnerMenu.Activated += (sender, args) => SublimeVehicleSpawnerMenu();
        vehicleMenuItems.Add(buttonVehicleSpawnerMenu);

        var buttonVehicleModKitMenu = new MenuButton("Vehicle Mod Menu");

        buttonVehicleModKitMenu.Activated += (sender, args) => SublimeVehicleModCategoriesMenu();
        vehicleMenuItems.Add(buttonVehicleModKitMenu);

        var toggleWarpInSpawned = new MenuToggle("Warp in Spawned Vehicle", "", VehicleFunctions.IsWarpInSpawnedVehicleEnabled);

        toggleWarpInSpawned.Changed += (sender, args) => VehicleFunctions.ToggleWarpInSpawnedVehicle();
        vehicleMenuItems.Add(toggleWarpInSpawned);

        var buttonFixVehicle = new MenuButton("Fix Vehicle");

        buttonFixVehicle.Activated += (sender, args) => VehicleFunctions.FixVehicle();
        vehicleMenuItems.Add(buttonFixVehicle);

        var toggleIndestructible = new MenuToggle("Indestructible", "", VehicleFunctions.IsVehicleIndestructible);

        toggleIndestructible.Changed += (sender, args) => VehicleFunctions.ToggleVehicleIndestructible();
        vehicleMenuItems.Add(toggleIndestructible);

        var toggleSeatBelt = new MenuToggle("Seat Belt", "", VehicleFunctions.IsSeatBeltEnabled);

        toggleSeatBelt.Changed += (sender, args) => VehicleFunctions.ToggleSeatBelt();
        vehicleMenuItems.Add(toggleSeatBelt);

        var toggleLockDoors = new MenuToggle("Lock Doors", "", VehicleFunctions.IsLockedDoorsEnabled);

        toggleLockDoors.Changed += (sender, args) => VehicleFunctions.ToggleLockDoors();
        vehicleMenuItems.Add(toggleLockDoors);

        var toggleNeverFallOffBike = new MenuToggle("Never Fall-Off Bike", "", VehicleFunctions.IsNeverFallOffBikeEnabled);

        toggleNeverFallOffBike.Changed += (sender, args) => VehicleFunctions.ToggleNeverFallOffBike();
        vehicleMenuItems.Add(toggleNeverFallOffBike);

        var toggleSpeedBoost = new MenuToggle("Speed Boost", "", VehicleFunctions.IsSpeedBoostEnabled);

        toggleSpeedBoost.Changed += (sender, args) => VehicleFunctions.ToggleSpeedBoost();
        vehicleMenuItems.Add(toggleSpeedBoost);

        var toggleVehicleJump = new MenuToggle("Vehicle Jump", "", VehicleFunctions.CanVehiclesJump);

        toggleVehicleJump.Changed += (sender, args) => VehicleFunctions.ToggleVehicleJump();
        vehicleMenuItems.Add(toggleVehicleJump);

        var enumVehicleWeaponAssets = new MenuEnumScroller("Vehicle Weapon", "", VehicleFunctions.VehicleWeaponAssetsDict.Keys.ToArray(), VehicleFunctions.VehicleWeaponAssetIndex);

        enumVehicleWeaponAssets.Changed += (sender, args) => VehicleFunctions.VehicleWeaponAssetIndex = enumVehicleWeaponAssets.Index;
        vehicleMenuItems.Add(enumVehicleWeaponAssets);

        var toggleVehicleWeapons = new MenuToggle("Vehicle Weapons", "", VehicleFunctions.IsVehicleWeaponsEnabled);

        toggleVehicleWeapons.Changed += (sender, args) => VehicleFunctions.ToggleVehicleWeapons();
        vehicleMenuItems.Add(toggleVehicleWeapons);

        VehicleMenu = new GTA.Menu("Vehicle Options", vehicleMenuItems.ToArray());
        DrawMenu(VehicleMenu);
    }
Ejemplo n.º 43
0
    private void SublimePlayerMenu()
    {
        List <IMenuItem> playerMenuItems = new List <IMenuItem>();

        var buttonTeleport = new MenuButton("Teleport Menu");

        buttonTeleport.Activated += (sender, args) => SublimeTeleportMenu();
        playerMenuItems.Add(buttonTeleport);

        var buttonFixPlayer = new MenuButton("Fix Player");

        buttonFixPlayer.Activated += (sender, args) => PlayerFunctions.FixPlayer();
        playerMenuItems.Add(buttonFixPlayer);

        var buttonSetMoney = new MenuButton("Set Money");

        buttonSetMoney.Activated += (sender, args) => PlayerFunctions.SetMoney();
        playerMenuItems.Add(buttonSetMoney);

        var buttonAddMoney = new MenuButton("Add Money");

        buttonAddMoney.Activated += (sender, args) => PlayerFunctions.AddMoney();
        playerMenuItems.Add(buttonAddMoney);

        var numericWantedLevel = new MenuNumericScroller("Set Wanted Level", "", 0.0f, 5.0f, 1.0f, PlayerFunctions.WantedLevel);

        numericWantedLevel.Changed += (sender, args) => PlayerFunctions.SetWantedLevel(numericWantedLevel);
        playerMenuItems.Add(numericWantedLevel);

        var toggleNeverWanted = new MenuToggle("Never Wanted", "", PlayerFunctions.IsPlayerNeverWanted);

        toggleNeverWanted.Changed += (sender, args) => PlayerFunctions.ToggleNeverWanted();
        playerMenuItems.Add(toggleNeverWanted);

        var toggleInvincible = new MenuToggle("Invincible", "", PlayerFunctions.IsPlayerInvincible);

        toggleInvincible.Changed += (sender, args) => PlayerFunctions.ToggleInvincibility();
        playerMenuItems.Add(toggleInvincible);

        var toggleSuperJump = new MenuToggle("Super Jump", "", PlayerFunctions.CanPlayerSuperJump);

        toggleSuperJump.Changed += (sender, args) => PlayerFunctions.ToggleSuperJump();
        playerMenuItems.Add(toggleSuperJump);

        var toggleFastRun = new MenuToggle("Fast Run", "", PlayerFunctions.CanPlayerFastRun);

        toggleFastRun.Changed += (sender, args) => PlayerFunctions.ToggleFastRun();
        playerMenuItems.Add(toggleFastRun);

        var toggleFastSwim = new MenuToggle("Fast Swim", "", PlayerFunctions.CanPlayerFastSwim);

        toggleFastSwim.Changed += (sender, args) => PlayerFunctions.ToggleFastSwim();
        playerMenuItems.Add(toggleFastSwim);

        var toggleNoNoise = new MenuToggle("No Noise", "", PlayerFunctions.IsPlayerNoiseless);

        toggleNoNoise.Changed += (sender, args) => PlayerFunctions.ToggleNoNoise();
        playerMenuItems.Add(toggleNoNoise);

        var toggleUnlimitedStamina = new MenuToggle("Unlimited Stamina", "", PlayerFunctions.HasPlayerUnlimitedStamina);

        toggleUnlimitedStamina.Changed += (sender, args) => PlayerFunctions.ToggleUnlimitedStamina();
        playerMenuItems.Add(toggleUnlimitedStamina);

        var toggleUnlimitedBreath = new MenuToggle("Unlimited Breath", "", PlayerFunctions.HasPlayerUnlimitedBreath);

        toggleUnlimitedBreath.Changed += (sender, args) => PlayerFunctions.ToggleUnlimitedBreath();
        playerMenuItems.Add(toggleUnlimitedBreath);

        var toggleUnlimitedAbility = new MenuToggle("Unlimited Special Ability", "", PlayerFunctions.HasPlayerUnlimitedAbility);

        toggleUnlimitedAbility.Changed += (sender, args) => PlayerFunctions.ToggleUnlimitedAbility();
        playerMenuItems.Add(toggleUnlimitedAbility);

        PlayerMenu = new GTA.Menu("Player Options", playerMenuItems.ToArray());
        DrawMenu(PlayerMenu);
    }
Ejemplo n.º 44
0
    private void SublimeVehicleModWheelTypesMenu(Vehicle currentVehicle)
    {
        List<MenuButton> wheelTypesList = new List<MenuButton>();
        foreach (VehicleWheelType wheelType in Enum.GetValues(typeof(VehicleWheelType)))
        {
            var buttonWheels = new MenuButton(wheelType.ToString());
            buttonWheels.Activated += (sender, args) =>
            {
                List<MenuButton> wheelsList = new List<MenuButton>();

                Function.Call(Hash.SET_VEHICLE_WHEEL_TYPE, currentVehicle, (int) wheelType);

                int numFrontWheels = Function.Call<int>(Hash.GET_NUM_VEHICLE_MODS, currentVehicle, (int) VehicleMod.FrontWheels);

                for (int wheelIndex = 0; wheelIndex < numFrontWheels; wheelIndex++)
                {
                    string getModLocalizationText = Function.Call<string>(Hash.GET_MOD_TEXT_LABEL, currentVehicle, (int) VehicleMod.FrontWheels, wheelIndex);
                    string getModDisplayText = Function.Call<string>(Hash._GET_LABEL_TEXT, getModLocalizationText);

                    int value = wheelIndex;

                    var buttonSetVehicleWheel = new MenuButton(getModDisplayText);
                    buttonSetVehicleWheel.Description = string.Format("Wheel {0} / {1}", wheelIndex + 1, numFrontWheels);
                    buttonSetVehicleWheel.Activated += (subSender, subArgs) =>
                    {
                        currentVehicle.SetMod(VehicleMod.FrontWheels, value, false);
                    };
                    wheelsList.Add(buttonSetVehicleWheel);
                }

                ListMenu vehicleWheelsMenu = new ListMenu(buttonWheels.Caption, wheelsList.ToArray(), 20);
                DrawMenu(vehicleWheelsMenu, true);
            };
            wheelTypesList.Add(buttonWheels);
        }

        var vehicleModWheelTypesMenu = new GTA.Menu("Wheel Types", wheelTypesList.ToArray());
        DrawMenu(vehicleModWheelTypesMenu);
    }
Ejemplo n.º 45
0
        private void SelectGender(int obj)
        {
            if(obj == 0)
            {
                Gender = Gender.Male;
                CharSelectMenu = new RPGMenu("Character Creation", new GTASprite("commonmenu", "interaction_bgd", Color.DodgerBlue), new IMenuItem[] {
                        new MenuEnumScroller("Character Model","",AvailablePeds.Select(x => x.ToString()).ToArray()).WithEnumActions(SetCharModel,d=> { }),
                        new MenuButton("Continue", "").WithActivate(() => { View.PopMenu(); State = CharCreationState.Car;})
                });
            }
            else
            {
                Gender = Gender.Female;
                CharSelectMenu = new RPGMenu("Character Creation", new GTASprite("commonmenu", "interaction_bgd", Color.DodgerBlue), new IMenuItem[] {
                        new MenuEnumScroller("Character Model","",AvailablePeds.Select(x => x.ToString()).ToArray()).WithEnumActions(SetCharModel,d=> { }),
                        new MenuButton("Continue", "").WithActivate(() => { View.PopMenu(); State = CharCreationState.Car;})
                });
            }

            State = CharCreationState.Character;
            View.PopMenu();
        }
Ejemplo n.º 46
0
    public void subWeather()
    {
        List<IMenuItem> weatherList = new List<IMenuItem>();

        var Button = new GTA.MenuButton("Blizzard");
        Button.Activated += (sender, args) => World.Weather = Weather.Blizzard;
        weatherList.Add(Button);

        Button = new GTA.MenuButton("Christmas");
        Button.Activated += (sender, args) => World.Weather = Weather.Christmas;
        weatherList.Add(Button);

        Button = new GTA.MenuButton("Clear");
        Button.Activated += (sender, args) => World.Weather = Weather.Clear;
        weatherList.Add(Button);

        Button = new GTA.MenuButton("Clearing");
        Button.Activated += (sender, args) => World.Weather = Weather.Clearing;
        weatherList.Add(Button);

        Button = new GTA.MenuButton("Clouds");
        Button.Activated += (sender, args) => World.Weather = Weather.Clouds;
        weatherList.Add(Button);

        Button = new GTA.MenuButton("Extra Sunny");
        Button.Activated += (sender, args) => World.Weather = Weather.ExtraSunny;
        weatherList.Add(Button);

        Button = new GTA.MenuButton("Foggy");
        Button.Activated += (sender, args) => World.Weather = Weather.Foggy;
        weatherList.Add(Button);

        Button = new GTA.MenuButton("Neutral");
        Button.Activated += (sender, args) => World.Weather = Weather.Neutral;
        weatherList.Add(Button);

        Button = new GTA.MenuButton("Overcast");
        Button.Activated += (sender, args) => World.Weather = Weather.Overcast;
        weatherList.Add(Button);

        Button = new GTA.MenuButton("Raining");
        Button.Activated += (sender, args) => World.Weather = Weather.Raining;
        weatherList.Add(Button);

        Button = new GTA.MenuButton("Smog");
        Button.Activated += (sender, args) => World.Weather = Weather.Smog;
        weatherList.Add(Button);

        Button = new GTA.MenuButton("Snowing");
        Button.Activated += (sender, args) => World.Weather = Weather.Snowing;
        weatherList.Add(Button);

        Button = new GTA.MenuButton("Snowlight");
        Button.Activated += (sender, args) => World.Weather = Weather.Snowlight;
        weatherList.Add(Button);

        Button = new GTA.MenuButton("Thunderstorm");
        Button.Activated += (sender, args) => World.Weather = Weather.ThunderStorm;
        weatherList.Add(Button);

        Button = new GTA.MenuButton("Back", "Return to the previous page");
        Button.Activated += (sender, args) => View.HandleBack();
        weatherList.Add(Button);

        var mainMenu = new Menu("Change Weather", weatherList.ToArray());
        DrawMenu(mainMenu);
    }
Ejemplo n.º 47
0
        private void CharacterSelection()
        {
            //var p = new Point(UI.WIDTH / 2 - 150, UI.HEIGHT - 160);
            //new UIRectangle(new Point(p.X, p.Y + 25), new Size(300, 20), Color.FromArgb(180, 8, 8, 8)).Draw();
            //new UIText("Name: " + PlayerName, new Point(p.X + 150, p.Y + 25), 0.25f, Color.White, 0, true).Draw();
            //var name = AvailablePeds[CurrentCharModel].ToString();
            //
            //new UIRectangle(new Point(p.X, p.Y + 50), new Size(200, 20), Color.FromArgb(180, 8, 8, 8)).Draw();
            //new UIText(name, new Point(p.X + 100, p.Y + 50), 0.25f, Color.White, 0, true).Draw();

            if(!IsOpen(CharSelectMenu))
            {
                if (CarModel != null) CarModel.Delete();
                View.AddMenu(CharSelectMenu);
            }

            if (CharacterModel == null)
            {
                Model m = AvailablePeds[CurrentCharModel];
                m.Request(1000);
                CharacterModel = World.CreatePed(m, new Vector3(_playerPosition.X,_playerPosition.Y, _playerPosition.Z - 0.25f),_playerHeading);
                RPG.WorldData.AddPed(new NpcObject("charCreation", CharacterModel));

                if(CharacterModel != null && !CharacterModel.IsHuman)
                {
                    CharacterModel.Delete();
                    CharacterModel = null;
                    NextModel();
                }
                if(CharacterModel != null)
                {
                    View.RemoveMenu(CharSelectMenu);
                    //Get Variations
                    Variations = new Dictionary<int, int>();
                    CurVariations = new Dictionary<int, int>();
                    for (int i = 0; i < 25; i++)
                    {
                        var a = Function.Call<int>(Hash.GET_NUMBER_OF_PED_DRAWABLE_VARIATIONS, CharacterModel, i);
                        if(a > 1)
                        {
                            Variations.Add(i,a);
                            CurVariations.Add(i,0);
                        }
                    }
                    //Add scrollers for each variation
                    var items = new List<IMenuItem>()
                                    {
                                        new MenuButton("Random Character", "").WithActivate(RandomModel),
                                        new MenuEnumScroller("Character Model","",AvailablePeds.Select(x => x.ToString()).ToArray(),CurrentCharModel).WithEnumActions(SetCharModel,d=> { }),
                                        new MenuLabel("", true)
                                    };

                    var continuebutton = new MenuButton("Continue", "").WithActivate(() => { View.PopMenu(); State = CharCreationState.Car; });

                    var count = 0;
                    foreach (var kvp in Variations)
                    {
                        var varCount = kvp.Value;
                        var enumStrings = new string[varCount];
                        for (int i = 0; i < varCount; i++)
                        {
                            enumStrings[i] = i.ToString();
                        }

                        items.Add(new MenuNumericScroller("Variation  " + (count + 1), "", 0, varCount - 1, 1).WithNumericActions(ChangeVariation, ChangeVariation));
                        count++;
                    }

                    items.Add(new MenuLabel("", true));
                    items.Add(continuebutton);
                    CharSelectMenu = new RPGMenu("Character Creation", new GTASprite("commonmenu", "interaction_bgd", Color.DodgerBlue), items.ToArray());
                    RPGUI.FormatMenu(CharSelectMenu);
                    View.AddMenu(CharSelectMenu);
                    CharSelectMenu.SelectedIndex = 1;
                    Function.Call(Hash.SET_PED_DEFAULT_COMPONENT_VARIATION, CharacterModel.Handle);
                    Camera.Position = _camPosition;
                    Camera.PointAt(CharacterModel.Position + CharacterModel.UpVector - new Vector3(0,0,0.2f));
                }

            }
            else
            {
                CharacterModel.FreezePosition = true;
                CharacterModel.Task.ClearAll();
            }
        }
Ejemplo n.º 48
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;
        }
Ejemplo n.º 49
0
    private void OpenTeleportMenu2(int curpage)
    {
        var menuItems = new List<IMenuItem>();

        if (curpage > 2) //3 or bigger
        {
            View.RemoveMenu(lastmenu);
            var buttonm = new MenuButton(("Page " + (curpage - 1)), ("See page " + (curpage - 1)));
            buttonm.Activated += (sender, args) => this.opentp2(curpage - 1);
            menuItems.Add(buttonm);
        }

        int currentno = 0;
        int skipno = 0;
        foreach (Vector3 loc in tplist.Keys)
        {
            if (skipno == (10 * (curpage - 1)))
            {
                if (currentno == 10)
                {
                    var buttonm = new MenuButton(("Page " + (curpage + 1)), ("See page " + (curpage + 1)));
                    buttonm.Activated += (sender, args) => this.OpenTeleportMenu2(curpage + 1);
                    menuItems.Add(buttonm);
                    break;
                }
                currentno++;
                string nagme;
                tplist.TryGetValue(loc, out nagme);

                var button = new MenuButton(nagme, (loc.X + " " + loc.Y + " " + loc.Z));
                button.Activated += (sender, args) => this.Telep(loc);
                menuItems.Add(button);
            }
            else
            {
                skipno++;
            }
        }
        Menu thismenu = new Menu(("Teleport Menu " + curpage), menuItems.ToArray());
        lastmenu = thismenu;
        this.View.AddMenu(thismenu);
    }
Ejemplo n.º 50
0
    private void OpenSpawnMenuPickup()
    {
        var menuItems = new List<IMenuItem>();

        var button = new MenuButton("Custom Input", "Example Input:\n-1818980770");
        button.Activated += (sender, args) => this.spawnpickup(((Model)(int.Parse(Game.GetUserInput(26)))), Game.Player.Character.Position);
        menuItems.Add(button);

        int numbr = 0;
        foreach (string str in pickuplist.Keys)
        {
            if (!(numbr == 15))
            {
                numbr++;
                int blabla;
                pickuplist.TryGetValue(str, out blabla);

                button = new MenuButton(str, blabla.ToString());
                button.Activated += (sender, args) => this.spawnpickup(((Model)blabla), Game.Player.Character.Position);
                menuItems.Add(button);
            }
        }
        if (numbr == 15)
        {
            button = new MenuButton("Page 2", "");
            button.Activated += (sender, args) => this.openspawnpickup2(2);
            menuItems.Add(button);
        }
        lastmenu5 = new Menu("(Pickup) Spawn Menu", menuItems.ToArray());
        this.View.AddMenu(lastmenu5);
    }
Ejemplo n.º 51
0
        void SetupMenus()
        {
            // Create main menu
            MenuButton btnToggle = new MenuButton("", delegate { speedoMode = (SpeedoMode)(((int)speedoMode + 1) % Enum.GetNames(typeof(SpeedoMode)).Length); UpdateMainButtons(0); });
            MenuButton btnClear  = new MenuButton("Reset Odometer", delegate { distanceKm = 0; UI.Notify("Odometer reset"); });
            MenuButton btnCore   = new MenuButton("Core Settings >", delegate { View.AddMenu(coreMenu); });
            MenuButton btnDisp   = new MenuButton("Display Settings >", delegate { View.AddMenu(dispMenu); });
            MenuButton btnExtra  = new MenuButton("Extras >", delegate
            {
                MenuButton btnShowCredits = new MenuButton("Show Credits", ShowCredits);
                MenuButton btnUpdates     = new MenuButton("Check for Updates", CheckForUpdates);
                GTA.Menu extraMenu        = new GTA.Menu("Extras", new GTA.MenuItem[] { btnShowCredits, btnUpdates });
                extraMenu.HasFooter       = false;
                View.AddMenu(extraMenu);
            });
            MenuButton btnReload = new MenuButton("Reload", delegate { ParseSettings(); SetupUIElements(); UI.Notify("Speedometer reloaded");
                                                                       UpdateMainButtons(5); UpdateCoreButtons(0); UpdateDispButtons(0); UpdateColorButtons(0); });
            MenuButton btnBack = new MenuButton("Save & Exit", delegate { View.CloseAllMenus(); });

            mainMenuItems           = new GTA.MenuItem[] { btnToggle, btnClear, btnCore, btnDisp, btnExtra, btnReload, btnBack };
            this.mainMenu           = new MySettingsMenu("Speedometer v" + SCRIPT_VERSION, mainMenuItems, this);
            this.mainMenu.HasFooter = false;

            // Create core menu
            MenuButton btnUseMph       = new MenuButton("", delegate { useMph = !useMph; UpdateCoreButtons(0); });
            MenuButton btnEnableSaving = new MenuButton("", delegate { enableSaving = !enableSaving; UpdateCoreButtons(1); });

            //MenuButton btnEnableMenu = new MenuButton("Disable Menu Key", delegate { enableMenu = !enableMenu; UpdateCoreButtons(2); });
            coreMenuItems           = new GTA.MenuItem[] { btnUseMph, btnEnableSaving };
            this.coreMenu           = new GTA.Menu("Core Settings", coreMenuItems);
            this.coreMenu.HasFooter = false;

            // Create display menu
            MenuButton btnVAlign    = new MenuButton("", delegate { vAlign = (VerticalAlignment)(((int)vAlign + 1) % 3); posOffset.Y = 0; SetupUIElements(); UpdateDispButtons(0); });
            MenuButton btnHAlign    = new MenuButton("", delegate { hAlign = (HorizontalAlign)(((int)hAlign + 1) % 3); posOffset.X = 0; SetupUIElements(); UpdateDispButtons(1); });
            MenuButton btnFontStyle = new MenuButton("", delegate { fontStyle = ++fontStyle % NUM_FONTS; SetupUIElements(); UpdateDispButtons(2); });
            MenuButton btnFontSize  = new MenuButton("Font Size >", delegate
            {
                MenuButton btnAddSize = new MenuButton("+ Font Size", delegate { fontSize += 0.02f; SetupUIElements(); });
                MenuButton btnSubSize = new MenuButton("- Font Size", delegate { fontSize -= 0.02f; SetupUIElements(); });
                GTA.Menu sizeMenu     = new GTA.Menu("Font Size", new GTA.MenuItem[] { btnAddSize, btnSubSize });
                sizeMenu.HasFooter    = false;
                View.AddMenu(sizeMenu);
            });
            MenuButton btnPanelSize = new MenuButton("Panel Size >", delegate
            {
                MenuButton btnAddWidth  = new MenuButton("+ Panel Width", delegate { pWidth += 2; SetupUIElements(); });
                MenuButton btnSubWidth  = new MenuButton("- Panel Width", delegate { pWidth -= 2; SetupUIElements(); });
                MenuButton btnAddHeight = new MenuButton("+ Panel Height", delegate { pHeight += 2; SetupUIElements(); });
                MenuButton btnSubHeight = new MenuButton("- Panel Height", delegate { pHeight -= 2; SetupUIElements(); });
                GTA.Menu panelSizeMenu  = new GTA.Menu("Panel Size", new GTA.MenuItem[] { btnAddWidth, btnSubWidth, btnAddHeight, btnSubHeight });
                panelSizeMenu.HasFooter = false;
                View.AddMenu(panelSizeMenu);
            });
            MenuButton btnAplyOffset = new MenuButton("Set Offset >", delegate
            {
                MenuButton btnOffsetUp    = new MenuButton("Move Up", delegate { posOffset.Y += -2; SetupUIElements(); });
                MenuButton btnOffsetDown  = new MenuButton("Move Down", delegate { posOffset.Y += 2; SetupUIElements(); });
                MenuButton btnOffsetLeft  = new MenuButton("Move Left", delegate { posOffset.X += -2; SetupUIElements(); });
                MenuButton btnOffsetRight = new MenuButton("Move Right", delegate { posOffset.X += 2; SetupUIElements(); });
                MenuButton btnOffsetClr   = new MenuButton("Clear Offset", delegate { posOffset.X = 0; posOffset.Y = 0; SetupUIElements(); });
                GTA.Menu offsetMenu       = new GTA.Menu("Set Offset", new GTA.MenuItem[] { btnOffsetUp, btnOffsetDown, btnOffsetLeft, btnOffsetRight, btnOffsetClr });
                offsetMenu.HasFooter      = false;
                View.AddMenu(offsetMenu);
            });
            MenuButton btnBackcolor  = new MenuButton("Back Color >", delegate { isChangingBackcolor = true; UpdateColorButtons(0); View.AddMenu(colorMenu); });
            MenuButton btnForecolor  = new MenuButton("Fore Color >", delegate { isChangingBackcolor = false; UpdateColorButtons(0); View.AddMenu(colorMenu); });
            MenuButton btnRstDefault = new MenuButton("Restore to Default", delegate { ResetUIToDefault(); UpdateDispButtons(8); });

            dispMenuItems           = new GTA.MenuItem[] { btnVAlign, btnHAlign, btnFontStyle, btnAplyOffset, btnFontSize, btnPanelSize, btnBackcolor, btnForecolor, btnRstDefault };
            this.dispMenu           = new GTA.Menu("Display Settings", dispMenuItems);
            this.dispMenu.HasFooter = false;

            // Create color menu
            MenuButton btnAddR = new MenuButton("+ R", delegate
            {
                if (isChangingBackcolor)
                {
                    backcolor = IncrementARGB(backcolor, 0, 5, 0, 0);
                }
                else
                {
                    forecolor = IncrementARGB(forecolor, 0, 5, 0, 0);
                }
                SetupUIElements(); UpdateColorButtons(0);
            });
            MenuButton btnSubR = new MenuButton("- R", delegate
            {
                if (isChangingBackcolor)
                {
                    backcolor = IncrementARGB(backcolor, 0, -5, 0, 0);
                }
                else
                {
                    forecolor = IncrementARGB(forecolor, 0, -5, 0, 0);
                }
                SetupUIElements(); UpdateColorButtons(1);
            });
            MenuButton btnAddG = new MenuButton("+ G", delegate
            {
                if (isChangingBackcolor)
                {
                    backcolor = IncrementARGB(backcolor, 0, 0, 5, 0);
                }
                else
                {
                    forecolor = IncrementARGB(forecolor, 0, 0, 5, 0);
                }
                SetupUIElements(); UpdateColorButtons(2);
            });
            MenuButton btnSubG = new MenuButton("- G", delegate
            {
                if (isChangingBackcolor)
                {
                    backcolor = IncrementARGB(backcolor, 0, 0, -5, 0);
                }
                else
                {
                    forecolor = IncrementARGB(forecolor, 0, 0, -5, 0);
                }
                SetupUIElements(); UpdateColorButtons(3);
            });
            MenuButton btnAddB = new MenuButton("+ B", delegate
            {
                if (isChangingBackcolor)
                {
                    backcolor = IncrementARGB(backcolor, 0, 0, 0, 5);
                }
                else
                {
                    forecolor = IncrementARGB(forecolor, 0, 0, 0, 5);
                }
                SetupUIElements(); UpdateColorButtons(4);
            });
            MenuButton btnSubB = new MenuButton("- B", delegate
            {
                if (isChangingBackcolor)
                {
                    backcolor = IncrementARGB(backcolor, 0, 0, 0, -5);
                }
                else
                {
                    forecolor = IncrementARGB(forecolor, 0, 0, 0, -5);
                }
                SetupUIElements(); UpdateColorButtons(5);
            });
            MenuButton btnAddA = new MenuButton("+ Opacity", delegate
            {
                if (isChangingBackcolor)
                {
                    backcolor = IncrementARGB(backcolor, 5, 0, 0, 0);
                }
                else
                {
                    forecolor = IncrementARGB(forecolor, 5, 0, 0, 0);
                }
                SetupUIElements(); UpdateColorButtons(6);
            });
            MenuButton btnSubA = new MenuButton("- Opacity", delegate
            {
                if (isChangingBackcolor)
                {
                    backcolor = IncrementARGB(backcolor, -5, 0, 0, 0);
                }
                else
                {
                    forecolor = IncrementARGB(forecolor, -5, 0, 0, 0);
                }
                SetupUIElements(); UpdateColorButtons(7);
            });

            colorMenuItems               = new GTA.MenuItem[] { btnAddR, btnSubR, btnAddG, btnSubG, btnAddB, btnSubB, btnAddA, btnSubA };
            this.colorMenu               = new GTA.Menu("", colorMenuItems);
            this.colorMenu.HasFooter     = false;
            this.colorMenu.HeaderHeight += 20;

            UpdateMainButtons(0);
            UpdateCoreButtons(0);
            UpdateDispButtons(0);
            UpdateColorButtons(0);
        }
Ejemplo n.º 52
0
    private void OpenVehicleMarkMenu()
    {
        var menuItems = new List<IMenuItem>();
        var text = (markedvehicle != null) ? new MenuLabel(("Marked Vehicle: " + markedvehicle.FriendlyName), true) : new MenuLabel(("Marked Vehicle: None"), true);
        menuItems.Add(text);

        if (Game.Player.Character.IsInVehicle())
        {
            var button = new MenuButton("Mark the vehicle I'm in", (Game.Player.Character.CurrentVehicle.FriendlyName));
            button.Activated += (sender, args) => this.MarkVehicleImIn();
            menuItems.Add(button);
        }
        else
        {
            text = new MenuLabel("You are not in a Vehicle");
            menuItems.Add(text);
        }

        var toggle = new MenuToggle("Use markgun", "Just aim at a vehicle", markgun);
        toggle.Changed += (sender, args) =>
        {
            var tg = sender as MenuToggle;
            if (tg == null)
            {
                return;
            }
            markgun = tg.Value;
        };
        menuItems.Add(toggle);

        if (Game.Player.LastVehicle != null || Game.Player.LastVehicle.FriendlyName != "NULL")
        {
            var button = new MenuButton("Mark my last vehicle", Game.Player.LastVehicle.FriendlyName);
            button.Activated += (sender, args) => this.MarkLastVehicle();
            menuItems.Add(button);
        }
        else
        {
            text = new MenuLabel("You weren't in a Vehicle");
            menuItems.Add(text);
        }

        if (markedvehicle != null && markedvehicle.Exists())
        {
            var button = new MenuButton("Unmark", "");
            button.Activated += (sender, args) => this.UnMark();
            menuItems.Add(button);
        }
        else
        {
            markedvehicle = null;
            if (curmark == 1)
            {
                markedvehicle1 = markedvehicle;
            }
            else if (curmark == 2)
            {
                markedvehicle2 = markedvehicle;
            }
            else if (curmark == 3)
            {
                markedvehicle3 = markedvehicle;
            }
        }
        if (markedvehicle1 != null && markedvehicle1.FriendlyName != "NULL" && markedvehicle1.Exists())
        {
            var button = new MenuButton("Open Marked Menu 1", "");
            button.Activated += (sender, args) => this.OpenVehicleMenu(markedvehicle1);
            menuItems.Add(button);
            Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedvehicle1, true);
        }
        else
        {
            markedvehicle1 = null;
        }

        if (markedvehicle2 != null && markedvehicle2.FriendlyName != "NULL" && markedvehicle2.Exists())
        {
            var button = new MenuButton("Open Marked Menu 2", "");
            button.Activated += (sender, args) => this.OpenVehicleMenu(markedvehicle2);
            menuItems.Add(button);
            Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedvehicle2, true);
        }
        else
        {
            markedvehicle2 = null;
        }

        if (markedvehicle3 != null && markedvehicle3.FriendlyName != "NULL" && markedvehicle3.Exists())
        {
            var button = new MenuButton("Open Marked Menu 3", "");
            button.Activated += (sender, args) => this.OpenVehicleMenu(markedvehicle3);
            menuItems.Add(button);
            Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedvehicle3, true);
        }
        else
        {
            markedvehicle3 = null;
        }

        var numero = new MenuNumericScroller(("Switch Marked Vehicle"), "", 1, 3, 1, (curmark - 1));
        numero.Changed += numero_Activated;
        menuItems.Add(numero);

        Markmenu = new Menu("(Vehicle) Mark Menu", menuItems.ToArray());
        this.View.AddMenu(Markmenu);
    }
Ejemplo n.º 53
-1
        protected override void Start()
        {
            RPGSettings.AudioVolume = RPG.Settings.GetValue("Options", "AudioVolume", 35);
            RPGSettings.PlayKillstreaks = RPG.Settings.GetValue("Options", "PlayKillAnnouncements", true);
            RPGSettings.ShowKillstreaks = RPG.Settings.GetValue("Options", "ShowKillAnnouncements", true);
            RPGSettings.ShowPrerequisiteWarning = RPG.Settings.GetValue("Options", "ShowPrerequisiteWarning", true);
            RPGSettings.ShowPressYToStart = RPG.Settings.GetValue("Options", "ShowPressYToStart", true);
            RPGSettings.EnableAutoSave = RPG.Settings.GetValue("Options", "EnableAutoSave", true);
            RPGSettings.AutosaveInterval = RPG.Settings.GetValue("Options", "AutosaveIntervalSeconds", 30);
            RPGSettings.AutostartRPGMode = RPG.Settings.GetValue("Options", "AutostartRPGMode", true);
            RPGSettings.ShowQuestTracker = RPG.Settings.GetValue("Options", "ShowQuestTracker", true);
            RPGSettings.ShowSkillBar = RPG.Settings.GetValue("Options", "ShowSkillBar", true);
            RPGSettings.SafeArea = RPG.Settings.GetValue("Options", "SafeArea", 10);

            NpcCamera = World.CreateCamera(Game.Player.Character.Position, Game.Player.Character.Rotation, GameplayCamera.FieldOfView);
            OptionsMenu = new RPGMenu("Options", new GTASprite("CommonMenu", "interaction_bgd", Color.ForestGreen), new IMenuItem[] {
                        new MenuButton("Save Game", "").WithActivate(() => { RPG.SaveAllData(); RPG.Subtitle("Saved");}),
                        new MenuButton("New Game", "").WithActivate(NewGame),
                        new MenuNumericScroller("AudioVolume","",0,100,10,RPGSettings.AudioVolume/10).WithNumericActions(ChangeAudioVolume,d => { }),
                        new MenuNumericScroller("SafeArea Setting","",0,10,1,RPGSettings.SafeArea).WithNumericActions(ChangeSafeArea,d => { }),
                        new MenuToggle("Toggle Skill Bar", "",RPGSettings.ShowSkillBar).WithToggles(ToggleSkillBar, ToggleSkillBar),
                        new MenuToggle("Toggle Quest Tracker", "",RPGSettings.ShowQuestTracker).WithToggles(ToggleQuestTracker, ToggleQuestTracker),

                        new MenuToggle("Play Kill Announcer Sounds", "",RPGSettings.PlayKillstreaks).WithToggles(ToggleKillAnnounceSounds, ToggleKillAnnounceSounds),
                        new MenuToggle("Show Killstreak Text", "",RPGSettings.ShowKillstreaks).WithToggles(ToggleShowKillAnnounce, ToggleShowKillAnnounce),
                        new MenuToggle("Show Prerequisite Warning", "",RPGSettings.ShowPrerequisiteWarning).WithToggles(ToggleWarning, ToggleWarning),
                        new MenuToggle("Show Press Y To Start", "",RPGSettings.ShowPressYToStart).WithToggles(ToggleShowPressY, ToggleShowPressY),
                        new MenuToggle("Enable Auto Save", "",RPGSettings.EnableAutoSave).WithToggles(ToggleAutoSave, ToggleAutoSave),
                        new MenuNumericScroller("Autosave Interval (s)","",0,120,10,RPGSettings.AutosaveInterval/10).WithNumericActions(ChangeAutosaveInterval,d => { }),
                        new MenuToggle("Autostart RPG Mode", "",RPGSettings.AutostartRPGMode).WithToggles(ToggleAutostartRPG, ToggleAutostartRPG),

                        new MenuButton("Mod Version: " + RPG.Version, ""),
                        new MenuButton("Back", "").WithActivate(() => View.PopMenu())
                    });
            RPGUI.FormatMenu(OptionsMenu);
        }