diff --git a/src/text_input.py b/src/text_input.py new file mode 100644 index 0000000..e215b96 --- /dev/null +++ b/src/text_input.py @@ -0,0 +1,20 @@ +import pygame + +class TextInput: + def __init__(self, width, height, pos_x, pos_y): + self.rect = pygame.Rect(pos_x, pos_y, width, height) + + self.font = pygame.font.SysFont("Arial", 22) + + # input text + self.text = "" + + self.active = True + + # colors + self.text_color = (255, 255, 255) + self.border_color = (255, 255, 255) + self.active_border_color = (0, 255, 0) + self.background_color = (30, 30, 30) + +