Beispiel #1
0
 public static void OnItemSelect(UIMenu sender, UIMenuItem selectedItem, int index)
 {
     if (sender == pLoadoutMenu)
     {
         if (selectedItem == pGiveLoadout)
         {
             Logger.DebugLog("UI", "Give Loadout Menu Option Selected, Giving Loadout.");
             LoadoutHandler.GiveLoadout();
         }
     }
     else
     {
         return;
     }
 }
Beispiel #2
0
        //Game loop
        internal static void PluginLoop()
        {
            Logger.DebugLog("UI", "Starting plugin loop.");
            while (true)
            {
                GameFiber.Yield();
                //Checking if keybinds for opening menu is pressed. Currently it doesn't check if any other menu is open, so it can overlap with other RageNativeUI menus.
                if (Game.IsKeyDownRightNow(Global.Controls.OpenMenuModifier) && Game.IsKeyDown(Global.Controls.OpenMenu) || Global.Controls.OpenMenuModifier == Keys.None && Game.IsKeyDown(Global.Controls.OpenMenu))
                {
                    Logger.DebugLog("UI", "Menu button pressed, toggling menu status");
                    pLoadoutMenu.Visible = !pLoadoutMenu.Visible;
                }

                if (Game.IsKeyDownRightNow(Global.Controls.GiveLoadoutModifier) && Game.IsKeyDown(Global.Controls.GiveLoadout) || Global.Controls.GiveLoadoutModifier == Keys.None && Game.IsKeyDown(Global.Controls.GiveLoadout))
                {
                    Logger.DebugLog("UI", "Quick Give Bind Pressed, Giving Loadout");
                    LoadoutHandler.GiveLoadout();
                }

                pMenuPool.ProcessMenus();
            }
        }
Beispiel #3
0
 public void DutyStateChange(bool OnDuty)
 {
     LoadoutHandler.LSPDFRLoadout(OnDuty);
 }