icon colors work in character editor
This commit is contained in:
@@ -167,6 +167,8 @@ class CharacterInfoScreen extends UISubstateWindow {
|
||||
xml.set("scale", Std.string(scaleStepper.value));
|
||||
xml.set("antialiasing", antialiasingCheckbox.checked ? "true" : "false");
|
||||
xml.set("sprite", spriteTextBox.label.text);
|
||||
if (iconColorWheel.colorChanged)
|
||||
xml.set("color", iconColorWheel.curColor.toHexString(false).replace("0x", "#"));
|
||||
|
||||
for (anim in character.animDatas)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ class UIColorwheel extends UISliceSprite {
|
||||
var colorHexTextBox:UITextBox;
|
||||
var rgbNumSteppers:Array<UINumericStepper> = []; // r,g,b
|
||||
|
||||
public var curColor:Null<FlxColor> = FlxColor.WHITE;
|
||||
public var curColor:Null<FlxColor>;
|
||||
public var curColorString:String = "#FFFFFF";
|
||||
|
||||
public var saturation:Float;
|
||||
@@ -118,6 +118,9 @@ class UIColorwheel extends UISliceSprite {
|
||||
}
|
||||
}
|
||||
|
||||
// For Character Editor
|
||||
public var colorChanged:Bool = false;
|
||||
|
||||
// Make the colorwhell feel better
|
||||
static inline var hitBoxExtenstion:Float = 8;
|
||||
|
||||
@@ -135,6 +138,7 @@ class UIColorwheel extends UISliceSprite {
|
||||
if (sprite == colorSlider) updateColorSliderMouse(mousePos);
|
||||
if (sprite == colorPicker) updateColorPickerMouse(mousePos);
|
||||
updateWheel();
|
||||
colorChanged = true;
|
||||
|
||||
spritePos.put();
|
||||
break;
|
||||
|
||||
@@ -52,7 +52,7 @@ class Character extends FunkinSprite implements IBeatReceiver implements IOffset
|
||||
public var playerOffsets:Bool = false;
|
||||
|
||||
public var icon:String = null;
|
||||
public var iconColor:FlxColor = -1;
|
||||
public var iconColor:Null<FlxColor> = null;
|
||||
public var gameOverCharacter:String = "bf-dead";
|
||||
|
||||
public var cameraOffset:FlxPoint = new FlxPoint(0, 0);
|
||||
@@ -409,7 +409,8 @@ class Character extends FunkinSprite implements IBeatReceiver implements IOffset
|
||||
xml.set("holdTime", Std.string(holdTime));
|
||||
xml.set("flipX", Std.string(flipX));
|
||||
xml.set("icon", icon);
|
||||
xml.set("color", iconColor.toHexString(false).replace("0x", "#"));
|
||||
if (iconColor != null)
|
||||
xml.set("color", iconColor.toHexString(false).replace("0x", "#"));
|
||||
xml.set("scale", Std.string(scale.x));
|
||||
xml.set("antialiasing", antialiasing == true ? "true" : "false");
|
||||
xml.set("sprite", sprite);
|
||||
|
||||
@@ -685,8 +685,8 @@ class PlayState extends MusicBeatState
|
||||
healthBar = new FlxBar(healthBarBG.x + 4, healthBarBG.y + 4, RIGHT_TO_LEFT, Std.int(healthBarBG.width - 8), Std.int(healthBarBG.height - 8), this,
|
||||
'health', 0, maxHealth);
|
||||
healthBar.scrollFactor.set();
|
||||
var leftColor:Int = dad.iconColor != -1 && Options.colorHealthBar ? dad.iconColor : 0xFFFF0000;
|
||||
var rightColor:Int = boyfriend.iconColor != -1 && Options.colorHealthBar ? boyfriend.iconColor : 0xFF66FF33;
|
||||
var leftColor:Int = dad.iconColor != null && Options.colorHealthBar ? dad.iconColor : 0xFFFF0000;
|
||||
var rightColor:Int = boyfriend.iconColor != null && Options.colorHealthBar ? boyfriend.iconColor : 0xFF66FF33;
|
||||
if (opponentMode) healthBar.createFilledBar(rightColor, leftColor); // switch the colors
|
||||
else healthBar.createFilledBar(leftColor, rightColor);
|
||||
add(healthBar);
|
||||
|
||||
Reference in New Issue
Block a user