]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud_config.qc
Merge branch 'master' into terencehill/hud_cleanups
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud_config.qc
index 55c6c061eaae81fe8b6c77cc8a8249fe77627034..48b3c821d20cf35d5f4ec0330dc4c368d99de5b0 100644 (file)
@@ -1,11 +1,7 @@
 #include "hud_config.qh"
-#include "_all.qh"
 
 #include "hud.qh"
 
-#include "../common/constants.qh"
-
-
 #define HUD_Write(s) fputs(fh, s)
 // q: quoted, n: not quoted
 #define HUD_Write_Cvar_n(cvar) HUD_Write(strcat("seta ", cvar, " ", cvar_string(cvar), "\n"))
@@ -239,7 +235,7 @@ vector HUD_Panel_CheckMove(vector myPos, vector mySize)
        int i;
        for (i = 0; i < hud_panels_COUNT; ++i) {
                panel = hud_panels[i];
-               if(panel == HUD_PANEL(MAPVOTE)) continue;
+               if(!(panel.panel_configflags & PANEL_CONFIG_MAIN)) continue;
                if(panel == highlightedPanel) continue;
                HUD_Panel_UpdatePosSize();
                if(!panel_enabled) continue;
@@ -336,7 +332,7 @@ vector HUD_Panel_CheckResize(vector mySize, vector resizeorigin) {
        int i;
        for (i = 0; i < hud_panels_COUNT; ++i) {
                panel = hud_panels[i];
-               if(panel == HUD_PANEL(MAPVOTE)) continue;
+               if(!(panel.panel_configflags & PANEL_CONFIG_MAIN)) continue;
                if(panel == highlightedPanel) continue;
                HUD_Panel_UpdatePosSize();
                if(!panel_enabled) continue;
@@ -788,7 +784,7 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
                        for(i = 0; i < hud_panels_COUNT; ++i)
                        {
                                panel = hud_panels[i];
-                               if(panel == HUD_PANEL(MAPVOTE))
+                               if(!(panel.panel_configflags & PANEL_CONFIG_MAIN))
                                        continue;
                                if (panel == tab_panels[i] || panel == starting_panel)
                                        continue;
@@ -937,7 +933,7 @@ float HUD_Panel_Check_Mouse_Pos(float allow_move)
                j += 1;
 
                panel = hud_panels[i];
-               if(panel == HUD_PANEL(MAPVOTE)) continue;
+               if(!(panel.panel_configflags & PANEL_CONFIG_MAIN)) continue;
                HUD_Panel_UpdatePosSize();
 
                float border = max(8, panel_bg_border); // FORCED border so a small border size doesn't mean you can't resize
@@ -1019,7 +1015,7 @@ void HUD_Panel_Highlight(float allow_move)
                j += 1;
 
                panel = hud_panels[i];
-               if(panel == HUD_PANEL(MAPVOTE))
+               if(!(panel.panel_configflags & PANEL_CONFIG_MAIN))
                        continue;
                HUD_Panel_UpdatePosSize();