@@ -11,12 +11,12 @@ import 'package:kyber_mod_manager/utils/dll_injector.dart';
1111import 'package:kyber_mod_manager/utils/helpers/path_helper.dart' ;
1212import 'package:kyber_mod_manager/utils/helpers/system_tray_helper.dart' ;
1313import 'package:kyber_mod_manager/utils/services/api_service.dart' ;
14+ import 'package:kyber_mod_manager/utils/services/frosty_profile_service.dart' ;
1415import 'package:kyber_mod_manager/utils/services/frosty_service.dart' ;
1516import 'package:kyber_mod_manager/utils/services/mod_installer_service.dart' ;
1617import 'package:kyber_mod_manager/utils/services/mod_service.dart' ;
1718import 'package:kyber_mod_manager/utils/services/notification_service.dart' ;
1819import 'package:kyber_mod_manager/utils/types/freezed/github_asset.dart' ;
19- import 'package:kyber_mod_manager/utils/types/frosty_config.dart' ;
2020import 'package:path/path.dart' show join;
2121import 'package:path_provider/path_provider.dart' ;
2222
@@ -137,18 +137,17 @@ class _WalkThroughState extends State<WalkThrough> {
137137 if (index == 5 ) {
138138 return Container (
139139 alignment: Alignment .center,
140- child: Row (mainAxisAlignment: MainAxisAlignment .center, crossAxisAlignment: CrossAxisAlignment .center, children: [
141- const SizedBox (
140+ child: Row (mainAxisAlignment: MainAxisAlignment .center, crossAxisAlignment: CrossAxisAlignment .center, children: const [
141+ SizedBox (
142142 height: 20 ,
143143 width: 20 ,
144144 child: ProgressRing (),
145145 ),
146- const SizedBox (width: 10 ),
146+ SizedBox (width: 20 ),
147147 Text (
148- firstInstall
149- ? "Please close Frosty after it loaded into the menu."
150- : 'click on "Scan for games" once Frosty starts and, after it loads into the menu, close it.' ,
151- style: const TextStyle (fontSize: 18 ),
148+ "Please close Frosty after it loaded into the menu" ,
149+ textAlign: TextAlign .center,
150+ style: TextStyle (fontSize: 18 ),
152151 ),
153152 ]),
154153 );
@@ -257,11 +256,16 @@ class _WalkThroughState extends State<WalkThrough> {
257256
258257 box.put ('frostyPath' , _directory! .path);
259258 String ? configPath = await FrostyService .getFrostyConfigPath ();
260- box.put ('frostyConfigPath' , configPath);
261- FrostyConfig config = await FrostyService .getFrostyConfig ();
262- setState (() {
263- firstInstall = config.games.keys.contains ('starwarsbattlefrontii' );
264- });
259+ var config;
260+ if (configPath != null && File (configPath).existsSync ()) {
261+ box.put ('frostyConfigPath' , configPath);
262+ config = await FrostyService .getFrostyConfig ();
263+ } else {
264+ await FrostyProfileService .createFrostyConfig ();
265+ }
266+ // setState(() {
267+ // firstInstall = config?.games.keys.contains('starwarsbattlefrontii') ?? true;
268+ // });
265269 await FrostyService .startFrosty (launch: false , frostyPath: _directory! .path);
266270
267271 setState (() {
@@ -299,13 +303,13 @@ class _WalkThroughState extends State<WalkThrough> {
299303 actions: [
300304 Button (
301305 child: index == 3 ? const Text ('Cancel' ) : Text (translate ('server_browser.prev_page' )),
302- onPressed: index == 0 || disabled
306+ onPressed: index < 2 || disabled
303307 ? null
304308 : () {
305309 if (index == 3 ) {
306310 PathHelper .cancelDownload ();
307311 }
308- setState (() => index == 3 ? index = 1 : index);
312+ setState (() => index == 3 ? index = 1 : index-- );
309313 },
310314 ),
311315 if (index == 1 )
0 commit comments