Esempio n. 1
0
 def _SETUP_variables(self, options):
     self._bg_color = options.bg
     self._FPS = options.fps
     self._trace_xy = options.trace_xy
     self._trace_hits = options.trace_hits
     self._trace_n = options.trace_n
     self._mSPF = calculations.mSPF_from_FPS(self._FPS)
     self._CLICK_PAUSE = False
     self._RESIZE_PAUSE = False
 def __init__(self, options):
     self._options = options
     self._mSPF = calculations.mSPF_from_FPS(options.fps)
     self._CLICK_PAUSE = False
     self._RESIZE_PAUSE = False
     self._COLLISION_PAUSE = False
     self.root_window = tkinter.Tk()
     self._canvas = tkinter.Canvas(master=self.root_window, background=options.bg_color, highlightthickness=0, height=600, width=600)
     self._canvas.grid(column=0, row=0, sticky=N + S + E + W)
     self.root_window.columnconfigure(index=0, weight=1)
     self.root_window.rowconfigure(index=0, weight=1)
     self.root_window.bind('<Configure>',   self._on_configure)
     self.root_window.bind('<Button-1>',    self._on_mouse_click_left)
     self.root_window.bind('<space>', self._on_press_spacebar)