X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fminigames%2Fcl_minigames_hud.qc;h=1a6d4ff52272e39e4204c9e892545e6688536f63;hb=0b46ddbb5c2658d23ff18ac09df9ed717f032c36;hp=12d2f06d18caecf4bbf6f07d8f803e5ef5073544;hpb=c039d054a46888048d214000273ccfc63e4611b6;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/minigames/cl_minigames_hud.qc b/qcsrc/common/minigames/cl_minigames_hud.qc index 12d2f06d1..1a6d4ff52 100644 --- a/qcsrc/common/minigames/cl_minigames_hud.qc +++ b/qcsrc/common/minigames/cl_minigames_hud.qc @@ -575,7 +575,7 @@ float HUD_Minigame_InputEvent(float bInputType, float nPrimary, float nSecondary { mousepos_x = nPrimary; mousepos_y = nSecondary; - if ( minigame_isactive() && HUD_mouse_over(HUD_PANEL(MINIGAME_BOARD)) ) + if ( active_minigame && HUD_mouse_over(HUD_PANEL(MINIGAME_BOARD)) ) active_minigame.minigame_event(active_minigame,"mouse_moved",mousepos); return true; @@ -607,7 +607,7 @@ float HUD_Minigame_InputEvent(float bInputType, float nPrimary, float nSecondary return false; } - if ( minigame_isactive() && ( bInputType == 0 || bInputType == 1 ) ) + if ( active_minigame && ( bInputType == 0 || bInputType == 1 ) ) { string device = ""; string action = bInputType == 0 ? "pressed" : "released"; @@ -682,21 +682,11 @@ void HUD_Minigame_Mouse() if( !HUD_MinigameMenu_IsOpened() || autocvar__hud_configure || mv_active ) return; - if(!autocvar_hud_cursormode) - { - mousepos = mousepos + getmousepos() * autocvar_menu_mouse_speed; - - mousepos_x = bound(0, mousepos_x, vid_conwidth); - mousepos_y = bound(0, mousepos_y, vid_conheight); - } + if (!autocvar_hud_cursormode) + update_mousepos(); if ( HUD_MinigameMenu_IsOpened() && HUD_mouse_over(HUD_PANEL(MINIGAME_MENU)) ) HUD_MinigameMenu_MouseInput(); draw_cursor_normal(mousepos, '1 1 1', panel_fg_alpha); } - -bool HUD_Minigame_Showpanels() -{ - return (HUD_MinigameMenu_IsOpened() && minigame_isactive()); -}