From 823120cdef7bfbb2d3ec37c7085878fcbeebcb30 Mon Sep 17 00:00:00 2001 From: ACrazyTown <47027981+ACrazyTown@users.noreply.github.com> Date: Mon, 23 Feb 2026 11:57:00 +0100 Subject: [PATCH] Use `FlxBitmapText` for `scoreText` --- assets | 2 +- astc-compression-data.json | 1 + source/funkin/play/PlayState.hx | 14 +++++++++----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/assets b/assets index 5be03b9cd..cd36d5bfc 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 5be03b9cd894cd77798058bd0918663d1bdc0d5e +Subproject commit cd36d5bfcbd615796e7a8e4cac96713ba53b72eb diff --git a/astc-compression-data.json b/astc-compression-data.json index 387bc2e01..e9925c29f 100644 --- a/astc-compression-data.json +++ b/astc-compression-data.json @@ -147,6 +147,7 @@ } ], "excludes": [ + "assets/fonts/vcr-bmp.png", "assets/preload/images/cursor/", "assets/preload/images/fonts/", "assets/preload/images/freeplay/", diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 89b6bb6ad..3e36360dd 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -11,7 +11,8 @@ import flixel.FlxSubState; import flixel.math.FlxMath; import flixel.math.FlxPoint; import flixel.sound.FlxSound; -import flixel.text.FlxText; +import flixel.text.FlxBitmapFont; +import flixel.text.FlxBitmapText; import flixel.tweens.FlxTween; import flixel.tweens.FlxEase; import flixel.ui.FlxBar; @@ -548,9 +549,9 @@ class PlayState extends MusicBeatSubState * RENDER OBJECTS */ /** - * The FlxText which displays the current score. + * The FlxBitmapText which displays the current score. */ - var scoreText:FlxText; + var scoreText:FlxBitmapText; /** * The bar which displays the player's health. @@ -807,7 +808,7 @@ class PlayState extends MusicBeatSubState // Healthbar healthBarBG = FunkinSprite.create(0, 0, 'healthBar'); healthBar = new FlxBar(0, 0, RIGHT_TO_LEFT, Std.int(healthBarBG.width - 8), Std.int(healthBarBG.height - 8), null, 0, 2); - scoreText = new FlxText(0, 0, 0, '', 20); + scoreText = new FlxBitmapText(0, 0, '', FlxBitmapFont.fromAngelCode(Paths.font("vcr-bmp.png"), Paths.font("vcr-bmp.fnt"))); // Combo & Pop Up comboPopUps = new PopUpStuff(noteStyle); @@ -2006,7 +2007,10 @@ class PlayState extends MusicBeatSubState // The score text below the health bar. scoreText.x = healthBarBG.x + healthBarBG.width - 190; scoreText.y = healthBarBG.y + 30; - scoreText.setFormat(Paths.font('vcr.ttf'), 16, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); + scoreText.alignment = RIGHT; + scoreText.borderStyle = OUTLINE; + scoreText.borderColor = FlxColor.BLACK; + scoreText.letterSpacing = -1; scoreText.scrollFactor.set(); scoreText.zIndex = 802; add(scoreText);