mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-23 17:43:08 -05:00
Check if window info == null in OSX event handler, make classicube.net login auto go to the servers screen.
This commit is contained in:
parent
a8be2e4493
commit
fda3d68753
3 changed files with 6 additions and 4 deletions
|
@ -36,12 +36,14 @@ namespace Launcher2 {
|
||||||
if( !session.Working ) {
|
if( !session.Working ) {
|
||||||
if( session.Exception != null ) {
|
if( session.Exception != null ) {
|
||||||
DisplayWebException( session.Exception, session.Status );
|
DisplayWebException( session.Exception, session.Status );
|
||||||
|
} else if( HasServers ) {
|
||||||
|
game.SetScreen( new ClassiCubeServersScreen( game ) );
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
signingIn = false;
|
signingIn = false;
|
||||||
game.MakeBackground();
|
game.MakeBackground();
|
||||||
Resize();
|
Resize();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadSavedInfo( IDrawer2D drawer ) {
|
void LoadSavedInfo( IDrawer2D drawer ) {
|
||||||
|
|
|
@ -79,7 +79,7 @@ namespace Launcher2 {
|
||||||
MakeButtonAt( "Connect", 100, 30, titleFont, Anchor.LeftOrTop,
|
MakeButtonAt( "Connect", 100, 30, titleFont, Anchor.LeftOrTop,
|
||||||
180, 5, ConnectToServer );
|
180, 5, ConnectToServer );
|
||||||
MakeButtonAt( "Back", 70, 30, titleFont, Anchor.LeftOrTop,
|
MakeButtonAt( "Back", 70, 30, titleFont, Anchor.LeftOrTop,
|
||||||
195, 50, (x, y) => game.SetScreen( new MainScreen( game ) ) );
|
195, 50, (x, y) => game.SetScreen( new ClassiCubeScreen( game ) ) );
|
||||||
MakeTableWidget();
|
MakeTableWidget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -203,7 +203,7 @@ namespace OpenTK.Platform.MacOS {
|
||||||
|
|
||||||
protected OSStatus EventHandler( IntPtr inCaller, IntPtr inEvent, IntPtr userData ) {
|
protected OSStatus EventHandler( IntPtr inCaller, IntPtr inEvent, IntPtr userData ) {
|
||||||
// bail out if the window passed in is not actually our window.
|
// bail out if the window passed in is not actually our window.
|
||||||
if( userData != window.WindowRef)
|
if( window == null || userData != window.WindowRef )
|
||||||
return OSStatus.EventNotHandled;
|
return OSStatus.EventNotHandled;
|
||||||
|
|
||||||
EventInfo evt = new EventInfo(inEvent);
|
EventInfo evt = new EventInfo(inEvent);
|
||||||
|
|
Loading…
Add table
Reference in a new issue