Returning a value from a window

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
rogerdv
Posts: 93
Joined: Wed Aug 27, 2003 4:20 pm

Returning a value from a window

Post by rogerdv »

I need to create a dialog window for my rpg, but I dont know how to return the choosen option back to program. Can somebody suggest me an idea?
ru guo ni yao ai, ni jiang bu hui shi qu
Guest

Post by Guest »

I am not sure if I understand you right , but for dialogs I use onEvents usally. So every GUIEvent on this dialog (such as writing something into a textfield or pressing buttons) causes somehow a reaction which is handled by the EventReciever.
rogerdv
Posts: 93
Joined: Wed Aug 27, 2003 4:20 pm

Post by rogerdv »

Of course, that was my first idea, but I was wondering if there is some better solution than setting some global var in the event handler and continuously checking if the window was closed to call the script again with the chosen value.
.
ru guo ni yao ai, ni jiang bu hui shi qu
Guest

Post by Guest »

*confused* but with the Eventreciever you are not continously checking if the window is closed. The EnventReciever does something at that time, you press the button. meanwhile the Eventreciever does nothing.
rogerdv
Posts: 93
Joined: Wed Aug 27, 2003 4:20 pm

Post by rogerdv »

I mean, the application, not the event receiver. I need some way to display the window from some lua or python script, choose an answer and send that value back to the script.
ru guo ni yao ai, ni jiang bu hui shi qu
Post Reply