Fixed chart editor animate atlases
This commit is contained in:
@@ -16,6 +16,11 @@
|
||||
- [x] Metadata Editing
|
||||
- [ ] Custom Notes
|
||||
- [ ] Step based zooming
|
||||
- [ ] Character Editor
|
||||
- [ ] Change ghost anim
|
||||
- [ ] Make gf characters be positioned correctly
|
||||
- [ ] Make it so dragging the character moves the offset
|
||||
- [ ] Disable volume controls when selecting stuff
|
||||
- [ ] Use latest hxCodec
|
||||
- [ ] Re-export gf-christmas, gf-car and gf-tankmen with padding
|
||||
- [ ] Multiple state scripts & Multiple global scripts
|
||||
@@ -26,7 +31,6 @@
|
||||
- [ ] Add note offset
|
||||
- [ ] Dialogue
|
||||
- [ ] Finish Base Game port
|
||||
- [ ] Character Editor
|
||||
- [ ] Add credits
|
||||
- [ ] Verbose mode (`--verbose`)
|
||||
- [ ] Tooltips
|
||||
|
||||
@@ -59,9 +59,8 @@ class CharacterEditor extends UIState
|
||||
editorCamera = FlxG.camera;
|
||||
uiCamera = new FlxCamera();
|
||||
uiCamera.bgColor = 0;
|
||||
FlxG.cameras.add(uiCamera);
|
||||
FlxG.cameras.add(uiCamera, false);
|
||||
FlxG.camera.follow(camFollow);
|
||||
FlxCamera.defaultCameras = [editorCamera];
|
||||
|
||||
// Add Stage and Centered Cross
|
||||
add(stage);
|
||||
@@ -136,9 +135,10 @@ class CharacterEditor extends UIState
|
||||
|
||||
function resortAnims(animations:Array<AnimData>)
|
||||
{
|
||||
// TODO: add support for danceLeft danceRight
|
||||
if (getAnimIndex("idle") != 0)
|
||||
{
|
||||
var oldanims = animations;
|
||||
var oldanims = animations.copy();
|
||||
animations.clear();
|
||||
animations.push(searchAnim("idle", oldanims));
|
||||
for (anim in oldanims)
|
||||
@@ -348,8 +348,11 @@ class CharacterEditor extends UIState
|
||||
}
|
||||
ofs_cross.clear();
|
||||
|
||||
var horizontal_cross = new FlxSprite(0, 0).makeGraphic(2000, 5);
|
||||
var vertical_cross = new FlxSprite(0, 0).makeGraphic(5, 2000);
|
||||
|
||||
var x = -800;
|
||||
|
||||
var horizontal_cross = new FlxSprite(x, -70).makeSolid(2000, 5);
|
||||
var vertical_cross = new FlxSprite(x, 0).makeSolid(5, 2000);
|
||||
horizontal_cross.y += (vertical_cross.height / 2);
|
||||
vertical_cross.x += (horizontal_cross.width / 2);
|
||||
ofs_cross.add(horizontal_cross);
|
||||
@@ -503,7 +506,7 @@ class CharacterEditor extends UIState
|
||||
}*/
|
||||
ghostChar.color = 0xFF666688;
|
||||
ghostChar.antialiasing = char.antialiasing;
|
||||
ghostChar.playAnim(char.animation.curAnim.name, true);
|
||||
ghostChar.playAnim(char.characterData.animations[curAnim].name, true);
|
||||
}
|
||||
|
||||
function controlCharacter()
|
||||
@@ -514,15 +517,18 @@ class CharacterEditor extends UIState
|
||||
FlxG.keys.justPressed.UP,
|
||||
FlxG.keys.justPressed.DOWN
|
||||
];
|
||||
var holdShift = FlxG.keys.pressed.SHIFT;
|
||||
var holdAlt = FlxG.keys.pressed.ALT;
|
||||
|
||||
for (i in 0...controlArray.length)
|
||||
{
|
||||
if (controlArray[i])
|
||||
{
|
||||
var holdShift = FlxG.keys.pressed.SHIFT;
|
||||
var multiplier = 1;
|
||||
var multiplier:Float = 1;
|
||||
if (holdShift)
|
||||
multiplier = 10;
|
||||
if (holdAlt)
|
||||
multiplier = 0.1;
|
||||
|
||||
var negaMult:Int = 1;
|
||||
if (i % 2 == 1)
|
||||
@@ -558,11 +564,9 @@ class CharacterEditor extends UIState
|
||||
new FlxPoint(char.characterData.animations[curAnim].x, char.characterData.animations[curAnim].y)); */
|
||||
|
||||
char.playAnim(char.characterData.animations[curAnim].name, false);
|
||||
if (ghostChar.animation.curAnim != null
|
||||
&& char.animation.curAnim != null
|
||||
&& char.animation.curAnim.name == ghostChar.animation.curAnim.name)
|
||||
if (char.getAnimName() != null && char.getAnimName() == ghostChar.getAnimName())
|
||||
{
|
||||
ghostChar.playAnim(char.animation.curAnim.name, false);
|
||||
ghostChar.playAnim(char.getAnimName(), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -611,19 +615,13 @@ class CharacterEditor extends UIState
|
||||
var forward = (FlxG.keys.justPressed.L);
|
||||
var backwards = (FlxG.keys.justPressed.K);
|
||||
|
||||
var changelimit = char.characterData.animations.length;
|
||||
|
||||
if (forward || backwards)
|
||||
{
|
||||
if (forward)
|
||||
curAnim += 1;
|
||||
else if (backwards)
|
||||
curAnim -= 1;
|
||||
var changeLimit = char.characterData.animations.length;
|
||||
curAnim = FlxMath.wrap(curAnim + (forward ? 1 : -1), 0, changeLimit-1);
|
||||
|
||||
if (curAnim >= changelimit)
|
||||
curAnim = 0;
|
||||
else if (curAnim < 0)
|
||||
curAnim = changelimit - 1;
|
||||
trace(curAnim);
|
||||
trace(char.characterData.animations[curAnim]);
|
||||
|
||||
char.playAnim(char.characterData.animations[curAnim].name, false);
|
||||
playingAnim.text = 'Animation:\n${char.characterData.animations[curAnim].name}';
|
||||
@@ -694,7 +692,6 @@ class CharacterEditor extends UIState
|
||||
function set_camZoom(value:Float):Float
|
||||
{
|
||||
editorCamera.zoom = value;
|
||||
camZoom = value;
|
||||
return value;
|
||||
return camZoom = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class CharacterSelection extends EditorTreeMenu
|
||||
if (optionsTree.members.length > 1) { // selected a song
|
||||
// small flashbang
|
||||
var color:FlxColor = characterList.characters[main.curSelected].iconColor.getDefault(0xFFFFFFFF);
|
||||
|
||||
|
||||
bg.colorTransform.redOffset = 0.25 * color.red;
|
||||
bg.colorTransform.greenOffset = 0.25 * color.green;
|
||||
bg.colorTransform.blueOffset = 0.25 * color.blue;
|
||||
@@ -70,16 +70,16 @@ class CharactersList
|
||||
for (s in charactersFound)
|
||||
if (s.endsWith(".xml"))
|
||||
characters.push(CharacterConfig.loadCharacterData(s.replace(".xml", "")));
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function get()
|
||||
{
|
||||
var characterList = new CharactersList();
|
||||
|
||||
if (characterList.getCharactersFromSource(MODS))
|
||||
if (!characterList.getCharactersFromSource(MODS))
|
||||
characterList.getCharactersFromSource(SOURCE);
|
||||
|
||||
return characterList;
|
||||
|
||||
@@ -44,7 +44,7 @@ class DeleteAnimScreen extends UISubstateWindow
|
||||
close();
|
||||
});
|
||||
animButtons.add(newbutton);
|
||||
y_adder += 60;
|
||||
y_adder += 45;
|
||||
}
|
||||
|
||||
closeButton = new UIButton(windowSpr.x - 120, windowSpr.y + 20, "Close", function() {
|
||||
|
||||
@@ -15,7 +15,11 @@ class HelpControls extends UISubstateWindow
|
||||
super.create();
|
||||
|
||||
var helpText = new UIText(windowSpr.x + 25, windowSpr.y + 240, -1, "Left/Right/Up/Down Arrow: To change the offset of the current\nplaying animation.\n
|
||||
Left mouse button on the character: Change character's position.", 24);
|
||||
Left mouse button on the character: Change character's position.\nK to change to prev anim, L to change to new anim
|
||||
Space to play animation
|
||||
|
||||
I to zoom in
|
||||
O to zoom out", 24);
|
||||
add(helpText);
|
||||
|
||||
var closeButton = new UIButton(helpText.x, helpText.y + 160, "Close", function()
|
||||
|
||||
@@ -36,15 +36,15 @@ class SelectAnimUpdate extends UISubstateWindow
|
||||
add(animButtons);
|
||||
|
||||
var y_ofs = 60;
|
||||
|
||||
|
||||
for (anim in char.characterData.animations)
|
||||
{
|
||||
var newbutton = new UIButton(animButtons.x - 550, animButtons.y + y_ofs, anim.name, function()
|
||||
{
|
||||
open_update_window(anim);
|
||||
openUpdateWindow(anim);
|
||||
});
|
||||
animButtons.add(newbutton);
|
||||
y_ofs += 60;
|
||||
y_ofs += 45;
|
||||
}
|
||||
|
||||
cancelButton = new UIButton(windowSpr.x - 10, windowSpr.y + 20, "Cancel", function()
|
||||
@@ -55,7 +55,7 @@ class SelectAnimUpdate extends UISubstateWindow
|
||||
add(cancelButton);
|
||||
}
|
||||
|
||||
public function open_update_window(anim:AnimData)
|
||||
public function openUpdateWindow(anim:AnimData)
|
||||
{
|
||||
openSubState(new UpdateAnimScreen(this.char, this.ghostChar, anim, this.editor));
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ class UpdateAnimScreen extends UISubstateWindow
|
||||
animData.indices.push(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XMLUtil.addAnimToSprite(char, animData);
|
||||
char.characterData.animations[selectedAnimIndex] = animData;
|
||||
char.playAnim(name, true);
|
||||
|
||||
Reference in New Issue
Block a user