コード例 #1
0
    def __init__(self):
        self.sm = SeleniumManager(
            'https://eu.bbcollab.com/collab/ui/session/guest/07731b875d3f4c27933ca970d57d0d84',
            bot_name, self)
        self.music_bot = MusicBot(self.sm)

        self.commands = {
            'musique': self.music_bot.command,
            'aide': self.help,
            'parle': self.speak,
            'covid': self.covid,
            'meme': self.meme,
            'chat': self.cat_img,
            'traduire': self.translate
        }

        self.window = Window(self.sm, self)
コード例 #2
0
from tkinter import *
from window_manager import Window
from widget_manager import WidgetManager

# Define window
root = Tk()
root.resizable(False, False)
root.geometry('800x350')
# Initialise ui definitions class
wind = Window(root)
clr_mgr = WidgetManager(root)
# Run application
root.mainloop()
コード例 #3
0
from constants import Fonts
from window_manager import Window
from game import start_game

if __name__ == '__main__':
	root = Window(title='Snake Menu', max_fps=10)
	root.set_buttons({
		'text': 'Snake',
		'x': 250,
		'y': 100,
		'font': Fonts.default(size=80)
	}, {
		'text': 'Start game',
		'x': 250,
		'y': 250,
		'fn': lambda: start_game(root.id)
	}, {
		'text': 'Exit Game',
		'x': 250,
		'y': 400,
		'fn': exit
	})

	root.mainloop()