Get Window Pointer In Event-Function[resolved]

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

silenttree
Not too shy to talk
Not too shy to talk
Posts: 30
Joined: Wed Nov 01, 2006 05:59
Contact:

Get Window Pointer In Event-Function[resolved]

Postby silenttree » Fri Nov 10, 2006 10:05

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]
}
Last edited by silenttree on Fri Nov 10, 2006 10:28, edited 1 time in total.

silenttree
Not too shy to talk
Not too shy to talk
Posts: 30
Joined: Wed Nov 01, 2006 05:59
Contact:

Postby silenttree » Fri Nov 10, 2006 10:27

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!


Return to “Help”

Who is online

Users browsing this forum: Bing [Bot] and 19 guests