Preventing a window from closing (1 Viewer)

petemod

New Member
September 27, 2008
2
0
Home Country
Hi,

I am trying to prevent my plugin from closing or in other words the user navigating away from the window.
From what I understand, when a user switches to a new screen the OnPageDestroy method gets called. Therefore I thought the following code would work (id 7856 is my plugin/window)
Code:
protected override void OnPageDestroy(int newWindowId)
    {
    	if(locked == true && newWindowId != 7856)
    		GUIWindowManager.ActivateWindow(7856);
    }
Now given locked is true, and the user presses 'h' (to go to home) the plugin should instead activate window 7856, however this is not happening?

Thanks in advance

Peter
 

Users who are viewing this thread

Top Bottom