ruffle
ruffle copied to clipboard
All text show as "test" in Phit and some rendering issues
Describe the bug
Menu
All the menu text show up as "test" and also rendering is not perfect.
Level
Only the outlibes are rendered properly
Expected behavior
Menu

Level

Affected platform
Desktop app
Operating system
Windows 11
Browser
NA
Additional information
SWF Link - https://www.addictinggames.com/sites/default/files/flash_games/phit_0.swf
Version - ruffle-nightly-2022_09_14 (latest as of writing this)
Related to #5887 I guess
Looks like it's showing the correct number of menu options now, at least! I wonder if the text issue can be fixed soon.
So the issue here is that there's a 'button sprite' -> button -> text heirarchy. In the button sprite code CPhitButton it assigns a text to this._buttonText which is the variable name for the text. In flash this works fine but ruffle doesn't make that connection, I assume because of scoping issues (assigning to this._button._buttonText fixes this but ruins flash). I assume #5492 will help? Not sure what is the pull request currently working on this.
Oh interesting, sounds very similar to #2181 then. As far as I understand, this would take quite a big refactor to fix and no one is working on it at the moment.
Blocks are rendering properly now, but the text is still somewhat buggy. I do notice that during gameplay, most of the button text shows up normally save for the quit button, but as soon as the buttons become active as you move pieces around, they start changing text to test.
Fixed by #12541.