Skip to content

Commit 5aa322d

Browse files
authored
Small UI docs and example cleanup (#2561)
1 parent f4f4521 commit 5aa322d

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

arcade/examples/gui/0_basic_setup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __init__(self):
3333
# Create a UIManager
3434
self.ui = UIManager()
3535

36-
# Create a anchor layout, which can be used to position widgets on screen
36+
# Create an anchor layout, which can be used to position widgets on screen
3737
anchor = self.ui.add(UIAnchorLayout())
3838

3939
# Add a button switch to the other View.
@@ -43,7 +43,6 @@ def __init__(self):
4343
texture=TEX_RED_BUTTON_NORMAL,
4444
texture_hovered=TEX_RED_BUTTON_HOVER,
4545
texture_pressed=TEX_RED_BUTTON_PRESS,
46-
on_click=lambda: self.window.show_view(self.window.views["other"]),
4746
)
4847
)
4948

@@ -78,7 +77,7 @@ def __init__(self):
7877
super().__init__()
7978
self.background_color = arcade.uicolor.BLUE_PETER_RIVER
8079

81-
# Create a anchor layout, which can be used to position widgets on screen
80+
# Create an anchor layout, which can be used to position widgets on screen
8281
anchor = self.add_widget(UIAnchorLayout())
8382

8483
# Add a button switch to the other View.
@@ -88,7 +87,6 @@ def __init__(self):
8887
texture=TEX_RED_BUTTON_NORMAL,
8988
texture_hovered=TEX_RED_BUTTON_HOVER,
9089
texture_pressed=TEX_RED_BUTTON_PRESS,
91-
on_click=lambda: self.window.show_view(self.window.views["my"]),
9290
)
9391
)
9492

arcade/gui/view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class UIView(View):
2121
The screen is cleared before on_draw_before_ui is called
2222
with the background color of the window.
2323
24-
If you override ``on_show_view`` or ``on_show_view``,
24+
If you override ``on_show_view`` or ``on_hide_view``,
2525
don't forget to call super().on_show_view() or super().on_hide_view().
2626
2727
"""

doc/programming_guide/gui/concepts.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ And disable it with :py:meth:`~arcade.gui.UIManager.disable()` within :py:meth:`
3535

3636
To draw the GUI, call :py:meth:`~arcade.gui.UIManager.draw` within the :py:meth:`~arcade.View.on_draw` method.
3737

38-
The :py:class`~arcade.gui.UIView` class is a subclass of :py:class:`~arcade.View` and provides
39-
a convenient way to use the GUI. It instanciates a :py:class:`~arcade.gui.UIManager` which can be accessed
38+
The :py:class:`~arcade.gui.UIView` class is a subclass of :py:class:`~arcade.View` and provides
39+
a convenient way to use the GUI. It instantiates a :py:class:`~arcade.gui.UIManager` which can be accessed
4040
via the :py:attr:`~arcade.gui.UIView.ui` attribute.
4141
It automatically enables and disables the
4242
:py:class:`~arcade.gui.UIManager` when the view is shown or hidden.

0 commit comments

Comments
 (0)