Skip to content

Commit

Permalink
fixed issue with setting Button text_color not working.
Browse files Browse the repository at this point in the history
  • Loading branch information
petteramland committed Dec 10, 2024
1 parent ce5616b commit 5140942
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ursina/prefabs/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Button(Entity):
default_color = color.black90
default_model = None # will default to rounded Quad

def __init__(self, text='', parent=camera.ui, model=Default, radius=.1, origin=(0,0), text_origin=(0,0), text_size=1, color=Default, collider='box', highlight_scale=1, pressed_scale=1, disabled=False, **kwargs):
def __init__(self, text='', parent=camera.ui, model=Default, radius=.1, origin=(0,0), text_origin=(0,0), text_size=1, text_color=color.white, color=Default, collider='box', highlight_scale=1, pressed_scale=1, disabled=False, **kwargs):
super().__init__(parent=parent)

for key in ('scale', 'scale_x', 'scale_y', 'scale_z', 'world_scale', 'world_scale_x', 'world_scale_y', 'world_scale_z'):
Expand Down Expand Up @@ -45,6 +45,7 @@ def __init__(self, text='', parent=camera.ui, model=Default, radius=.1, origin=(
if text:
self.text = text
self.text_size = text_size
self.text_color = text_color

for key, value in kwargs.items():
setattr(self, key, value)
Expand Down
2 changes: 1 addition & 1 deletion ursina/scripts/smooth_follow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class SmoothFollow():

def __init__(self, target=None, offset=(0,0,0), speed=8, rotation_speed=0, rotation_offset=(0,0,0)):
def __init__(self, target=None, offset=Vec3.zero, speed=8, rotation_speed=0, rotation_offset=(0,0,0)):
self.target = target
self.offset = offset
self.speed = speed
Expand Down

0 comments on commit 5140942

Please sign in to comment.