]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Get rid of hud_panel_quickmenu
authorterencehill <piuntn@gmail.com>
Sun, 16 Sep 2018 16:54:34 +0000 (18:54 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 16 Sep 2018 16:54:34 +0000 (18:54 +0200)
qcsrc/client/hud/hud.qc
qcsrc/client/hud/hud.qh
qcsrc/client/hud/panel/quickmenu.qc

index 3493cde26ca130bd59c486810933b806663c81f8..a00accb0e8e917698b19ac36e488995412f9c0dc 100644 (file)
@@ -696,7 +696,7 @@ void HUD_Main()
                HUD_Panel_Draw(HUD_PANEL(RADAR));
        if(autocvar__con_chat_maximized)
                HUD_Panel_Draw(HUD_PANEL(CHAT));
-       if(hud_panel_quickmenu)
+       if (QuickMenu_IsOpened())
                HUD_Panel_Draw(HUD_PANEL(QUICKMENU));
        HUD_Panel_Draw(HUD_PANEL(SCOREBOARD));
 
index 679ec1416fd869b48d8401556e89372f116c7bf4..8b1c4fd6c1b90de7f2edf3155d47cf3030b860ab 100644 (file)
@@ -75,8 +75,6 @@ int vote_prev; // previous state of vote_active to check for a change
 float vote_alpha;
 float vote_change; // "time" when vote_active changed
 
-float hud_panel_quickmenu;
-
 vector mousepos;
 vector panel_click_distance; // mouse cursor distance from the top left corner of the panel (saved only upon a click)
 vector panel_click_resizeorigin; // coordinates for opposite point when resizing
index 02259f8ee04743acb56fdd359ca0582a5cf7b2af..40342a63ceecff3e6af04e8ce606b27a21c94d4d 100644 (file)
@@ -166,7 +166,6 @@ bool QuickMenu_Open(string mode, string submenu, string file)
        else
                QuickMenu_Page_Load("", 0);
 
-       hud_panel_quickmenu = 1;
        hudShiftState = 0;
 
        QuickMenu_TimeOut = ((autocvar_hud_panel_quickmenu_time > 0) ? time + autocvar_hud_panel_quickmenu_time : 0);
@@ -190,7 +189,6 @@ void QuickMenu_Close()
        for (i = 0; i < QUICKMENU_MAXLINES; ++i)
                QuickMenu_Page_ClearEntry(i);
        QuickMenu_Page_Entries = 0;
-       hud_panel_quickmenu = 0;
        mouseClicked = 0;
        prevMouseClicked = 0;
        QuickMenu_Buffer_Close();
@@ -563,8 +561,7 @@ void HUD_QuickMenu()
 
                if(!hud_draw_maximized) return;
                if(mv_active) return;
-               //if(!autocvar_hud_panel_quickmenu) return;
-               if(!hud_panel_quickmenu) return;
+               if (!QuickMenu_IsOpened()) return;
 
                if(QuickMenu_TimeOut)
                if(time > QuickMenu_TimeOut)