diff --git a/buildnumber.txt b/buildnumber.txt index 826da6fa..ea14c70b 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -2517 \ No newline at end of file +2520 \ No newline at end of file diff --git a/hicodenamefans.txt b/hicodenamefans.txt index 2d9d985c..67b381f2 100644 --- a/hicodenamefans.txt +++ b/hicodenamefans.txt @@ -378,4 +378,6 @@ WHATS GOOD CODENAME GANG! TIME TO GET SUSSY ON THE BEAT A HA HA! WE IN OHIO! -I cant take it anymore \ No newline at end of file +I cant take it anymore + +FIDY U ALMOST BROKE THE CODENAME DEV REPO I SWEAR TO GOD \ No newline at end of file diff --git a/source/funkin/editors/ui/UIButton.hx b/source/funkin/editors/ui/UIButton.hx index c389fd95..08d46cde 100644 --- a/source/funkin/editors/ui/UIButton.hx +++ b/source/funkin/editors/ui/UIButton.hx @@ -20,6 +20,7 @@ class UIButton extends UISprite { frames = CoolUtil.loadFrames(Paths.image('editors/ui/button')); this.callback = callback; members.push(field = new UIText(x, y, w, text)); + field.alignment = CENTER; } public override function updateButton() { @@ -57,59 +58,60 @@ class UIButton extends UISprite { frame = topleft; setPosition(x, y); __setSize(topleft.frame.width, topleft.frame.height); - super.draw(); + super.drawSuper(); // TOP frame = top; setPosition(x + topleft.frame.width, y); __setSize(bWidth - topleft.frame.width - topright.frame.width, top.frame.height); - super.draw(); + super.drawSuper(); // TOP RIGHT frame = topright; setPosition(x + bWidth - topright.frame.width, y); __setSize(topright.frame.width, topright.frame.height); - super.draw(); + super.drawSuper(); // MIDDLE LEFT frame = middleleft; setPosition(x, y + top.frame.height); __setSize(middleleft.frame.width, bHeight - topleft.frame.height - bottomleft.frame.height); - super.draw(); + super.drawSuper(); // MIDDLE frame = middle; setPosition(x + topleft.frame.width, y + top.frame.height); __setSize(bWidth - middleleft.frame.width - middleright.frame.width, bHeight - topleft.frame.height - bottomleft.frame.height); - super.draw(); + super.drawSuper(); // MIDDLE RIGHT frame = middleright; setPosition(x + bWidth - topright.frame.width, y + top.frame.height); __setSize(middleright.frame.width, bHeight - topleft.frame.height - bottomleft.frame.height); - super.draw(); + super.drawSuper(); // BOTTOM LEFT frame = bottomleft; setPosition(x, y + bHeight - bottom.frame.height); __setSize(bottomleft.frame.width, bottomleft.frame.height); - super.draw(); + super.drawSuper(); // BOTTOM frame = bottom; setPosition(x + bottomleft.frame.width, y + bHeight - bottom.frame.height); __setSize(bWidth - bottomleft.frame.width - bottomright.frame.width, bottom.frame.height); - super.draw(); + super.drawSuper(); // BOTTOM RIGHT frame = bottomright; setPosition(x + bWidth - bottomright.frame.width, y + bHeight - bottom.frame.height); __setSize(bottomright.frame.width, bottomright.frame.height); - super.draw(); + super.drawSuper(); } - setPosition(x, y); + + super.drawMembers(); } private function __setSize(Width:Float, Height:Float) { diff --git a/source/funkin/editors/ui/UISprite.hx b/source/funkin/editors/ui/UISprite.hx index 7cf51330..21e13fcc 100644 --- a/source/funkin/editors/ui/UISprite.hx +++ b/source/funkin/editors/ui/UISprite.hx @@ -34,7 +34,16 @@ class UISprite extends FlxSprite { } public override function draw() { + drawSuper(); + drawMembers(); + } + + public function drawSuper() { super.draw(); + __lastDrawCameras = [for(c in cameras) c]; + } + + public function drawMembers() { @:privateAccess { __oldDefCams = FlxCamera._defaultCameras; @@ -45,9 +54,7 @@ class UISprite extends FlxSprite { FlxCamera._defaultCameras = __oldDefCams; } - __lastDrawCameras = [for(c in cameras) c]; } - public override function destroy() { super.destroy();