Skip to content

Make arcade.Text lazy#2642

Merged
einarf merged 13 commits intopythonarcade:developmentfrom
csd4ni3l:csd4ni3l-arcade-text-lazy
Apr 3, 2025
Merged

Make arcade.Text lazy#2642
einarf merged 13 commits intopythonarcade:developmentfrom
csd4ni3l:csd4ni3l-arcade-text-lazy

Conversation

@csd4ni3l
Copy link
Contributor

@csd4ni3l csd4ni3l commented Apr 3, 2025

This is a draft to make arcade.Text lazy.

It works in the same way as the lazy NinePatch, using the _initialized attribute and the initalize and _init_deferred functions. It raises a RuntimeError if a property of the label is accessed before initializing.

I dont know how to handle arguments correctly or efficiently, so its marked as a draft, but in its current state, its still usable.

@csd4ni3l csd4ni3l marked this pull request as ready for review April 3, 2025 17:17
@csd4ni3l csd4ni3l changed the title Make arcade.Text lazy (Draft) Make arcade.Text lazy Apr 3, 2025
@einarf einarf merged commit f926a81 into pythonarcade:development Apr 3, 2025
7 checks passed
@csd4ni3l csd4ni3l deleted the csd4ni3l-arcade-text-lazy branch April 3, 2025 17:21
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.

2 participants