Hi,
I'm currently trying to create a splash page that will advance to the main screen when clicked. I currently have a static image with 2 children, a static text and a button (don't want the button). In the code I was able to use splashimage->subscribeEvent( CEGUI::Window::EventMouseClick, &HandlerFunction) to make the splash go away on a click, but I want to subscribe that in the layout xml instead of the code. I have a lua function that hides the splash and brings up the main page. I tried using <Event Name="Clicked" Function="Splash_Clicked" /> (Splash_Clicked is the Lua function) in the splash image's definition in the layout, but nothing happens when I click on the screen. If I use that same xml line in the definition of the button, clicking the button will call the function.
The static image can obviously do something on a clicked event, because it works in the code. Does this have to do with how the xml is parsed?
Thanks,
Nick
Setting StaticImage Clicked Handler in XML
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Setting StaticImage Clicked Handler in XML
Hi,
Unfortunately I do not have an answer for you at the moment; another very odd issue From a technical standpoint, all window types are treated exactly the same as far as events and xml parsing go. Is there anything in the CEGUI.log file at all that might indicate a problem when you try the subscription to the lua event handler?
CE.
Unfortunately I do not have an answer for you at the moment; another very odd issue From a technical standpoint, all window types are treated exactly the same as far as events and xml parsing go. Is there anything in the CEGUI.log file at all that might indicate a problem when you try the subscription to the lua event handler?
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Setting StaticImage Clicked Handler in XML
Looked through the log file after running it with the subscription in the splash image's definition. There's no error when loading the splash layout file. It logs a success.
Sorry for the late response, this is what happens when you only work twice a week.
Sorry for the late response, this is what happens when you only work twice a week.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Setting StaticImage Clicked Handler in XML
Are there any other windows in the splash layout at all? Perhaps the 'click' is going to the wrong window? If you're uncertain, post the layout and we'll be able to see for sure
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 1 guest