Skip to content

Commit

Permalink
Update LanguageState.hx
Browse files Browse the repository at this point in the history
  • Loading branch information
Joalor64GH authored Jun 2, 2024
1 parent 3a45f15 commit c46404d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/meta/data/options/LanguageState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ class LanguageState extends MusicBeatState
label.snapToPosition();
coolGrp.add(label);

var assetPath = 'flags/' + langStrings[i].code;
var animString = Assets.exists(Paths.getSparrowAtlas(assetPath)) ? langStrings[i].code : 'flag_base';
var assetPath:String = Paths.getSparrowAtlas('flags/langStrings[i].code');
var animString:String = Assets.exists(assetPath) ? langStrings[i].code : 'flag_base';

var icon:AttachedSprite = new AttachedSprite();
icon.frames = Assets.exists(Paths.getSparrowAtlas(assetPath)) ?
Paths.getSparrowAtlas(assetPath) : Paths.getSparrowAtlas('flags/null'); // fallback attempt idk??
icon.frames = Assets.exists(assetPath) ?
assetPath : Paths.getSparrowAtlas('flags/null'); // fallback attempt idk??
icon.animation.addByPrefix('idle', animString, 24);
icon.animation.play('idle');
icon.xAdd = -icon.width - 10;
Expand Down

0 comments on commit c46404d

Please sign in to comment.