Worked out what was causing it. Because I was trying to make a it look like
it was highlighted, on a single click it moved the selected panel in front
of the object. Thus you weren't clicking on the panel itself but the
highlight panel.

Stupid mistake. :P

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Chandler
Sent: Wednesday, January 30, 2008 10:47 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Panels not playing nice.

Same result

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Adam Maras
(memzero)
Sent: Wednesday, January 30, 2008 10:38 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Panels not playing nice.

Try making them virtual functions.

//   Adam Maras (memzero)

Mark Chandler wrote:
> This is a multipart message in MIME format.
> --
> [ Picked text/plain from multipart/alternative ]
> Hey guys got this problem that shouldn't be atm.
>
> Ok I made a new vgui class based from the vgui::panel class:
>       class PD_BasePanel : public vgui::Panel
>
> now in that class I have overwritten the OnMousePressed and
> OnMouseDoublePressed functions:
>
>       void OnMousePressed(MouseCode code)
>       {
>               if (code == MOUSE_LEFT)
>               {
>                       PostActionSignal(new KeyValues("ItemClick","name",
> this->GetName()));
>               }
>       }
>       void OnMouseDoublePressed(MouseCode code)
>       {
>               Msg("XXX Code is: %d \n", code);
>               if (code == MOUSE_LEFT)
>               {
>                       PostActionSignal(new
> KeyValues("ItemDoubleClick","name", this->GetName()));
>               }
>       }
>
> However the OnMousePressed function works like a charm but
> OnMouseDoublePressed doesn't work at all. So I went and put a msg into the
> panel.cpp OnMouseDoublePressed function:
>
> void Panel::OnMouseDoublePressed(MouseCode code)
> {
>       Msg("Mouse Doubled Pressed Base class \n");
> }
>
> And this works but it is not been overwritten by my class. Any suggestions
> as Im lost to why its not been overwritten.
>
> Lodle
>
> --
>
> _______________________________________________
> 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

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

Reply via email to