50 lines
126 KiB
Python
50 lines
126 KiB
Python
|
import PySimpleGUI as sg
|
||
|
|
||
|
"""
|
||
|
Demo - Can Buttons
|
||
|
|
||
|
How to use an Image element to make Can Buttons.
|
||
|
|
||
|
The metadata for the Image Element holds the current button state. In this case the state is an offset into a list of button images.
|
||
|
|
||
|
The technique is much like the toggle buttons except you can have more than 2 states.
|
||
|
|
||
|
A Custom Titlebar was used to make the overall appearance cleaner while still providing the ability to easily exit.
|
||
|
|
||
|
Copyright 2022 PySimpleGUI
|
||
|
"""
|
||
|
|
||
|
|
||
|
def main():
|
||
|
boost_images = (can_boost_off, can_boost_blue, can_boost_green)
|
||
|
seat_images = (can_seat_off, can_seat_red)
|
||
|
sg.theme('black')
|
||
|
sg.theme_background_color('#222222')
|
||
|
sg.theme_text_color('#888888')
|
||
|
sg.set_options(titlebar_background_color=sg.theme_background_color(), titlebar_text_color=sg.theme_text_color(), use_custom_titlebar=True, titlebar_icon=sg.BLANK_BASE64)
|
||
|
|
||
|
layout = [[sg.Im(boost_images[0], k='-BOOST-', enable_events=True, metadata=0), sg.Im(seat_images[0], enable_events=True, k='-SEAT-', metadata=0)]]
|
||
|
|
||
|
window = sg.Window('', layout)
|
||
|
while True:
|
||
|
event, values = window.read()
|
||
|
if event == sg.WIN_CLOSED or event == 'Exit':
|
||
|
break
|
||
|
if event == '-SEAT-':
|
||
|
window[event].metadata = (window[event].metadata + 1) % len(seat_images)
|
||
|
window[event].update(seat_images[window[event].metadata])
|
||
|
if event == '-BOOST-':
|
||
|
window[event].metadata = (window[event].metadata + 1) % len(boost_images)
|
||
|
window[event].update(boost_images[window[event].metadata])
|
||
|
window.close()
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
|
||
|
can_boost_off = b'iVBORw0KGgoAAAANSUhEUgAAAHMAAABzCAIAAAAkIaqxAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAADwdSURBVHhezd3bk+RHc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