def calcActionDict(cls, screenClass) -> dict: p = pygame ctrl = p.KMOD_LCTRL return { Combo(ctrl, p.K_o): Config.getInstance().readFromFile, Combo(ctrl, p.K_s): Config.getInstance().saveToFile, Combo(ctrl, p.K_t): TextBlock, # HOOOOOOOOOOOOOOOO class is function mazafaka HAAAAAAAAAAA Combo(ctrl, p.K_i): ImageBlock, # HOOOOOOOOOOOOOOOO class is function mazafaka HAAAAAAAAAAA Combo(ctrl, p.K_f): cls.switchFullscreen, Combo(ctrl, p.K_EQUALS): cls.scaleUp, Combo(ctrl, p.K_MINUS): cls.scaleDown, }
#!/usr/bin/env python # -*- coding: utf-8 -*- from classes.Config import Config from classes.Drawable.Screen.Screen import Screen from classes.TimerHandler import TimerHandler Config.getInstance() eventHandler = Screen.getInstance().makeHandler() timerHandler = TimerHandler(eventHandler) while True: timerHandler.handleFrame()