Gallery / Examples¶
Several examples are provided with the pygame_menu
library. To run the
examples, simply execute these commands in a terminal:
$> python -m pygame_menu.examples.simple
$> python -m pygame_menu.examples.game_selector
$> python -m pygame_menu.examples.multi_input
$> python -m pygame_menu.examples.scroll_menu
$> python -m pygame_menu.examples.timer_clock
Other examples that show specific use cases of the menu are also provided:
$> python -m pygame_menu.examples.other.calculator
$> python -m pygame_menu.examples.other.dynamic_button_append
$> python -m pygame_menu.examples.other.dynamic_widget_update
$> python -m pygame_menu.examples.other.image_background
$> python -m pygame_menu.examples.other.ui_solar_system
Them can also be imported as follows:
from pygame_menu.examples.example import main
main()
Example sources can also be found in the Github repo. Also, check out widget-specific examples in the Adding Widgets documentation page.