Hello,
I have a class inside a class. I want to set a variable "rect" in that class "textrender " to the value of a variable "rect" in the parent class "textbox". I don't know how to do this.
I have a class inside a class. I want to set a variable "rect" in that class "textrender " to the value of a variable "rect" in the parent class "textbox". I don't know how to do this.
Code:
class textbox(pygame.sprite.Sprite): # Textbox class def __init__(self): rect=*something* class textrender(pygame.sprite.Sprite): # Textrender class inside textbox class def __init__(self, text): #I want to set self.rect to textbox's rect
Comment