Its in panel.cpp which is virtual (be stupid otherwise because all its code is { } ).
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maarten De Meyer Sent: Thursday, January 31, 2008 1:57 AM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Panels not playing nice. Did you make the member functions in the *base* class virtual? ( cause that is what he meant ). > 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 _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders