public WarehouseMenu() { menuPool = new MenuPool(); actionMenu = new UIMenu(Strings.WAREHOUSE_MENU_TITLE, Strings.WAREHOUSE_MENU_SUBTITLE); stealVehicleItem = new UIMenuItem(Strings.WAREHOUSE_MENU_ITEM_STEAL); actionMenu.AddItem(stealVehicleItem); menuPool.Add(actionMenu); actionMenu.OnItemSelect += new ItemSelectEvent(async(menu, item, pos) => { switch (pos) { case 0: actionMenu.Visible = false; Screen.Fading.FadeOut(1000); await MissionStarter.RequestPrepareMission((IMission)Activator.CreateInstance( DeliveryMissionHolder.Missions[API.GetRandomIntInRange(0, DeliveryMissionHolder.Missions.Length)])); await WarehouseTeleporter.RequestTeleport(WarehouseTeleport.Outside); await Delay(1000); MissionStarter.RequestStartMission(); PhoneState.Block = false; break; } }); Tick += OnTick; }
public Main() { Tick += Main_Tick; KeyUp += Main_KeyUp; menuPool = new MenuPool(); Setup(); }
public Menu() { CH.Messages.NotifyToLoad(modName: ModName); _menuPool = new MenuPool(); var mainMenu = new UIMenu(ModName, "~b~Select Item"); _menuPool.Add(mainMenu); SpawnDubsta(mainMenu); DriveTo(mainMenu); Cruise(mainMenu); Repair(mainMenu); //TaskDriveToPlayer(mainMenu); _menuPool.RefreshIndex(); Tick += (o, e) => _menuPool.ProcessMenus(); KeyDown += (o, e) => { if (e.KeyCode == Keys.F11 && !_menuPool.IsAnyMenuOpen()) // Our menu on/off switch { mainMenu.Visible = !mainMenu.Visible; } }; }
public TruckerJob() { MenuPool menuPool = new MenuPool(); UIMenu menu = new UIMenu("Carrier Menu", ""); menuPool.Add(menu); AddNonTruckerMenu(menu); menuPool.RefreshIndex(); Tick += new Func <Task>(async delegate { // Debug shit //Vector3 pos = LocalPlayer.Character.Position; //Screen.DisplayHelpTextThisFrame($"X:{pos.X} Y:{pos.Y} Z:{pos.Z}"); // Menu stuff menuPool.ProcessMenus(); if (Game.IsControlJustReleased(1, Control.InteractionMenu)) { menu.Visible = !menu.Visible; } await Task.FromResult(0); }); }
public MainMenu() { _menuPool = new MenuPool(); var mainMenu = new UIMenu("GN Police Menu", "Made By ~b~GN_ApexDevil v0.0.4"); _menuPool.Add(mainMenu); PlayerOptions(mainMenu); PoliceAPIFunctions(mainMenu); Weaponslocker(mainMenu); DiscordLink(mainMenu); _menuPool.MouseEdgeEnabled = false; _menuPool.ControlDisablingEnabled = false; _menuPool.RefreshIndex(); Tick += async() => { _menuPool.ProcessMenus(); if (API.IsControlJustPressed(0, 166) && !_menuPool.IsAnyMenuOpen()) // Our menu on/off switch { mainMenu.Visible = !mainMenu.Visible; } }; }
public void Script_Aborted(object sender, EventArgs e) { if (InsideMethLabIdx != -1) { LeftMethLab.Invoke(InsideMethLabIdx, LabExitReason.ScriptExit); } foreach (Entity ent in MethLabEntities) { ent?.Delete(); } MethLabEntities.Clear(); foreach (Lab lab in MethLabs) { lab.DestroyEntities(); } MethLabs.Clear(); ManagementBlip?.Remove(); ManagementBlip = null; ManagementMain = null; ManagementMenuPool = null; }
public Menu() { CH.Messages.NotifyToLoad(modName: ModName); var menuPool = new MenuPool(); var mainMenu = new UIMenu(ModName, "GTAVMods - All in One"); menuPool.Add(mainMenu); SpawnKillers2(mainMenu); SpawnKillers(mainMenu); Cord(mainMenu); SpawnHydra(mainMenu); SpawnHydraWithPilot(mainMenu); SpawnDriverInCar(mainMenu); ScriptTutorial_CreateDogs(mainMenu); ScriptTutorial_KilleDogs(mainMenu); Visibility(mainMenu); menuPool.RefreshIndex(); Tick += (o, e) => menuPool.ProcessMenus(); KeyDown += (o, e) => { if (e.KeyCode == Keys.F12 && !menuPool.IsAnyMenuOpen()) // Our menu on/off switch { mainMenu.Visible = !mainMenu.Visible; } }; }
public void Script_Aborted(object sender, EventArgs e) { if (RCBombActive) { if (FPSCamera) { Function.Call(Hash.SET_FOLLOW_VEHICLE_CAM_VIEW_MODE, PrevCamMode); } Game.Player.Character.IsExplosionProof = false; Function.Call(Hash.SET_TIMECYCLE_MODIFIER_STRENGTH, 1.0f); Function.Call(Hash.CLEAR_TIMECYCLE_MODIFIER); Function.Call(Hash.DISPLAY_RADAR, true); } RCSpawnerProp?.Delete(); RCSpawner?.Delete(); RCVehicle?.Delete(); RCBombActive = false; RCSpawnerProp = null; RCSpawner = RCVehicle = null; RCMenuPool = null; RCSpawnerMenu = null; }
public Test() { this.Tick += onTick; this.KeyDown += onKeyDown; //this.Interval = 1000; // run every second // menu menuPool = new MenuPool(); SetupMenu(); modMenu.OnItemSelect += MenuSelect; // get player into position etc player = Game.Player.Character; //Sub(player.Position); // testing... //if (covid == null) //{ // covid = InstantiateScript<Covid>(); // covid.setMain(this); //} if (imageFace == null) { imageFace = InstantiateScript <ImageFace>(); imageFace.setMain(this); } }
public WeaponMenu() { _weaponmenuPool = new MenuPool(); weaponMenu = new UIMenu("Weapon Menu", "~p~Freedom Framework ~w~by ~b~Abel Gaming"); _weaponmenuPool.Add(weaponMenu); MeleeWeapons(weaponMenu); HandgunWeapons(weaponMenu); ShotgunWeapons(weaponMenu); MachinegunWeapons(weaponMenu); RifleWeapons(weaponMenu); SniperWeapons(weaponMenu); HeavyWeapons(weaponMenu); ExplosiveWeapons(weaponMenu); BodyArmor(weaponMenu); _weaponmenuPool.MouseEdgeEnabled = false; _weaponmenuPool.ControlDisablingEnabled = false; _weaponmenuPool.RefreshIndex(); Tick += async() => { _weaponmenuPool.ProcessMenus(); }; }
public static void SetupPlayMenu(MenuPool _pool) { playMenu.AddItem(play); play.Activated += Play_Activated; playMenu.AddItem(multiDrop); _pool.Add(playMenu); }
public MainMenu() { _menuPool = new MenuPool(); mainMenu = new UIMenu("Main Menu", "~p~Freedom Framework ~w~by ~b~Abel Gaming"); _menuPool.Add(mainMenu); Inventory(mainMenu); MenuItems(mainMenu); _menuPool.MouseEdgeEnabled = false; _menuPool.ControlDisablingEnabled = false; _menuPool.RefreshIndex(); Tick += async() => { _menuPool.ProcessMenus(); if (API.IsControlJustPressed(0, 168) && !_menuPool.IsAnyMenuOpen()) // Our menu on/off switch { mainMenu.Visible = !mainMenu.Visible; } bread.SetRightLabel($"{Utilities.Constructors.Bread.ToString()}"); cola.SetRightLabel($"{Utilities.Constructors.Colas.ToString()}"); water.SetRightLabel($"{Utilities.Constructors.Waters.ToString()}"); }; }
public void process() { if (MenuPool != null && MenuPool.IsAnyMenuOpen()) { MenuPool.ProcessMenus(); } }
public CarrierMenu() { MPool = new MenuPool { (MainMenu = new UIMenu("Carrier Menu", "Select an action")), (PlaneSelectionMenu = new UIMenu("Carrier Menu", "Select an aircraft model") { ParentMenu = MainMenu }) }; MainMenu.Visible = false; PlaneSelectionMenu.Visible = false; MainMenu.AddItem(GoToGroundItem = new UIMenuItem("Go back to LSIA", "Travel back to the airport Police Sation")); MainMenu.AddItem(NavigateToPlaneSelectionItem = new UIMenuItem("Take an Aircraft", "Navigate to the Aircraft Selection menu")); MainMenu.BindMenuToItem(PlaneSelectionMenu, NavigateToPlaneSelectionItem); PlaneSelectionMenu.AddItem(ModelList = new UIMenuListItem("Model", "Lets you select the aircraft model you want", AircraftManager.AircraftModels)); PlaneSelectionMenu.AddItem(SpawnPlaneItem = new UIMenuItem("Start Flight", "Start a flight with the aircraft you selected")); GoToGroundItem.Activated += GoToCarrier; SpawnPlaneItem.Activated += SpawnPlane; MPool.RefreshIndex(); }
// TODO: Should check if player already loaded void OnPlayerJoining(dynamic arg1, dynamic arg2) { if (emotes.Count != 0) { return; } // Récupère les configs et la liste d'emote LoadConfig(); LoadJson(); // Crée le menu menuPool = new MenuPool(); mainMenu = new UIMenu("Emotes", "Select an emote") { MouseControlsEnabled = false }; menuPool.Add(mainMenu); mainMenu.OnItemSelect += OnItemSelect; foreach (Emote emote in emotes) { mainMenu.AddItem(new UIMenuItem(emote.Description)); } menuPool.RefreshIndex(); }
public VehicleMenu() { _vehiclemenuPool = new MenuPool(); vehicleMenu = new UIMenu("Vehicle Menu", "~p~Freedom Framework ~w~by ~b~Abel Gaming"); _vehiclemenuPool.Add(vehicleMenu); //Create Menus CreateMenus(); //Load Vehicle Hashes LoadVehicles(); //Add Things to Menu AddVehicles(vehicleMenu); AddedVehicles(vehicleMenu); _vehiclemenuPool.MouseEdgeEnabled = false; _vehiclemenuPool.ControlDisablingEnabled = false; _vehiclemenuPool.RefreshIndex(); Tick += async() => { _vehiclemenuPool.ProcessMenus(); }; }
public DevUI() { menuPool = new MenuPool(); mainMenu = new UIMenu("FRFuel dev menu", "things"); position = new UIMenuItem("Pos"); position.Enabled = false; vehicleModelId = new UIMenuItem("Vehicle model ID"); vehicleModelId.Enabled = false; knownVehicle = new UIMenuItem("Is known vehicle"); knownVehicle.Enabled = false; vehicleFuelTank = new UIMenuItem("Vehicle fuel tank"); mainMenu.AddItem(position); mainMenu.AddItem(knownVehicle); mainMenu.AddItem(vehicleModelId); mainMenu.AddItem(vehicleFuelTank); mainMenu.OnItemSelect += (sende, item, index) => { if (item == vehicleFuelTank && Game.PlayerPed.IsInVehicle()) { BaseScript.TriggerServerEvent( "frfuel:dev:saveFuel", "{" + Game.PlayerPed.CurrentVehicle.Model.Hash.ToString() + ", " + Game.PlayerPed.CurrentVehicle.FuelLevel.ToString() + "f}," ); Screen.ShowNotification("Fuel to model saved"); } }; menuPool.Add(mainMenu); menuPool.RefreshIndex(); }
//Now we will add all of our sub menus into our main menu, and set the general information of the entire menu public NativeUITemplate() { playerPed.AlwaysDiesOnLowHealth = false; _menuPool = new MenuPool(); var mainMenu = new UIMenu("~g~Razer ~w~V", "~w~Mod by TheWolf! ~r~V 1.0"); _menuPool.Add(mainMenu); PlayerModelMenu(mainMenu); //Here we add the Player Model Sub Menu _menuPool.RefreshIndex(); //This code will run with every ms tick Tick += OnTick; //This code will open the menu KeyDown += (o, e) => { if (e.KeyCode == Keys.F6 && !_menuPool.IsAnyMenuOpen()) // Our menu on/off switch { mainMenu.Visible = !mainMenu.Visible; } }; var keyboard = Keyboard.Instance; Key[] otherPlayerKeys = { Key.A, Key.S, Key.D, Key.Space, Key.LeftShift, Key.V, Key.F }; keyboard.SetKeys(Color.White, Key.W, otherPlayerKeys); }
public TurnSignals() { UI.Notify("Script ScriptTemplate ~r~Loaded~w~!"); carInfoPositionX.Enabled = false; carInfoPositionY.Enabled = false; carInfoPositionX.Multiplier = 0; carInfoPositionY.Multiplier = 0; speedText.Color = Color.White; speedText.Font = GTA.Font.Monospace; gearText.Color = Color.White; gearText.Font = GTA.Font.Monospace; rpmText.Color = Color.White; rpmText.Font = GTA.Font.Monospace; _menuPool = new MenuPool(); _menuPool.Add(mainMenu); ScriptSett(mainMenu); VehicleSpawn(mainMenu); carMenu(mainMenu); Other(mainMenu); _menuPool.RefreshIndex(); Tick += OnTick; KeyDown += OnKeyDown; KeyUp += OnKeyUp; StartInfo(); }
public VehicleControls() { MenuPool menuPool = new MenuPool(); UIMenu menu = new UIMenu("Controlos do Veiculo", ""); menuPool.Add(menu); AddEngineItem(menu); AddDoorLockItem(menu); AddOpenDoorItem(menu); AddLockSpeedItem(menu); AddSaveVehicleItem(menu); menu.RefreshIndex(); Tick += new Func <Task>(async delegate { await Task.FromResult(0); menuPool.ProcessMenus(); if (Game.IsControlJustReleased(1, Control.InteractionMenu)) { menu.Visible = !menu.Visible; } }); }
public static void InitialiseMenus() { //bigMessage = new BigMessageThread(true); Game.FrameRender += Process; _MenuPool = new MenuPool(); ChecksMenu = new UIMenu("Checks", ""); _MenuPool.Add(ChecksMenu); ChecksMenu.AddItem(CheckNameItem = new UIMenuItem("Name/Vehicle Records Check")); ChecksMenu.AddItem(CheckInsuranceItem = new UIMenuItem("Insurance Checks")); ChecksMenu.AddItem(CheckCourtResultsItem = new UIMenuItem("Magistrates' Court Results")); //ChecksMenu.SetMenuWidthOffset(0) ChecksMenu.RefreshIndex(); ChecksMenu.OnItemSelect += OnItemSelect; //ChecksMenu.OnListChange += OnListChange; //_MenuPool.ProcessMenus(); ChecksMenu.MouseControlsEnabled = false; ChecksMenu.AllowCameraMovement = true; CourtsMenu = new TabView("~b~~h~San Andreas Magistrates' Court"); CourtsMenu.Tabs.Add(PendingResultsList = new TabSubmenuItem("Pending Results", EmptyItems)); CourtsMenu.Tabs.Add(PublishedResultsList = new TabSubmenuItem("Results", EmptyItems)); CourtsMenu.RefreshIndex(); MainLogic(); //CourtSystem.CreateNewCourtCase("Zach Houseknecht", new DateTime(1990, 2, 1), "speeding at 82MPH in a 30MPH limit", DateTime.Now.AddDays(-1), true, "Fined $500 and licence suspended for 56 days.", DateTime.Now, true); //CourtSystem.CreateNewCourtCase("Jeff Favignano", new DateTime(1990, 2, 1), "Armed Robbery", DateTime.Now, true, "Sentenced to 6 years in prison", DateTime.Now.AddDays(1), false); }
void MainMenu() { modMenuPool = new MenuPool(); mainMenu = new UIMenu("Mod Menu", "SELECT AN OPTION"); modMenuPool.Add(mainMenu); currentMenu = mainMenu; startMatchButton = new UIMenuItem("Start Team Deathmatch"); mainMenu.AddItem(startMatchButton); startSurvivalButton = new UIMenuItem("Start Survival"); mainMenu.AddItem(startSurvivalButton); stopMatchButton = new UIMenuItem("Stop Match"); mainMenu.AddItem(stopMatchButton); teleport = new UIMenuItem("Teleport to Friendly Spawn Point"); mainMenu.AddItem(teleport); //loadLocations = new UIMenuItem("Load Locations"); //mainMenu.AddItem(loadLocations); maxHealth = new UIMenuItem("Max Health & Armor"); mainMenu.AddItem(maxHealth); saveCurrentPed = new UIMenuItem("Save current ped"); mainMenu.AddItem(saveCurrentPed); mainMenu.OnItemSelect += OnMainMenuItemSelect; mainMenu.OnCheckboxChange += OnMainMenuCheckboxChange; mainMenu.OnListChange += OnMainMenuListChange; mainMenu.OnMenuChange += OnMenuChanged; }
private static InstructionalButton buttonCancelEvent = new InstructionalButton(Controls.TertiaryAction, Text.buttonCancelEvent); // Creating the Cancel Event button public Controller() { Tracks.AddTracks(); // Adding all tracks Collections.AddCollections(); // Adding all collections Intensities.AddIntensities(); // Adding all intensities controllerMenuPool = new MenuPool(); #if DLCPACK controllerMain = new UIMenu("", Text.controllerSubtitle); // With custom banner #else controllerMain = new UIMenu(Text.controllerTitle, Text.controllerSubtitle); // Without custom banner #endif #if DEBUG testingMain = new UIMenu("Testing", "TESTING OPTIONS"); // #DEBUG #endif controllerMain.AddItem(mainScoreCollection = new UIMenuListItem(Text.mainScoreCollectionTitle, Collections.scoreCollections, 0, Text.mainScoreCollectionDescr)); controllerMain.AddItem(mainScoreTrack = new UIMenuListItem(Text.mainScoreTrackTitle, Tracks.scoreLists[0], 0, Text.mainScoreTrackDescr)); controllerMain.AddItem(mainScoreIntensity = new UIMenuListItem(Text.mainScoreIntensityTitle, Intensities.listIntensities, 0, Text.mainScoreIntensityDescr)); controllerMain.AddItem(mainMuteSound = new UIMenuCheckboxItem(Text.mainMuteSoundTitle, false, Text.mainMuteSoundDescr)); controllerMain.AddItem(mainMuteRadio = new UIMenuCheckboxItem(Text.mainMuteRadioTitle, false, Text.mainMuteRadioDescr)); controllerMain.AddItem(mainDisableWanted = new UIMenuCheckboxItem(Text.mainDisableWantedTitle, false, Text.mainDisableWantedDescr)); controllerMain.AddItem(mainDisableFlight = new UIMenuCheckboxItem(Text.mainDisableFlightTitle, false, Text.mainDisableFlightDescr)); controllerMain.AddItem(mainDisableOnDeath = new UIMenuCheckboxItem(Text.mainDisableOnDeathTitle, true, Text.mainDisableOnDeathDescr)); #if DEBUG controllerMain.AddItem(mainCustomEvent = new UIMenuItem(Text.mainCustomEventTitle, Text.mainCustomEventDescr)); // #DEBUG // controllerMain.AddItem(mainCustomScene = new UIMenuItem(Text.mainCustomSceneTitle, Text.mainCustomSceneDescr)); #DEBUG controllerMain.AddItem(mainTesting = new UIMenuItem("Testing", "Testing stuff.")); // #DEBUG testingMain.AddItem(testingFinaleTrack = new UIMenuItem("Trigger CH Finale Track", "Testing stuff.")); // #DEBUG #endif #if DLCPACK controllerMain.SetBannerType(bannerScoreController); // Adding the banner #endif controllerMain.AddInstructionalButton(buttonStopScore); // Adding the Stop Score button #if DEBUG controllerMain.AddInstructionalButton(buttonCancelEvent); // Adding the Cancel event button #DEBUG #endif controllerMenuPool.Add(controllerMain); #if DEBUG controllerMenuPool.Add(testingMain); // #DEBUG #endif Tick += OnTick; KeyDown += OnKeyDown; controllerMain.OnIndexChange += OnIndexChange; controllerMain.OnItemSelect += OnItemSelect; controllerMain.OnListChange += ListChangeHandler; controllerMain.OnCheckboxChange += OnCheckboxChange; WarningMessage.OnWarningMessage += OnWarningMessage; controllerMain.RefreshIndex(); #if DEBUG testingMain.OnItemSelect += OnItemSelect; // #DEBUG #endif }
public SettingsMenu(MenuPool menuPool, Settings settings) { _menuPool = menuPool; _settings = settings; CreateMenu(); }
public IntroScreen(MenuPool menuPool, Settings settings) { _menuPool = menuPool; _settings = settings; CreateMenu(); }
public Ptfx() { MenuPool = new MenuPool(); updateAvailable = CheckForUpdate(); UpdateMenu(); Tick += (sender, e) => { if (updateAvailable) { Notification.Show("New PTFX Database update available", true); updateAvailable = false; } if (MenuPool != null) { MenuPool.ProcessMenus(); if (!MenuPool.IsAnyMenuOpen() && !Game.Player.Character.IsVisible) { Game.Player.Character.IsVisible = true; } } }; KeyDown += (sender, e) => { if (MenuPool != null && e.KeyCode == Keys.F9) { MenuPool.OpenCloseLastMenu(); } }; }
public BackupCall() { MenuPool menuPool = new MenuPool(); UIMenu menu = new UIMenu("Backup Menu", ""); menuPool.Add(menu); AddBackupHeliItem(menu); AddBackupTechnicalItem(menu); menu.RefreshIndex(); Tick += new Func <Task>(async delegate { menuPool.ProcessMenus(); if (Game.IsControlJustReleased(0, Control.PhoneOption)) { menu.Visible = !menu.Visible; ClearDescriptions(); } await Task.FromResult(0); }); }
private async void InitialiseMenu() { if (EditorMenu == null) { EditorMenu = new UIMenu(ScriptName, "Edit Track Width and Camber", new PointF(screenPosX * Screen.Width, screenPosY * Screen.Height)); { EditorMenu.MouseEdgeEnabled = false; EditorMenu.ControlDisablingEnabled = false; EditorMenu.MouseControlsEnabled = false; } } else { EditorMenu.Clear(); } frontOffsetGUI = AddDynamicFloatList(EditorMenu, "Front Track Width", -currentPreset.DefaultOffsetX[0], -currentPreset.OffsetX[0], FrontMaxOffset); rearOffsetGUI = AddDynamicFloatList(EditorMenu, "Rear Track Width", -currentPreset.DefaultOffsetX[currentPreset.FrontWheelsCount], -currentPreset.OffsetX[currentPreset.FrontWheelsCount], RearMaxOffset); frontRotationGUI = AddDynamicFloatList(EditorMenu, "Front Camber", currentPreset.DefaultRotationY[0], currentPreset.RotationY[0], FrontMaxCamber); rearRotationGUI = AddDynamicFloatList(EditorMenu, "Rear Camber", currentPreset.DefaultRotationY[currentPreset.FrontWheelsCount], currentPreset.RotationY[currentPreset.FrontWheelsCount], RearMaxCamber); AddMenuReset(EditorMenu); if (_menuPool == null) { _menuPool = new MenuPool(); { _menuPool.ResetCursorOnOpen = true; } _menuPool.Add(EditorMenu); } _menuPool.RefreshIndex(); await Delay(0); }
public static void Main() { MenusProcessFiber = new GameFiber(ProcessLoop); Logger.DebugLog("ProcessFiber created"); menuPool = new MenuPool(); Logger.DebugLog("MenuPool created"); mainMenu = new UIMenu("BVF", "~b~Basic Vehicle Functions"); mainMenu.MouseControlsEnabled = false; mainMenu.AllowCameraMovement = true; Logger.DebugLog("Main Menu created"); menuPool.Add(mainMenu); Logger.DebugLog("Main Menu added to pool"); DoorMainMenu = new UIMenu("BVF", "~b~Basic Vehicle Functions"); DoorMainMenu.MouseControlsEnabled = false; DoorMainMenu.AllowCameraMovement = true; Logger.DebugLog("Door Menu created"); menuPool.Add(DoorMainMenu); Logger.DebugLog("Door Menu added to pool"); //add items here toggleBoot = new UIMenuItem("Boot"); toggleBonnet = new UIMenuItem("Bonnet"); togglelf = new UIMenuItem("Rear Driver"); togglerf = new UIMenuItem("Rear Passenger"); togglefd = new UIMenuItem("Front Driver"); togglefp = new UIMenuItem("Front Passenger"); toggleEngine = new UIMenuItem("Toggle Engine"); mainMenu.AddItem(StartCalloutItem = new UIMenuItem("Open/Close Doors", " Open and close specific doors")); mainMenu.AddItem(toggleEngine); mainMenu.BindMenuToItem(DoorMainMenu, StartCalloutItem); DoorMainMenu.AddItem(togglefd); DoorMainMenu.AddItem(togglefp); DoorMainMenu.AddItem(togglelf); DoorMainMenu.AddItem(togglerf); DoorMainMenu.AddItem(toggleBoot); DoorMainMenu.AddItem(toggleBonnet); DoorMainMenu.RefreshIndex(); DoorMainMenu.OnItemSelect += BootOnItemSelect; DoorMainMenu.OnIndexChange += OnItemChange; Logger.DebugLog("Configured Door Menu"); mainMenu.RefreshIndex(); mainMenu.OnItemSelect += OnItemSelect; mainMenu.OnIndexChange += OnItemChange; Logger.DebugLog("Configured Main Menu"); MenusProcessFiber.Start(); Logger.DebugLog("ProcessFiber started"); GameFiber.Hibernate(); }
// create or re-create menu void CreateNewMenu() { _menuPool = new MenuPool(); mainMenu = new UIMenu("3d Marker", "~b~Marker Selection"); _menuPool.Add(mainMenu); CreateMenu(mainMenu); _menuPool.RefreshIndex(); }