You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a UIPanel that is serving as the container for a number of UIButton's. show() and hide() are used to make the panel visible or not visible at various points in the game. Before making the panel visible by calling show() against it, my code determines which buttons on the panel should be visible and which should be invisible. If a button that was previously visible on the panel should be invisible when the panel is next shown, the code calls hide() against the button. Eventually the code calls show() against the panel to make the panel visible again. The button against which hide() was called is NOT hidden when the button becomes visible.
Note: If I reverse the order of the steps, calling show against the UIPanel and then calling hide() against the UIButton, the button is correctly hidden. But calling hide() against the UIButton while the UIPanel is itself hidden seems to have no effect.
To Reproduce
Steps to reproduce the behaviour:
Create a UIPanel
Create a UIButton setting the UIPanel as the button's container
Call hide() against the UIPanel
Call hide() against the UIButton
Call show() against the UIPanel
Observe that the button is NOT hidden despite the fact that hide() was called against it.
Expected behaviour
If hide() is called against a widget, the widget should remain hidden, regardless of changes to the visibility of the widget's container. This should be true whether the container itself was visible or invisible when hide() was called against the widget.
Platform and software (please complete the following information):
OS: Mac (macOS Ventura 13.5.2)
Pygame GUI version 0.6.12
Pygame version: pygame-ce 2.5.1
The text was updated successfully, but these errors were encountered:
MrAnthrope
changed the title
hide() has not effect on UIButton if the button's container is currently hidden
hide() has no effect on UIButton if the button's container is currently hidden
Sep 1, 2024
Describe the bug
I have a UIPanel that is serving as the container for a number of UIButton's. show() and hide() are used to make the panel visible or not visible at various points in the game. Before making the panel visible by calling show() against it, my code determines which buttons on the panel should be visible and which should be invisible. If a button that was previously visible on the panel should be invisible when the panel is next shown, the code calls hide() against the button. Eventually the code calls show() against the panel to make the panel visible again. The button against which hide() was called is NOT hidden when the button becomes visible.
Note: If I reverse the order of the steps, calling show against the UIPanel and then calling hide() against the UIButton, the button is correctly hidden. But calling hide() against the UIButton while the UIPanel is itself hidden seems to have no effect.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
If hide() is called against a widget, the widget should remain hidden, regardless of changes to the visibility of the widget's container. This should be true whether the container itself was visible or invisible when hide() was called against the widget.
Platform and software (please complete the following information):
The text was updated successfully, but these errors were encountered: