diff --git a/modules/Labels.py b/modules/Labels.py new file mode 100644 index 0000000..814c863 --- /dev/null +++ b/modules/Labels.py @@ -0,0 +1,19 @@ +import pygame + +class Label: + def __init__(self, surface:pygame.Surface, is_rect=False, pos=tuple) -> None: + self._surface = surface + self._is_rect = is_rect + self._pos = pos + + + def input_label(self): + pass + + def draw(self): + if(self._is_rect): + print("Zeichne ein Rechteck") + + else: + print("Zeichne Surface!") + pass \ No newline at end of file diff --git a/pygame-test.py b/pygame-test.py index fe69805..51cef3d 100644 --- a/pygame-test.py +++ b/pygame-test.py @@ -3,6 +3,7 @@ import pygame_menu import random as rand import modules.User as User import modules.Game_new as Game +import modules.Labels as Label from modules.GameObject import * pygame.init() diff --git a/test.py b/test.py new file mode 100644 index 0000000..f4ec446 --- /dev/null +++ b/test.py @@ -0,0 +1,19 @@ +def test(string=str()): + #print(string) + return string + +func_list = [ ] + +i=0 +for anzahl in range(50): + func_list.append(test("string-"+str(i))) + i += 1 + +for func in func_list: + if(func == "string-30"): + print("Ziel erreicht!") + print(func) + +for count, func in enumerate(func_list): + print(count, func) +