Page 1 of 1

Gui pop a window from lua based on event

Posted: Wed Oct 16, 2013 2:34 pm
by shadmar
For instance if you encounter a ship attacking you, onAlertStateChange, I would it be possible to start a gui window to interact?
(or will it be ?)
I have not been following the last few months on gui progress.

Thanks.

Re: Gui pop a window from lua based on event

Posted: Wed Oct 16, 2013 4:54 pm
by TheBob
I submitted a request for that a while ago... well, two actually, because I forgott that I already did it a while longer ago. So far there hasn't been any implementation, but since GUI is in general overhaul anyways currently I'm not really surprised. I hope the possibility will be in there once it's done.

Re: Gui pop a window from lua based on event

Posted: Wed Oct 16, 2013 5:31 pm
by jpab
It will be possible when more of the UI has been converted to be driven by Lua. Unfortunately, that is taking very long time. But we are making progress.

Edit: To give you an idea how long... I think one of the feature requests Bob is referring to is #778, which he posted 2 years ago. And the first parts of the new UI code were included in Alpha 28, which was one year ago. And Rob had been investigating options (existing libraries) to use for replacing the UI for quite a long time before we decided that the existing libraries didn't do what we need and we would have to write our own.

Edit 2: For more information on the history of the UI changes, read https://medium.com/building-pioneer/220a312e2791

John B

Re: Gui pop a window from lua based on event

Posted: Wed Oct 16, 2013 8:48 pm
by shadmar
Ok, thanks I'll check back in 2017 then :)
Interesting read btw, you tested librocket aswell. Anyway it would make a powerful feature for event stuff/interaction some day.

Re: Gui pop a window from lua based on event

Posted: Thu Oct 17, 2013 8:00 am
by TheBob
It will be possible when more of the UI has been converted to be driven by Lua. Unfortunately, that is taking very long time. But we are making progress.
Yeah, GUI's a terrible time eater, I know that all too well, even for just setting it up, let alone write the whole architecture.

It's good to hear that it'll be possible!