Implement sussing active mods

This commit is contained in:
2025-03-15 22:20:35 +01:00
parent 26ee34c1d6
commit f7763dd538
4 changed files with 92 additions and 21 deletions

View File

@@ -1,7 +1,9 @@
import 'package:flutter/material.dart';
import 'package:rimworld_modman/modloader.dart';
void main() {
runApp(const RimWorldModManager());
ConfigFile(path: configPath).load();
// runApp(const RimWorldModManager());
}
class RimWorldModManager extends StatelessWidget {
@@ -38,7 +40,7 @@ class ModManagerHomePage extends StatefulWidget {
class _ModManagerHomePageState extends State<ModManagerHomePage> {
int _selectedIndex = 0;
final List<Widget> _pages = [
const ModListPage(),
const LoadOrderPage(),
@@ -48,9 +50,7 @@ class _ModManagerHomePageState extends State<ModManagerHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('RimWorld Mod Manager'),
),
appBar: AppBar(title: const Text('RimWorld Mod Manager')),
body: _pages[_selectedIndex],
bottomNavigationBar: BottomNavigationBar(
currentIndex: _selectedIndex,
@@ -60,10 +60,7 @@ class _ModManagerHomePageState extends State<ModManagerHomePage> {
});
},
items: const [
BottomNavigationBarItem(
icon: Icon(Icons.list),
label: 'Mods',
),
BottomNavigationBarItem(icon: Icon(Icons.list), label: 'Mods'),
BottomNavigationBarItem(
icon: Icon(Icons.reorder),
label: 'Load Order',
@@ -90,10 +87,7 @@ class ModListPage extends StatelessWidget {
children: [
const Icon(Icons.extension, size: 64),
const SizedBox(height: 16),
Text(
'Mod List',
style: Theme.of(context).textTheme.headlineMedium,
),
Text('Mod List', style: Theme.of(context).textTheme.headlineMedium),
const SizedBox(height: 16),
Text(
'Here you\'ll see your installed mods.',
@@ -124,10 +118,7 @@ class LoadOrderPage extends StatelessWidget {
children: [
const Icon(Icons.reorder, size: 64),
const SizedBox(height: 16),
Text(
'Load Order',
style: Theme.of(context).textTheme.headlineMedium,
),
Text('Load Order', style: Theme.of(context).textTheme.headlineMedium),
const SizedBox(height: 16),
Text(
'Manage your mod loading order with dependency resolution.',