From bb3326eadc98f5f25aeb779bae4681491accc561 Mon Sep 17 00:00:00 2001 From: pushfoo <36696816+pushfoo@users.noreply.github.com> Date: Fri, 13 Oct 2023 09:21:31 -0400 Subject: [PATCH] Document Window.__init__'s screen and style args * Add links to relevant sections of the pyglet programming guide * Add :param: entries for each of the arguments with links to the pyglet programming guide --- arcade/application.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arcade/application.py b/arcade/application.py index 08e72b402..21651c913 100644 --- a/arcade/application.py +++ b/arcade/application.py @@ -69,6 +69,9 @@ class Window(pyglet.window.Window): The Window class forms the basis of most advanced games that use Arcade. It represents a window on the screen, and manages events. + .. _pyglet_pg_window_size_position: https://pyglet.readthedocs.io/en/latest/programming_guide/windowing.html#size-and-position + .. _pyglet_pg_window_style: https://pyglet.readthedocs.io/en/latest/programming_guide/windowing.html#window-style + :param width: Window width :param height: Window height :param title: Title (appears in title bar) @@ -79,6 +82,12 @@ class Window(pyglet.window.Window): :param antialiasing: Should OpenGL's anti-aliasing be enabled? :param gl_version: What OpenGL version to request. This is ``(3, 3)`` by default \ and can be overridden when using more advanced OpenGL features. + :param screen: Pass a pyglet :py:class:`~pyglet.canvas.Screen` to + request the window be placed on it. See `pyglet's window size & + position guide `_ to learn more. + :param style: Request a non-default window style, such as borderless. + Some styles only work in certain situations. See `pyglet's guide + to window style `_ to learn more. :param visible: Should the window be visible immediately :param vsync: Wait for vertical screen refresh before swapping buffer \ This can make animations and movement look smoother.