Well, I changed IInput::MouseDeactivate so that it immediately returns if my
dialog HUD is supposed to be active:
void CInput::ActivateMouse (void)
{
if ( m_fMouseActive || dialogHUDActive)
return;
Now when I call CInput::DeactivateMouse, it is at least freeing the mouse and
stopping game movement, but the line:
vgui::surface()->SetCursor( vgui::dc_arrow );
is not causing the mouse to show. The mouse can be moved off the game window to
the desktop (where it of course becomes visible) but it's still not visible
above the game window. How do I get it to show up.
Also, I need to clear my dialogHUDActive variable in the event a map is loaded.
Where can I place the code so that it'll be executed when a map is loaded.
> From: [email protected]
> To: [email protected]
> Date: Tue, 13 Apr 2010 03:51:28 -0400
> Subject: [hlcoders] Using the mouse in game
>
>
> I'm trying to make a dialog system that requires the mouse cursor to be
> visible. I tried calling IInput::DeactivateMouse, but it just turns out the
> engine continuously reactivates it when the game is running. I've been
> implementing the interface as a hud element and the plan is to add some UI
> controls to it. I also need to be able to use a custom mouse cursor. Is there
> a conventional way to do this, or should I just alter CInput::AccumulateMouse
> (or something else)?
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders