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?
Image Buttons
Moderators: CEGUI MVP, CEGUI Team
Reply
I’ve solve it. Was reading TaharezLookSkin.scheme for ImageButton and figured that it IS PushButton but with different graphical representation. So I’ve checked my Layout angain and noticed that my button was declared as GameGui\btnNewGame and in the game I was trying to reach GameGUI\btnNewGame.
Sorry for nonsence post.
Sorry for nonsence post.
Return to “Offtopic Discussion”
Who is online
Users browsing this forum: No registered users and 3 guests