Skip to content

Refactor: add Bitmap ScoreTxt as an option for Optimization#1473

Open
moxie-coder wants to merge 3 commits intomainfrom
Bitmap/ScoreTxt
Open

Refactor: add Bitmap ScoreTxt as an option for Optimization#1473
moxie-coder wants to merge 3 commits intomainfrom
Bitmap/ScoreTxt

Conversation

@moxie-coder
Copy link
Copy Markdown
Collaborator

This makes GC not go insane when the text is updated every frame, however it breaks some compatibility with some mods that rely on setFormat and such for the ScoreTxt, which is why it's optional as an setting.

TODO:

  • Cleanup PlayState and make ScoreTxt into it's own class

currently it's skewed to the left, and doesn't update properly
@JordanSantiagoYT
Copy link
Copy Markdown
Owner

idk why, but when i use the Bitmap scoreTxt, the score text is smaller than when you don't use it.

@moxie-coder
Copy link
Copy Markdown
Collaborator Author

idk why, but when i use the Bitmap scoreTxt, the score text is smaller than when you don't use it.

I’ve noticed this, I’ll fix it in a moment

@moxie-coder
Copy link
Copy Markdown
Collaborator Author

Screenshot 2026-02-28 05-08-32

I've re-exported it, and it definitely looks far better than before honestly. I think this might be good


function setScoreText(value:String)
{
if (Std.isOfType(scoreTxt, FlxText))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could've done if (scoreTxt is FlxText)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could've done if (scoreTxt is FlxText)

that method is deprecated, this is the newer method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants