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 <87421482+NexIsDumb@users.noreply.github.com>
This commit is contained in:
Microkat
2024-12-14 15:47:47 +01:00
committed by GitHub
co-authored by ⍚~Nex
parent ee33acf1b8
commit 6e2877c2a9
+3 -1
View File
@@ -143,6 +143,8 @@ class XMLUtil {
var graphicSizey:Null<Int> = Std.parseInt(node.att.graphicSizey);
if (graphicSizey.isNotNull()) spr.setGraphicSize(0, graphicSizey);
}
if (node.has.flipX) spr.flipX = node.att.flipX == "true";
if (node.has.flipY) spr.flipY = node.att.flipY == "true";
if (node.has.updateHitbox && node.att.updateHitbox == "true") spr.updateHitbox();
if (node.has.zoomfactor)
@@ -392,4 +394,4 @@ typedef BeatAnim = {
interface IXMLEvents {
public function onPropertySet(property:String, value:Dynamic):Void;
}
}