xamarin / urho

Code to integrate with the Urho3D engine
Other
462 stars 122 forks source link

Multiple UrhoSurface in one WinForms-application #344

Open alexsigmund opened 6 years ago

alexsigmund commented 6 years ago

I have a WinForms application in which i have a UrhoSurface and a dialog that has also an UrhoSurface. The Problem is that the UrhoSurface of the Dialog, when i open the dialog, is closing my Application that is running on the UrhoSurface on my MainForm. I need that they can coexist in parallel.

It would be also a possible option to pause the Application on the UrhoSurface that is on the MainForm, and then resume it when the dialog gets closed.

EgorBo commented 6 years ago

Yeah unfortunately urhosharp doesn't support such scenario 🙁 You have to re-create surface each time you close that dialog

utekai commented 5 years ago

pause the Application on the UrhoSurface that is on the MainForm

I"m able to pause my application, drop out of it into the main OS and run any application desired, then re-enter into my application, and handle any needed reinitialization in OnResume handler.

You would have to reopen the paused app upon closing the dialog. Alternatively, there are simple windows dialogues available that put the urhosurface main app in the background but still visible and active, just clearly behind the dialog and upon closing the dialog all is as it was before the dialog, unless you changed something. This dialog though is not very useful, just a simple info message more or less. with no customization of buttons or styling.