Crash:
-1. Start program.
-2. Click on the right listbox.
Valid listbox instance:
-1. Start program.
-2. Click on the left listbox.
-3. You can click on right listbox without crash now, function OnClick will return the instance and everything belonging to the left listbox...
[Solved] Events, buttons etc...
Moderators: CEGUI MVP, CEGUI Team
Re: Events, buttons etc...
I've fixed the program just changing the function OnClick like this:
I get correct values finally using this code.
Code: Select all
bool OnClick(const CEGUI::EventArgs& args)
{
const CEGUI::MouseEventArgs& we = static_cast<const CEGUI::MouseEventArgs&>(args);
CEGUI::String Sender = we.window->getName();
CEGUI::ItemListbox* CListbox = static_cast<CEGUI::ItemListbox*>(we.window);
cout << CListbox->getFirstSelectedItem()->getText() << endl;
return true;
}
I get correct values finally using this code.
Who is online
Users browsing this forum: No registered users and 12 guests