################## # Screen objects # ################## credits_screen = Screen( name='credit', main=credit, surfaces={ 'page': { 'frame': Frame(x=0, y=0, w=1800, h=1080), 'back': { 'type': 'button', 'frame': Frame(x=141, y=58, w=132, h=103), 'imageData': { 'frame': Frame(x=141, y=58, w=132, h=103) }, 'action': Switchscreen(type='back') }, 'github': { 'type': 'button', 'frame': Frame(x=421, y=797, w=650, h=123), 'imageData': { 'frame': Frame(x=0, y=710, w=1800, h=370) }, 'action': Runclass(run=webbrowser.open, parameters={ 'url': 'https://github.com/benwoo1110/Ratventure' }) }
'frame': Frame(x=0, y=0, w=1800, h=1080), 'try_again': { 'type': 'button', 'frame': Frame(x=347, y=708, w=507, h=140), 'imageData': { 'frame': Frame(x=347, y=708, w=507, h=140) }, 'action': Runclass(run=PlayerData.new) }, 'mainmenu': { 'type': 'button', 'frame': Frame(x=946, y=708, w=507, h=140), 'imageData': { 'frame': Frame(x=946, y=708, w=507, h=140) }, 'action': Switchscreen(type='back', screen='mainmenu') }, }, 'win': { 'frame': Frame(x=0, y=0, w=1800, h=1080), 'background': { 'type': 'object', 'frame': Frame(x=0, y=0, w=1800, h=1080), 'clickSound': None }, 'new_game': { 'type': 'button', 'frame': Frame(x=347, y=708, w=507, h=140), 'imageData': { 'frame': Frame(x=347, y=708, w=507, h=140) },
if event_result == None: return # Quit program if event_result.contains('outcome', 'quit'): return 'quit' ################## # Screen objects # ################## leaderboard_screen = Screen( name='leaderboard', main=leaderboard, firstLoad=[], keyboard={ 'back': { 'keys': [27], 'action': Switchscreen(type='back', screen='mainmenu') }, 'page_back': { 'keys': [1073741904], 'action': Runclass(run=PlayerRank.updateList, parameters={'page': -1}) }, 'page_next': { 'keys': [1073741903], 'action': Runclass(run=PlayerRank.updateList, parameters={'page': 1}) }, }, surfaces={ 'board': { 'frame': Frame(x=0, y=0, w=1800, h=1080),
################## # Screen objects # ################## mainmenu_screen = Screen( name='mainmenu', main=mainmenu, surfaces={ 'menu': { 'frame': Frame(x=0, y=0, w=1800, h=1080), 'new_game': { 'type': 'button', 'frame': Frame(x=878, y=266, w=652, h=134), 'imageData': { 'frame': Frame(x=878, y=266, w=652, h=134) }, 'action': Switchscreen(type='load', screen='new_game') }, 'load_saved': { 'type': 'button', 'frame': Frame(x=878, y=469, w=652, h=134), 'imageData': { 'frame': Frame(x=878, y=469, w=652, h=134) }, 'action': Switchscreen(type='load', screen='saves') }, 'leaderboard': { 'type': 'button', 'frame': Frame(x=878, y=672, w=652, h=134), 'imageData': { 'frame': Frame(x=878, y=672, w=652, h=134) },