// Map Selection Action GetLoadMapAction(ScreenGameMain mainMenu) { var engine = new MapEngine(Content); var maps = engine.AvailableEntities(Content).OrderBy(e => e.DisplayName).ToImmutableList(); Action loadMap = async() => { _mousePressed = true; Cursor.CurrentState = CursorState.Normal; var selectionScreen = await UpdateContext.Wait(Task.Factory.StartNew(() => new ScreenEntitySelection { Items = maps })); await mainMenu.Navigation.PushAsync(selectionScreen); var map = await selectionScreen.SelectItemAsync(); _guiVisible = false; GameParameters.SetNextMap(map.DisplayName); Exit(Result.LoadNext); }; return(loadMap); }