Builded prototype of labels class
This commit is contained in:
19
modules/Labels.py
Normal file
19
modules/Labels.py
Normal file
@@ -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
|
||||
@@ -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()
|
||||
|
||||
19
test.py
Normal file
19
test.py
Normal file
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user