private void CreateSubMenuItems() { PlayerSubMenuItem = new NativeSubmenuItem(PlayerUI, UI); WeaponSubMenuItem = new NativeSubmenuItem(WeaponUI, UI); VehicleSubMenuItem = new NativeSubmenuItem(VehicleUI, UI); VehicleSpawnerSubMenuItem = new NativeSubmenuItem(VehicleSpawnerUI, VehicleUI); Pool.Add(UI); UI.Add(PlayerSubMenuItem); UI.Add(WeaponSubMenuItem); UI.Add(VehicleSubMenuItem); Pool.Add(PlayerUI); PlayerUI.Add(GodMode); PlayerUI.Add(WantedLevel); Pool.Add(WeaponUI); WeaponUI.Add(GiveAllWeapons); WeaponUI.Add(GiveWeapon); WeaponUI.Add(RemoveAllWeapons); Pool.Add(VehicleUI); Pool.Add(VehicleSpawnerUI); VehicleUI.Add(VehicleSpawnerSubMenuItem); VehicleUI.Add(RepairVehicle); VehicleSpawnerUI.Add(SpawnInVehicle); CreateVehicleSpawners(); }
/// <summary> /// Adds a new <see cref="NativeSubmenuItem"/> using text localization system. /// </summary> /// <param name="menu">Instance of a<see cref="CustomNativeMenu"/>.</param> /// <returns>Instance of the new <see cref="NativeSubmenuItem"/>.</returns> public NativeSubmenuItem NewSubmenu(CustomNativeMenu menu) { NativeSubmenuItem item = AddSubMenu(menu); //item.Title = GetItemTitle(menuName); //item.Description = GetItemDescription(menuName); item.Tag = menu.InternalName; return(item); }
/// <summary> /// Adds a new <see cref="NativeSubmenuItem"/> using text localization system. /// </summary> /// <param name="menu">Instance of a<see cref="NativeMenu"/>.</param> /// <param name="menuName">Entry name.</param> /// <returns>Instance of the new <see cref="NativeSubmenuItem"/>.</returns> public NativeSubmenuItem NewSubmenu(NativeMenu menu, string menuName) { NativeSubmenuItem item = AddSubMenu(menu); //item.Title = GetItemTitle(menuName); //item.Description = GetItemDescription(menuName); item.Tag = menuName; return(item); }