summaryrefslogtreecommitdiff
path: root/lib/simfile.dart
diff options
context:
space:
mode:
Diffstat (limited to 'lib/simfile.dart')
-rw-r--r--lib/simfile.dart9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/simfile.dart b/lib/simfile.dart
index 764e3aa..7bdf5c0 100644
--- a/lib/simfile.dart
+++ b/lib/simfile.dart
@@ -124,7 +124,8 @@ class Simfile {
simfilePath = Directory(directoryPath)
.listSync()
.firstWhere((entity) => entity.path.endsWith('.sm'),
- orElse: () => File('')).path;
+ orElse: () => File(''))
+ .path;
audioPath = Directory(directoryPath)
.listSync()
@@ -132,6 +133,12 @@ class Simfile {
orElse: () => File(''))
.path;
+ bannerPath = Directory(directoryPath)
+ .listSync()
+ .firstWhere((file) => file.path.toLowerCase().endsWith('banner.png'),
+ orElse: () => File(''))
+ .path;
+
lines = File(simfilePath!).readAsStringSync();
RegExp commentsRegExp = RegExp(r'//.*$');