Page 1 of 1

Get Window Pointer In Event-Function[resolved]

Posted: Fri Nov 10, 2006 10:05
by silenttree

Code: Select all

MyWnd->subscribeEvent (CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber (&MyOwnClass::ButtonClicked, this));

...
MyOwnClass::ButtonClicked(const  CEGUI::EventArgs& e)
{
  [b] How Can I Get The Window Ptr Here Who Subcriber This Event-Function?[/b]
}

Posted: Fri Nov 10, 2006 10:27
by silenttree
i found it in forum!

Code: Select all

CEGUI::PushButton *ThisButton = static_cast<CEGUI::PushButton*>(static_cast<const CEGUI::WindowEventArgs&>(e).window);

its work perfect!