From: terencehill Date: Sun, 16 Sep 2018 16:54:34 +0000 (+0200) Subject: Get rid of hud_panel_quickmenu X-Git-Tag: xonotic-v0.8.5~1843^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8a1002266d7c6f5546f686b9dc5fea3d464a8670;p=xonotic%2Fxonotic-data.pk3dir.git Get rid of hud_panel_quickmenu --- diff --git a/qcsrc/client/hud/hud.qc b/qcsrc/client/hud/hud.qc index 3493cde26..a00accb0e 100644 --- a/qcsrc/client/hud/hud.qc +++ b/qcsrc/client/hud/hud.qc @@ -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)); diff --git a/qcsrc/client/hud/hud.qh b/qcsrc/client/hud/hud.qh index 679ec1416..8b1c4fd6c 100644 --- a/qcsrc/client/hud/hud.qh +++ b/qcsrc/client/hud/hud.qh @@ -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 diff --git a/qcsrc/client/hud/panel/quickmenu.qc b/qcsrc/client/hud/panel/quickmenu.qc index 02259f8ee..40342a63c 100644 --- a/qcsrc/client/hud/panel/quickmenu.qc +++ b/qcsrc/client/hud/panel/quickmenu.qc @@ -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)