Image Buttons
Posted: Wed Oct 10, 2007 20:31
I've read "Create ImageButtons" article http://www.cegui.org.uk/wiki/index.php/ ... ageButtons
but I cannot access source files because of invalid link.
So my question is: How to subscribe event to ImageButton?
this is part of my GUI.layout
<Window Type="DefaultGUISheet" Name="root">
<Window Type="DefaultGUISheet" Name="GameGUI">
<Property Name="UnifiedSize" Value="{{1,0},{1,0}}" />
<Window Type="TaharezLook/ImageButton" Name="GameGui/btnNewGame">
and in my programm I call
CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton();
wmgr.getWindow((CEGUI::utf8*)"GameGUI/btnNewGame")
->subscribeEvent(
CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&IntroState::GUIQuitGame, this));
and then I get an exception(without subscribing I see my button and it is also reacts on dragover and such events). I guess it is caused by
CEGUI::PushButton::EventClicked
maybe I'm wrong but my button is ImageButton rather than Button so I cannot use PushButton class of CEGUI
Once again, how to subscribe event to ImageButton?
but I cannot access source files because of invalid link.
So my question is: How to subscribe event to ImageButton?
this is part of my GUI.layout
<Window Type="DefaultGUISheet" Name="root">
<Window Type="DefaultGUISheet" Name="GameGUI">
<Property Name="UnifiedSize" Value="{{1,0},{1,0}}" />
<Window Type="TaharezLook/ImageButton" Name="GameGui/btnNewGame">
and in my programm I call
CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton();
wmgr.getWindow((CEGUI::utf8*)"GameGUI/btnNewGame")
->subscribeEvent(
CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&IntroState::GUIQuitGame, this));
and then I get an exception(without subscribing I see my button and it is also reacts on dragover and such events). I guess it is caused by
CEGUI::PushButton::EventClicked
maybe I'm wrong but my button is ImageButton rather than Button so I cannot use PushButton class of CEGUI
Once again, how to subscribe event to ImageButton?