Skip to content

Commit

Permalink
Idk bug fixing ig???
Browse files Browse the repository at this point in the history
  • Loading branch information
poec987 committed Jul 1, 2024
1 parent d198068 commit 1da2fa1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
3 changes: 2 additions & 1 deletion assets/preload/data/characterList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ bf-pixel-good
senpai
senpai-angry
spirit
sonicexe
sonicexe
dad-test
11 changes: 11 additions & 0 deletions assets/preload/data/characters/dad-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
sprite::DADDY_DEAREST
icon::0::1
anim::idle::Dad idle dance::24::false::false::false
anim::singUP::Dad Sing Note UP::24::false::false::false
anim::singDOWN::Dad Sing Note DOWN::24::false::false::false
anim::singLEFT::Dad Sing Note LEFT::24::false::false::false
anim::singRIGHT::Dad Sing Note RIGHT::24::false::false::false
offset::singUP::-6::50
offset::singLEFT::-10::10
offset::singRIGHT::0::27
offset::singDOWN::0::-30
10 changes: 3 additions & 7 deletions source/CharacterEditorState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ class CharacterEditorState extends MusicBeatState

}

var charNameTB:FlxUIInputText;
var spriteTB:FlxUIInputText;
var flipXCBC:FlxUICheckBox;
var flipYCBC:FlxUICheckBox;
Expand All @@ -103,8 +102,6 @@ class CharacterEditorState extends MusicBeatState
var tab_group_character = new FlxUI(null, UI_box);
tab_group_character.name = 'Character';

charNameTB = new FlxUIInputText(100,50,180);

var loadCharButton:FlxUIButton = new FlxUIButton(10,10,"Load Character", function() {
loadCharacterTxt();
});
Expand Down Expand Up @@ -168,7 +165,6 @@ class CharacterEditorState extends MusicBeatState
tab_group_character.add(loadCharButton);
tab_group_character.add(saveCharButton);
tab_group_character.add(newCharButton);
tab_group_character.add(charNameTB);

tab_group_character.add(spriteTB);
tab_group_character.add(updateSpriteButton);
Expand Down Expand Up @@ -215,6 +211,7 @@ class CharacterEditorState extends MusicBeatState
}
//trace(charArray);
updateAnimsTab(true);
char.playAnim(animsDropdown.selectedLabel.trim(),true);
});

animsDropdown = new FlxUIDropDownMenu(100, 50, FlxUIDropDownMenu.makeStrIdLabelArray(animsList, true), function(anim:String) {
Expand Down Expand Up @@ -305,6 +302,7 @@ class CharacterEditorState extends MusicBeatState

//trace(charArray);
updateAnimsTab(true);
char.playAnim(offsetAnimsDropdown.selectedLabel.trim(), true);
});

//var animNameTB:FlxUIInputText = new FlxUIInputText(10,10,180);
Expand Down Expand Up @@ -348,7 +346,7 @@ class CharacterEditorState extends MusicBeatState
}

charArray = ["sprite::BOYFRIEND","icon::0::1","anim::idle::BF idle dance::24","anim::singUP::BF idle dance::24","anim::singDOWN::BF idle dance::24","anim::singLEFT::BF idle dance::24","anim::singRIGHT::BF idle dance::24"];
charName = charNameTB.text.trim();
charName = "bf";
updateAnimsTab(true);
}

Expand Down Expand Up @@ -413,8 +411,6 @@ class CharacterEditorState extends MusicBeatState
spriteTB.text == line[1];
}

charNameTB.text = charName;

if (line[0] == "anim") {
animsList.push(line[1]);
}
Expand Down

0 comments on commit 1da2fa1

Please sign in to comment.