Hi,
I have succeeded in getting this CEGUI thing drawing from a very basic layout file.
How do I add images to the objects like buttons especially?
More crucially, how do I get my DX9 app to register input in textboxes and buttons?
Many Thanks
Simon
Getting input from objects, and adding images to others
Moderators: CEGUI MVP, CEGUI Team
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
For the input stuff this wiki page might be interesting:
http://www.cegui.org.uk/wiki/index.php/ ... EGUI_utf32
For the buttons, you can set it via the property system:
http://cegui.org.uk/api_reference/names ... rties.html
HTH
http://www.cegui.org.uk/wiki/index.php/ ... EGUI_utf32
For the buttons, you can set it via the property system:
http://cegui.org.uk/api_reference/names ... rties.html
HTH
Thanks but I just have buttons which dont do anything and an editbox I can't fill in!
Shame this article is incomplete:
"The Beginner Guide to Injecting Inputs"
Sounds like what I am after
I tried this:
// load window contents from external xml file!
m_root = m_windowMgr->loadWindowLayout("../datafiles/layouts/loginWindow.layout");
m_system->setGUISheet(m_root);
PushButton* LoginButton = (PushButton*)m_windowMgr->getWindow("LoginButton");
LoginButton->subscribeEvent(PushButton::EventClicked, Event::subscribe(&cCEGUI::HandleLoginButton), this) );
But I get all sorts of compile errors:
cCEGUI.cpp(71) : error C2352: 'CEGUI::Event::subscribe' : illegal call of non-static member function
e:\C\CEGUI\CEGUI SDK for Visual C++ .NET 2003\include\CEGUIEvent.h(290) : see declaration of 'CEGUI::Event::subscribe'
ANy ideas?
Thanks!
Si
Shame this article is incomplete:
"The Beginner Guide to Injecting Inputs"
Sounds like what I am after

I tried this:
// load window contents from external xml file!
m_root = m_windowMgr->loadWindowLayout("../datafiles/layouts/loginWindow.layout");
m_system->setGUISheet(m_root);
PushButton* LoginButton = (PushButton*)m_windowMgr->getWindow("LoginButton");
LoginButton->subscribeEvent(PushButton::EventClicked, Event::subscribe(&cCEGUI::HandleLoginButton), this) );
But I get all sorts of compile errors:
cCEGUI.cpp(71) : error C2352: 'CEGUI::Event::subscribe' : illegal call of non-static member function
e:\C\CEGUI\CEGUI SDK for Visual C++ .NET 2003\include\CEGUIEvent.h(290) : see declaration of 'CEGUI::Event::subscribe'
ANy ideas?
Thanks!
Si
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
hi,
your subscribe call is a little messed up
your code is:
and it should be something like:
i.e a typo on the class name and the 'this' argument must be within the Event::Subscriber constructor call.
HTH
CE.
your subscribe call is a little messed up

your code is:
Code: Select all
LoginButton->subscribeEvent(PushButton::EventClicked, Event::subscribe(&cCEGUI::HandleLoginButton), this) );
and it should be something like:
Code: Select all
LoginButton->subscribeEvent(PushButton::EventClicked, Event::Subscriber(&cCEGUI::HandleLoginButton, this) );
i.e a typo on the class name and the 'this' argument must be within the Event::Subscriber constructor call.
HTH
CE.
Who is online
Users browsing this forum: No registered users and 17 guests