dumping a bunch of stuff (ui button list still fucking broken)

This commit is contained in:
lunarcleint
2023-08-02 19:10:23 -07:00
parent 34136a490f
commit 5138ba72e7
12 changed files with 140 additions and 99 deletions
+4 -1
View File
@@ -52,6 +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 gameOverCharacter:String = "bf-dead";
public var cameraOffset:FlxPoint = new FlxPoint(0, 0);
@@ -373,7 +374,8 @@ class Character extends FunkinSprite implements IBeatReceiver implements IOffset
if (xml.x.exists("camy")) cameraOffset.y = Std.parseFloat(xml.x.get("camy"));
if (xml.x.exists("holdTime")) holdTime = CoolUtil.getDefault(Std.parseFloat(xml.x.get("holdTime")), 4);
if (xml.x.exists("flipX")) flipX = (xml.x.get("flipX") == "true");
if (xml.x.exists("icon")) icon = xml.x.get("icon"); // idk why this is broke it just is
if (xml.x.exists("icon")) icon = xml.x.get("icon");
if (xml.x.exists("color")) iconColor = FlxColor.fromString(xml.x.get("color"));
if (xml.x.exists("scale")) {
var scale = Std.parseFloat(xml.x.get("scale")).getDefault(1);
this.scale.set(scale, scale);
@@ -407,6 +409,7 @@ 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", "#"));
xml.set("scale", Std.string(scale.x));
xml.set("antialiasing", antialiasing == true ? "true" : "false");
xml.set("sprite", sprite);
+4 -6
View File
@@ -682,15 +682,13 @@ class PlayState extends MusicBeatState
healthBarBG.scrollFactor.set();
add(healthBarBG);
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();
if (opponentMode)
healthBar.createFilledBar(0xFF66FF33, 0xFFFF0000); // switch the colors
else
healthBar.createFilledBar(0xFFFF0000, 0xFF66FF33);
var leftColor:Int = dad.iconColor != -1 && Options.colorHealthBar ? dad.iconColor : 0xFFFF0000;
var rightColor:Int = boyfriend.iconColor != -1 && Options.colorHealthBar ? boyfriend.iconColor : 0xFF66FF33;
if (opponentMode) healthBar.createFilledBar(rightColor, leftColor); // switch the colors
else healthBar.createFilledBar(leftColor, rightColor);
add(healthBar);
health = maxHealth / 2;