@@ -8,7 +8,7 @@ The GUI is structured like a tree; every widget can have other widgets as
88children.
99
1010The root of the tree is the :py:class: `~arcade.gui.UIManager `. The
11- :py:class: `UIManager ` connects the user interactions with the GUI. Read more about
11+ :py:class: `~arcade.gui. UIManager ` connects the user interactions with the GUI. Read more about
1212:ref: `UIEvent `.
1313
1414Classes of Arcade's GUI code are prefixed with ``UI- `` to make them easy to
@@ -41,7 +41,6 @@ via the :py:attr:`~arcade.gui.UIView.ui` attribute.
4141It automatically enables and disables the
4242:py:class: `~arcade.gui.UIManager ` when the view is shown or hidden.
4343
44-
4544UIWidget
4645````````
4746
@@ -52,14 +51,14 @@ such as buttons or labels.
5251User interaction with widgets is processed within :py:meth: `~arcade.gui.UIWidget.on_event `.
5352
5453
55- A :class: `UIWidget ` has following properties.
54+ A :class: `~arcade.gui. UIWidget ` has following properties.
5655
5756``rect ``
5857 A tuple with four slots. The first two are x and y coordinates (bottom
5958 left of the widget), and the last two are width and height.
6059
6160``children ``
62- Child widgets rendered within this widget. A :class: `UIWidget ` will not
61+ Child widgets rendered within this widget. A :class: `~arcade.gui. UIWidget ` will not
6362 move or resize its children; use a :py:class: `~arcade.gui.UILayout `
6463 instead.
6564
@@ -84,17 +83,17 @@ A :class:`UIWidget` has following properties.
8483
8584``size_hint_min ``
8685 A tuple of two integers defining the minimum width and height of the
87- widget. These values should be taken into account by :class: `UILayout ` when
86+ widget. These values should be taken into account by :class: `~arcade.gui. UILayout ` when
8887 a ``size_hint `` is given for the axis.
8988
9089``size_hint_max ``
9190 A tuple of two integers defining the maximum width and height of the
92- widget. These values should be taken into account by :class: `UILayout ` when
91+ widget. These values should be taken into account by :class: `~arcade.gui. UILayout ` when
9392 a ``size_hint `` is given for the axis.
9493
9594.. warning :: Size hints do nothing on their own!
9695
97- They are hints to :class: `UILayout ` instances, which may choose to use or
96+ They are hints to :class: `~arcade.gui. UILayout ` instances, which may choose to use or
9897 ignore them.
9998
10099UILayout
@@ -168,8 +167,8 @@ changes only once.
168167
169168**Example **: Executed steps within :py:class: `~arcade.gui.UIBoxLayout `:
170169
171- 1. :py:meth: `~arcade.UIBoxLayout.prepare_layout ` updates own size_hints
172- 2. :py:meth: `~arcade.UIBoxLayout.do_layout `
170+ 1. :py:meth: `~arcade.gui. UIBoxLayout.prepare_layout ` updates own size_hints
171+ 2. :py:meth: `~arcade.gui. UIBoxLayout.do_layout `
173172 1. Collect current ``size ``, ``size_hint ``, ``size_hint_min `` of children
174173 2. Calculate the new position and sizes
175174 3. Set position and size of children
@@ -222,17 +221,17 @@ changes only once.
222221 Size hint support
223222^^^^^^^^^^^^^^^^^
224223
225- +--------------------------+------------+----------------+----------------+
226- | | size_hint | size_hint_min | size_hint_max |
227- +==========================+============+================+================+
228- | :class: `UIAnchorLayout ` | X | X | X |
229- +--------------------------+------------+----------------+----------------+
230- | :class: `UIBoxLayout ` | X | X | X |
231- +--------------------------+------------+----------------+----------------+
232- | :class: `UIGridLayout ` | X | X | X |
233- +--------------------------+------------+----------------+----------------+
234- | :class: `UIManager ` | X | X | X |
235- +--------------------------+------------+----------------+----------------+
224+ +-------------------------------------- +------------+----------------+----------------+
225+ | | size_hint | size_hint_min | size_hint_max |
226+ +====================================== +============+================+================+
227+ | :class: `~arcade.gui. UIAnchorLayout ` | X | X | X |
228+ +-------------------------------------- +------------+----------------+----------------+
229+ | :class: `~arcade.gui. UIBoxLayout ` | X | X | X |
230+ +-------------------------------------- +------------+----------------+----------------+
231+ | :class: `~arcade.gui. UIGridLayout ` | X | X | X |
232+ +-------------------------------------- +------------+----------------+----------------+
233+ | :class: `~arcade.gui. UIManager ` | X | X | X |
234+ +-------------------------------------- +------------+----------------+----------------+
236235
237236UIMixin
238237=======
@@ -242,9 +241,9 @@ behaviour. Currently the available Mixins are still under heavy development.
242241
243242Available:
244243
245- - :py:class: `UIDraggableMixin ` - Makes a widget draggable with the mouse.
246- - :py:class: `UIMouseFilterMixin ` - Captures all mouse events.
247- - :py:class: `UIWindowLikeMixin ` - Makes a widget behave like a window, combining draggable and mouse filter behaviour.
244+ - :py:class: `~arcade.gui. UIDraggableMixin ` - Makes a widget draggable with the mouse.
245+ - :py:class: `~arcade.gui. UIMouseFilterMixin ` - Captures all mouse events.
246+ - :py:class: `~arcade.gui. UIWindowLikeMixin ` - Makes a widget behave like a window, combining draggable and mouse filter behaviour.
248247
249248UIConstructs
250249============
@@ -253,8 +252,8 @@ Constructs are predefined structures of widgets and layouts like a message box.
253252
254253Available:
255254
256- - :py:class: `UIMessageBox ` - A simple message box with a title, message and buttons.
257- - :py:class: `UIButtonRow ` - A row of buttons.
255+ - :py:class: `~arcade.gui. UIMessageBox ` - A simple message box with a title, message and buttons.
256+ - :py:class: `arcade.gui. UIButtonRow ` - A row of buttons.
258257
259258Available Elements
260259==================
@@ -273,7 +272,7 @@ can use the :py:attr:`~arcade.gui.UITextWidget.ui_label` attribute to get the
273272Flat button
274273^^^^^^^^^^^
275274
276- **Name **: :py:class: `~arcade.gui.FlatButton `
275+ **Name **: :py:class: `~arcade.gui.UIFlatButton `
277276
278277A flat button for simple interactions (hover, press, release, click). This
279278button is created with a simple rectangle. Flat buttons can quickly create a
@@ -373,14 +372,14 @@ parameters. ``bold`` and ``italic`` will set the text to bold or italic.
373372``align `` specifies the justification of the text. Additionally it takes
374373``font_name ``, ``font_size ``, and ``text_color `` options.
375374
376- Using the :py:attr: `~arcade.gui.UILabel.label ` property accesses the internal
375+ Using the :py:attr: `~arcade.gui.UILabel `'s `` _label ` ` property accesses the internal
377376:py:class: `~arcade.Text ` class.
378377
379378.. hint ::
380379 A :py:attr: `~arcade.gui.UILabel.text ` attribute can modify the displayed
381380 text. Beware-calling this again and again will give a lot of lag. Use
382- :py:meth: `~arcade.Text.begin_update ` and py :meth: ` ~arcade.Text.end_update `
383- to speed things up.
381+ :py:meth: `~arcade.Text.__enter__ ` through the `` with `` statement to speed
382+ things up multiple changes to text instances .
384383
385384Text input field
386385^^^^^^^^^^^^^^^^
@@ -426,7 +425,7 @@ Arcade's GUI events are fully typed dataclasses, which provide information
426425about an event affecting the UI.
427426
428427All pyglet window events are converted by the
429- :py:class: `~arcade.gui.UIManager ` into :class: `UIEvents ` and passed via
428+ :py:class: `~arcade.gui.UIManager ` into :class: `~arcade.gui.UIEvent ` and passed via
430429:py:meth: `~pyglet.event.EventDispatcher.dispatch_event ` to the
431430:py:meth: `~arcade.gui.UIWidget.on_event ` callbacks.
432431
@@ -513,7 +512,7 @@ Different event systems
513512
514513Arcade's GUI uses different event systems, dependent on the required flow. A
515514game developer should mostly interact with user-interface events, which are
516- dispatched from specific :py:class: `~arcade.gui.UIWidget`s like an ``on_click` `
515+ dispatched from a specific :py:class: `~arcade.gui.UIWidget ` like an ``on_click ``
517516of a button.
518517
519518In cases where a developer implement own widgets themselves or want to
0 commit comments