Skip to content

Commit

Permalink
Added flipX and flipY to loadSpriteFromXML() (#487)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
KadePleaseHelpMe and NexIsDumb authored Dec 14, 2024
1 parent ee33acf commit 6e2877c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/funkin/backend/utils/XMLUtil.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -392,4 +394,4 @@ typedef BeatAnim = {

interface IXMLEvents {
public function onPropertySet(property:String, value:Dynamic):Void;
}
}

0 comments on commit 6e2877c

Please sign in to comment.