Skip to content

Commit

Permalink
fixed issue with Text not having color set, and thus could not get th…
Browse files Browse the repository at this point in the history
…e color either.
  • Loading branch information
pokepetter committed Oct 26, 2024
1 parent b694ee0 commit 15ca587
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ursina/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def __init__(self, text='', start_tag=start_tag, end_tag=end_tag, ignore=True, *
self.start_tag = start_tag
self.end_tag = end_tag
self.text_colors = {'default' : color.text_color}
self.color = color.text_color

for color_name in color.color_names:
self.text_colors[color_name] = color.colors[color_name]
Expand Down

2 comments on commit 15ca587

@Raphi-2Code
Copy link

Choose a reason for hiding this comment

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

this seems useless, y do u do that?

@pokepetter
Copy link
Owner Author

@pokepetter pokepetter commented on 15ca587 Oct 28, 2024

Choose a reason for hiding this comment

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

You couldn't set .alpha on a Text, because it had no color. Setting .alpha gets the current color and modifies only the alpha. This broke existing code.

Please sign in to comment.