New Icon for advanced Edit
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 213 B |
@@ -44,7 +44,10 @@ class CharacterAnimButtons extends UIButton {
|
||||
editButton.autoAlpha = false;
|
||||
members.push(editButton);
|
||||
|
||||
editIcon = new FlxSprite(editButton.x + 8, editButton.y + 8).loadGraphic(Paths.image('editors/character/edit-button'));
|
||||
editIcon = new FlxSprite(editButton.x + 8, editButton.y + 8).loadGraphic(Paths.image('editors/character/edit-button'), true, 16, 16);
|
||||
editIcon.animation.add("edit", [0]);
|
||||
editIcon.animation.add("advanced", [1]);
|
||||
editIcon.animation.play("edit");
|
||||
editIcon.antialiasing = false;
|
||||
members.push(editIcon);
|
||||
|
||||
|
||||
@@ -645,6 +645,7 @@ class StageEditor extends UIState {
|
||||
saveToXml(spriteXML, "beatOffset", node.getAtt("beatOffset"), 0);
|
||||
saveToXml(spriteXML, "type", sprite.spriteAnimType, LOOP);
|
||||
saveToXml(spriteXML, "color", sprite.color.toWebString(), "#FFFFFF");
|
||||
// TODO: save custom parameters
|
||||
//saveToXml(spriteXML, "flipX", sprite.flipX, false);
|
||||
newNode = spriteXML;
|
||||
} else if(button is StageCharacterButton) {
|
||||
@@ -676,6 +677,7 @@ class StageEditor extends UIState {
|
||||
saveToXml(charXML, "flipX", charPos.flipX, defaultPos.flip);
|
||||
savePointToXml(charXML, "scroll", charPos.scrollFactor, defaultPos.scroll);
|
||||
savePointToXml(charXML, "scale", charPos.scale, 1);
|
||||
// TODO: save custom parameters
|
||||
newNode = charXML;
|
||||
} else if(button is StageUnknownButton) {
|
||||
var button:StageUnknownButton = cast button;
|
||||
|
||||
@@ -16,6 +16,8 @@ class StageCharacterButton extends StageElementButton {
|
||||
|
||||
color = 0xff7aa8ff;
|
||||
|
||||
hasAdvancedEdit = true;
|
||||
|
||||
updateInfo();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ class StageElementButton extends UIButton {
|
||||
public var deleteIcon:FlxSprite;
|
||||
|
||||
public var isHidden:Bool = false;
|
||||
public var hasAdvancedEdit:Bool = false;
|
||||
|
||||
public var selected:Bool = false;
|
||||
|
||||
@@ -62,7 +63,9 @@ class StageElementButton extends UIButton {
|
||||
editButton.autoAlpha = false;
|
||||
members.push(editButton);
|
||||
|
||||
editIcon = new FlxSprite(editButton.x + 8, editButton.y + 8).loadGraphic(Paths.image('editors/character/edit-button'));
|
||||
editIcon = new FlxSprite(editButton.x + 8, editButton.y + 8).loadGraphic(Paths.image('editors/character/edit-button'), true, 16, 16);
|
||||
editIcon.animation.add("edit", [0]);
|
||||
editIcon.animation.add("advanced", [1]);
|
||||
editIcon.antialiasing = false;
|
||||
members.push(editIcon);
|
||||
|
||||
@@ -76,8 +79,21 @@ class StageElementButton extends UIButton {
|
||||
deleteIcon = new FlxSprite(deleteButton.x + (15/2), deleteButton.y + 8).loadGraphic(Paths.image('editors/delete-button'));
|
||||
deleteIcon.antialiasing = false;
|
||||
members.push(deleteIcon);
|
||||
|
||||
setEditNormal();
|
||||
}
|
||||
|
||||
public function setEditNormal() {
|
||||
editIcon.animation.play("edit");
|
||||
editButton.color = FlxColor.YELLOW;
|
||||
}
|
||||
|
||||
public function setEditAdvanced() {
|
||||
editIcon.animation.play("advanced");
|
||||
editButton.color = 0xFFFF5B0F;
|
||||
}
|
||||
|
||||
|
||||
var _lastSelected:Bool = false;
|
||||
|
||||
public override function update(elapsed:Float) {
|
||||
@@ -89,6 +105,14 @@ class StageElementButton extends UIButton {
|
||||
super.update(elapsed);
|
||||
field.x += 12;
|
||||
|
||||
if(hasAdvancedEdit) {
|
||||
if(FlxG.keys.pressed.SHIFT) {
|
||||
setEditAdvanced();
|
||||
} else {
|
||||
setEditNormal();
|
||||
}
|
||||
}
|
||||
|
||||
tagColor.color = color;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ class StageSpriteButton extends StageElementButton {
|
||||
|
||||
//color = 0xFFD9FF50;
|
||||
|
||||
hasAdvancedEdit = true;
|
||||
|
||||
updateInfo();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@ class StageUnknownButton extends StageElementButton {
|
||||
visibilityIcon.exists = false;
|
||||
members.remove(visibilityIcon);
|
||||
|
||||
setEditAdvanced();
|
||||
|
||||
updateInfo();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user