OK im having a problem with vgui messages.

Currently I have a frame that has images and one panel on it. And on that
panel are more images.

Now I have coded in the ImagePanel class to send a message when its clicked
on:

void ImagePanel::OnMousePressed(MouseCode code)
{
        if ( GetParent() )
        {
                KeyValues *msg = new KeyValues("MouseEvent");
                msg->SetString("event", "MousePressed");
                msg->SetString("name", GetName());
                PostMessage(GetParent(), msg);
        }
        BaseClass::OnMousePressed(code);
}

Ive hooked the messages using: MESSAGE_FUNC_PARAMS( OnMouseEvent,
"MouseEvent", data );
Now all images on the frame return the message, but I cant get images on the
panel to return the messages to the panel.

Any one have any ideas?

Mark



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

Reply via email to