I see.  I just wasn't sure how the HUD elements would behave if they
became Frames, or if I made them children of a frame, i.e. if they
would disappear went the parent went invisible.  I also wasn't sure if
they would grab the input all the time since they'd be visible all the
time.

I could also easily implement my own miniature user interface entirely
within the SDK just by grabbing the cursor position and doing my own
handling.  The only problem I've been having with that the mouse is
reset to the center of the screen each frame so that it can do view
input, but whenever I call ActivateMouse() and DeactivateMouse() on my
own, the engine is calling IN_ActivateMouse() and IN_DeactivateMouse()
and overriding my calls.  I was wondering if it would be OK to stub
out those calls so they don't interfere with what I'm doing, or if
those calls are necessary for the VGUI2 system to operate (since they
appear to be what couples/decouples the mouse from the view).  I can
also think of a few other ways to get around this, but they're pretty
hacky and involve setting up my own hooks all over the input code.  It
would be nice just to use the system in place.

On 8/2/05, Alfred Reynolds <[EMAIL PROTECTED]> wrote:
> You should use a Frame, that is the base container for rendering and
> keyboard/mouse focus. Trying to do it manually will just involve a lot
> of fighting the built in VGUI2 system.
>
> - Alfred
>
> ----Original Message----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Skyler York
> Sent: Tuesday, August 02, 2005 7:44 PM To:
> [email protected] Subject: [hlcoders] Panel input / VGUI
> context
>
> > I'm playing around with the idea of an interactive HUD, and I want
> > the element panels on screen to be able to respond to user input.
> > That's not the heart of the problem though, the problem is actually
> > getting the engine to switch into the VGUI context, where a cursor
> > appears and all mouse and keyboard input is fed to the VGUI system
> > (such as frame has focus).  As of right now, the only way I've seen
> > that happen is using a Frame, or more specifically through a popup
> > registered with ISurface::CreatePopup.  I'd like to get this behavior
> > without dealing with the popup system but am unsure as to how to work
> > with the surface interface to accomplish what I want.  I see some
> > functions such as LockCursor() and UnlockCursor(), but don't know if
> > those are the functions I'm looking for or the proper way to use
> > them.
> >
> > I suspect that one of the Valve folks would know best, but anyone who
> > might know something go ahead and chime in :)
> >
> > _______________________________________________
> > 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
>
>

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to