X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud_config.qc;h=d1d5dfc8aec21da63dcada6245c0a9c36184f488;hb=fcbf9538330960b989dbe84e7188349d7e8b109f;hp=15b924dd9cb9f6eae222bad1524642f001f52003;hpb=1ecbcab6230a6b7b58eb1c5dfddb887b390c937e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud_config.qc b/qcsrc/client/hud_config.qc index 15b924dd9..d1d5dfc8a 100644 --- a/qcsrc/client/hud_config.qc +++ b/qcsrc/client/hud_config.qc @@ -138,6 +138,7 @@ void HUD_Panel_ExportCfg(string cfgname) HUD_Write_PanelCvar_q("_dom_layout"); break; case HUD_PANEL_PRESSEDKEYS: + HUD_Write_PanelCvar_q("_attack"); HUD_Write_PanelCvar_q("_aspect"); break; case HUD_PANEL_ENGINEINFO: @@ -159,8 +160,11 @@ void HUD_Panel_ExportCfg(string cfgname) HUD_Write_PanelCvar_q("_flip"); HUD_Write_PanelCvar_q("_baralign"); HUD_Write_PanelCvar_q("_progressbar"); - HUD_Write_PanelCvar_q("_acceleration_mode"); + HUD_Write_PanelCvar_q("_progressbar_acceleration_mode"); + HUD_Write_PanelCvar_q("_progressbar_acceleration_scale"); + HUD_Write_PanelCvar_q("_progressbar_acceleration_nonlinear"); HUD_Write_PanelCvar_q("_text"); + HUD_Write_PanelCvar_q("_text_scale"); break; case HUD_PANEL_CENTERPRINT: HUD_Write_PanelCvar_q("_align"); @@ -631,8 +635,7 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary) { string s; - // we only care for keyboard events - if(bInputType != 0 && bInputType != 1) + if(bInputType == 2) return false; if(!autocvar__hud_configure) @@ -642,6 +645,13 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary) if(autocvar__menu_alpha) return true; + if(bInputType == 3) + { + mousepos_x = nPrimary; + mousepos_y = nSecondary; + return true; + } + // allow console bind to work string con_keys; float keys; @@ -904,7 +914,7 @@ float HUD_Panel_Check_Mouse_Pos(float allow_move) border = max(8, panel_bg_border); // FORCED border so a small border size doesn't mean you can't resize // move - if(allow_move && mousepos_x >= panel_pos_x && mousepos_y >= panel_pos_y && mousepos_x <= panel_pos_x + panel_size_x && mousepos_y <= panel_pos_y + panel_size_y) + if(allow_move && mousepos_x > panel_pos_x && mousepos_y > panel_pos_y && mousepos_x < panel_pos_x + panel_size_x && mousepos_y < panel_pos_y + panel_size_y) { return 1; } @@ -984,7 +994,7 @@ void HUD_Panel_Highlight(float allow_move) border = max(8, panel_bg_border); // FORCED border so a small border size doesn't mean you can't resize // move - if(allow_move && mousepos_x >= panel_pos_x && mousepos_y >= panel_pos_y && mousepos_x <= panel_pos_x + panel_size_x && mousepos_y <= panel_pos_y + panel_size_y) + if(allow_move && mousepos_x > panel_pos_x && mousepos_y > panel_pos_y && mousepos_x < panel_pos_x + panel_size_x && mousepos_y < panel_pos_y + panel_size_y) { highlightedPanel = i; HUD_Panel_FirstInDrawQ(i); @@ -1066,11 +1076,6 @@ void HUD_Panel_Mouse() if(autocvar__menu_alpha == 1) return; - mousepos = mousepos + getmousepos() * autocvar_menu_mouse_speed; - - mousepos_x = bound(0, mousepos_x, vid_conwidth); - mousepos_y = bound(0, mousepos_y, vid_conheight); - if(mouseClicked) { if(prevMouseClicked == 0)