2020-07-02 01:45 AM
My application has many screens, after idle for some time, I need to show a advertisement screen.
I want to implement it something like Modal dialog box to cover the whole current screen. So I need to get the current active screen, actually a container is enough as modal window's parent.
Are there an api to get current screen? I dont want to trace every screen by myself as there are many and more and more later.
2020-07-02 03:07 AM
Screen*sp = Application::getInstance()->getCurrentScreen();
sp->getRootContainer().add(myModalWindow);
myModalWindow.show();
It can show the myModalWindow on top of current window, But touch interactive not work. Maybe rootContainer is special, but how to solve it?
2020-07-02 08:59 PM
button inside modal windows works ok. but setTouchable(true) can not trigger event handleClickEvent()