mirror of
https://github.com/3b1b/manim.git
synced 2025-08-03 04:04:36 +08:00
Small reorderings
This commit is contained in:
@ -14,19 +14,21 @@ class Window(PygletWindow):
|
||||
vsync = True
|
||||
cursor = True
|
||||
|
||||
def __init__(self, scene, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
def __init__(self, scene, size=(1280, 720), **kwargs):
|
||||
super().__init__()
|
||||
digest_config(self, kwargs)
|
||||
|
||||
self.init_mgl_context()
|
||||
self.scene = scene
|
||||
self.pressed_keys = set()
|
||||
|
||||
self.title = str(scene)
|
||||
self.size = size
|
||||
|
||||
mglw.activate_context(window=self)
|
||||
self.timer = Timer()
|
||||
self.config = mglw.WindowConfig(ctx=self.ctx, wnd=self, timer=self.timer)
|
||||
self.timer.start()
|
||||
|
||||
self.scene = scene
|
||||
self.title = str(scene)
|
||||
self.pressed_keys = set()
|
||||
# No idea why, but when self.position is set once
|
||||
# it sometimes doesn't actually change the position
|
||||
# to the specified tuple on the rhs, but doing it
|
||||
@ -35,8 +37,6 @@ class Window(PygletWindow):
|
||||
self.position = initial_position
|
||||
self.position = initial_position
|
||||
|
||||
if "size" in kwargs:
|
||||
self.size = kwargs["size"]
|
||||
|
||||
def find_initial_position(self):
|
||||
custom_position = get_customization()["window_position"]
|
||||
|
Reference in New Issue
Block a user