Skip to content

Commit 6e2877c

Browse files
Added flipX and flipY to loadSpriteFromXML() (#487)
Fixes #478 * Added flipX and flipY to loadSpriteFromXML() why was this not already implemented? Nevermind I'm pretty sure it's because parseBool isn't a thing * WHOOPS gotta update my heckin repo * Wow neo is good at simplifying stuff rip parseBool but HAXE MAKE IT A THING * sigma ¯\_(ツ)_/¯ * Allow for flipx and flipy as opposed to flipX and flipY (cammel text) * gaming chair 🪑 --------- Co-authored-by: ⍚~Nex <[email protected]>
1 parent ee33acf commit 6e2877c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/funkin/backend/utils/XMLUtil.hx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ class XMLUtil {
143143
var graphicSizey:Null<Int> = Std.parseInt(node.att.graphicSizey);
144144
if (graphicSizey.isNotNull()) spr.setGraphicSize(0, graphicSizey);
145145
}
146+
if (node.has.flipX) spr.flipX = node.att.flipX == "true";
147+
if (node.has.flipY) spr.flipY = node.att.flipY == "true";
146148
if (node.has.updateHitbox && node.att.updateHitbox == "true") spr.updateHitbox();
147149

148150
if (node.has.zoomfactor)
@@ -392,4 +394,4 @@ typedef BeatAnim = {
392394

393395
interface IXMLEvents {
394396
public function onPropertySet(property:String, value:Dynamic):Void;
395-
}
397+
}

0 commit comments

Comments
 (0)