mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 10:35:11 -04:00
Fix new launcher crashing when clicking 'yes' in ResourcesScreen, fixes #102 again. (Thanks Cheesse)
This commit is contained in:
parent
bf18a732c5
commit
ee9ed99c72
@ -89,6 +89,13 @@ namespace Launcher2 {
|
|||||||
: (widgets[0] as LauncherLabelWidget).Text;
|
: (widgets[0] as LauncherLabelWidget).Text;
|
||||||
MakeTextAt( statusFont, text, 0, 5 );
|
MakeTextAt( statusFont, text, 0, 5 );
|
||||||
|
|
||||||
|
// Clear the entire previous widgets state.
|
||||||
|
for( int i = 1; i < widgets.Length; i++ ) {
|
||||||
|
widgets[i] = null;
|
||||||
|
selectedWidget = null;
|
||||||
|
lastClicked = null;
|
||||||
|
}
|
||||||
|
|
||||||
if( fetcher == null ) {
|
if( fetcher == null ) {
|
||||||
MakeTextAt( infoFont, mainText, 0, -30 );
|
MakeTextAt( infoFont, mainText, 0, -30 );
|
||||||
MakeButtonAt( "Yes", 60, 30, textFont, Anchor.Centre,
|
MakeButtonAt( "Yes", 60, 30, textFont, Anchor.Centre,
|
||||||
@ -99,8 +106,6 @@ namespace Launcher2 {
|
|||||||
} else {
|
} else {
|
||||||
MakeButtonAt( "Dismiss", 120, 30, textFont, Anchor.Centre,
|
MakeButtonAt( "Dismiss", 120, 30, textFont, Anchor.Centre,
|
||||||
0, 40, (x, y) => game.SetScreen( new MainScreen( game ) ) );
|
0, 40, (x, y) => game.SetScreen( new MainScreen( game ) ) );
|
||||||
widgets[2] = null;
|
|
||||||
widgets[3] = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user