-#if defined(CSQC)
- #include "../dpdefs/csprogsdefs.qh"
- #include "defs.qh"
- #include "../dpdefs/keycodes.qh"
- #include "../common/constants.qh"
- #include "autocvars.qh"
- #include "hud.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "hud_config.qh"
+#include "_all.qh"
+
+#include "hud.qh"
+
+#include "../common/constants.qh"
+
+#include "../dpdefs/keycodes.qh"
#define HUD_Write(s) fputs(fh, s)
HUD_Write_PanelCvar_q("_fade_subsequent_minfontsize");
HUD_Write_PanelCvar_q("_fade_minfontsize");
break;
+ case HUD_PANEL_ITEMSTIME:
+ HUD_Write_PanelCvar_q("_iconalign");
+ HUD_Write_PanelCvar_q("_progressbar");
+ HUD_Write_PanelCvar_q("_progressbar_name");
+ HUD_Write_PanelCvar_q("_progressbar_reduced");
+ HUD_Write_PanelCvar_q("_showspawned");
+ HUD_Write_PanelCvar_q("_text");
+ HUD_Write_PanelCvar_q("_ratio");
+ HUD_Write_PanelCvar_q("_size_dinamic");
+ break;
}
HUD_Write("\n");
}
{
panel = highlightedPanel;
HUD_Panel_UpdatePosSize();
- vector resizeorigin;
- resizeorigin = panel_click_resizeorigin;
+ vector resizeorigin = panel_click_resizeorigin;
vector myPos;
// minimum panel size cap
if (hudShiftState & S_ALT) // resize
{
- highlightedAction = 1;
if(nPrimary == K_UPARROW)
resizeCorner = 1;
else if(nPrimary == K_RIGHTARROW)
}
else // move
{
- highlightedAction = 2;
vector pos;
pos = panel_pos;
if(nPrimary == K_UPARROW)
if (!menu_enabled)
cvar_set("_hud_configure", "0");
}
- else if(nPrimary == K_TAB && hudShiftState & S_CTRL) // select and highlight another panel
+ else if(nPrimary == K_TAB && hudShiftState & S_CTRL) // switch panel
{
if (bInputType == 1 || mouseClicked)
return true;
- //FIXME: if a panel is highlighted, has the same pos_x and lays in the same level
- //of other panels then next consecutive ctrl-tab will select the highlighted panel too
- //(it should only after every other panel of the hud)
- //It's a minor bug anyway, we can live with it
+ // FIXME minor bug: if a panel is highlighted, has the same pos_x and
+ // lays in the same level of another panel then the next consecutive
+ // CTRL TAB presses will reselect once more the highlighted panel
entity starting_panel;
entity old_tab_panel = tab_panel;
highlightedPanel_backup = world;
}
}
+ else if(nPrimary == 's' && hudShiftState & S_CTRL) // save config
+ {
+ if (bInputType == 1 || mouseClicked)
+ return true;
+ localcmd("hud save myconfig\n");
+ }
else if(nPrimary == K_UPARROW || nPrimary == K_DOWNARROW || nPrimary == K_LEFTARROW || nPrimary == K_RIGHTARROW)
{
if (bInputType == 1)
if (highlightedPanel)
HUD_Panel_EnableMenu();
}
- else if(hit_con_bind)
+ else if(hit_con_bind || nPrimary == K_PAUSE)
return false;
return true;
}
else
{
+ if(prevMouseClicked)
+ highlightedAction = 0;
if(menu_enabled == 2)
mouse_over_panel = 0;
else