Skip to content

Commit

Permalink
re-add character editor - wip???
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesisfeline committed Jul 24, 2024
1 parent c2d3e62 commit bf72491
Show file tree
Hide file tree
Showing 9 changed files with 524 additions and 3 deletions.
1 change: 1 addition & 0 deletions Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@

<haxelib name="flixel" />
<haxelib name="flixel-addons" />
<haxelib name="flixel-ui" /> <!-- Temporary For Character Editor-->
<haxelib name="haxeui-flixel" />
<haxelib name="haxeui-core" />
<haxelib name="flixel-text-input" /> <!--Stupid Ass Text Layering In The Editors-->
Expand Down
1 change: 1 addition & 0 deletions easysetup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ haxelib install lime
haxelib install openfl
haxelib install flixel
haxelib install flixel-tools
haxelib install flixel-ui
haxelib install flixel-addons
haxelib install hxcpp-debug-server
haxelib install hxvlc
Expand Down
1 change: 1 addition & 0 deletions easysetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ haxelib install lime
haxelib install openfl
haxelib install flixel
haxelib install flixel-tools
haxelib install flixel-ui
haxelib install flixel-addons
haxelib install hxcpp-debug-server
haxelib install hxvlc
Expand Down
5 changes: 5 additions & 0 deletions hmm.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
"type": "haxelib",
"version": null
},
{
"name": "flixel-ui",
"type": "haxelib",
"version": null
},
{
"name": "flixel-tools",
"type": "haxelib",
Expand Down
21 changes: 21 additions & 0 deletions source/kec/backend/Options.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,27 @@ class LaneUnderlayOption extends Option
}
}

class DebugMode extends Option
{
public function new(desc:String)
{
description = desc;
super();
acceptType = true;
}

public override function press():Bool
{
MusicBeatState.switchState(new AnimationDebug());
return false;
}

private override function updateDisplay():String
{
return "Animation Debug";
}
}

class LockWeeksOption extends Option
{
var confirm:Bool = false;
Expand Down
3 changes: 3 additions & 0 deletions source/kec/states/MusicBeatState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ class MusicBeatState extends FlxTransitionableState

override function add(Object:FlxBasic):FlxBasic
{
if (Std.isOfType(Object, FlxUI))
return null;

if (Std.isOfType(Object, FlxSprite))
var spr:FlxSprite = cast(Object, FlxSprite);

Expand Down
29 changes: 29 additions & 0 deletions source/kec/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import kec.backend.script.ScriptUtil;
#end
// Orginization Imports
import kec.states.editors.StageDebugState;
import kec.states.editors.AnimationDebug;
import kec.states.editors.ChartingState;
#if VIDEOS
import hxvlc.flixel.FlxVideo as VideoHandler;
Expand Down Expand Up @@ -2566,6 +2567,34 @@ class PlayState extends MusicBeatState
LoadingState.loadAndSwitchState(new ChartingState());
}

if (FlxG.keys.justPressed.SIX)
{
LoadingState.loadAndSwitchState(new AnimationDebug(dad.curCharacter));
PlayState.stageTesting = false;
inDaPlay = false;
#if FEATURE_LUAMODCHART
if (luaModchart != null)
{
luaModchart.die();
luaModchart = null;
}
#end
}

if (FlxG.keys.justPressed.NUMPADSEVEN)
{
LoadingState.loadAndSwitchState(new AnimationDebug(boyfriend.curCharacter));
PlayState.stageTesting = false;
inDaPlay = false;
#if FEATURE_LUAMODCHART
if (luaModchart != null)
{
luaModchart.die();
luaModchart = null;
}
#end
}

if (FlxG.keys.justPressed.EIGHT && FlxG.save.data.background)
{
paused = true;
Expand Down
11 changes: 8 additions & 3 deletions source/kec/states/SelectEditorsState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import kec.backend.chart.Song;

class SelectEditorsState extends MusicBeatState
{
var editors:Array<String> = ['Stage Editor', 'Chart Editor'];
var icons = ['tankman', 'sm'];
var editors:Array<String> = ['Character Editor', 'Stage Editor', 'Chart Editor'];
var icons = ['face', 'tankman', 'sm'];

private var grpTexts:FlxTypedGroup<Alphabet>;

Expand Down Expand Up @@ -140,6 +140,9 @@ class SelectEditorsState extends MusicBeatState
{
switch (editors[curSelected])
{
case 'Character Editor':
kec.states.editors.AnimationDebug.fromEditor = true;
LoadingState.loadAndSwitchState(new kec.states.editors.AnimationDebug());
case 'Stage Editor':
PlayState.SONG = Song.loadFromJson('test', '');
kec.states.editors.StageDebugState.fromEditor = true;
Expand Down Expand Up @@ -172,8 +175,10 @@ class SelectEditorsState extends MusicBeatState
switch (curSelected)
{
case 0:
info.text = "Stage Editor, Move The Positions Of Stage Assets.";
info.text = "Character Editor, Edit Character Offsets.";
case 1:
info.text = "Stage Editor, Move The Positions Of Stage Assets.";
case 2:
info.text = "Chart Editor, Place Notes And Create Charts.";
}
info.updateHitbox();
Expand Down
Loading

0 comments on commit bf72491

Please sign in to comment.