X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud_config.qc;h=4b55bb40e9850ab92c104210f6d2fb3712373c93;hb=777dc5e23d7512c3e33576884d8d200f244d3006;hp=3352e643abab19f0790d382de3c794dfb5e2a6b4;hpb=5b4d55a39e59f76751555cc0420e5734fbc4a792;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud_config.qc b/qcsrc/client/hud_config.qc index 3352e643a..4b55bb40e 100644 --- a/qcsrc/client/hud_config.qc +++ b/qcsrc/client/hud_config.qc @@ -431,8 +431,7 @@ void HUD_Panel_SetPosSize(vector mySize) { panel = highlightedPanel; HUD_Panel_UpdatePosSize(); - vector resizeorigin; - resizeorigin = panel_click_resizeorigin; + vector resizeorigin = panel_click_resizeorigin; vector myPos; // minimum panel size cap @@ -565,7 +564,6 @@ void HUD_Panel_Arrow_Action(float nPrimary) if (hudShiftState & S_ALT) // resize { - highlightedAction = 1; if(nPrimary == K_UPARROW) resizeCorner = 1; else if(nPrimary == K_RIGHTARROW) @@ -602,7 +600,6 @@ void HUD_Panel_Arrow_Action(float nPrimary) } else // move { - highlightedAction = 2; vector pos; pos = panel_pos; if(nPrimary == K_UPARROW) @@ -744,15 +741,14 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary) 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; @@ -897,6 +893,12 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary) 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) @@ -917,7 +919,7 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary) if (highlightedPanel) HUD_Panel_EnableMenu(); } - else if(hit_con_bind) + else if(hit_con_bind || nPrimary == K_PAUSE) return false; return true; @@ -1176,6 +1178,8 @@ void HUD_Panel_Mouse() } else { + if(prevMouseClicked) + highlightedAction = 0; if(menu_enabled == 2) mouse_over_panel = 0; else