alert_screen = Screen( name='alert', main=alert, bg_colour=(0, 0, 0, 100), seperateBackground=True, alpha=True, firstLoad=[], keyboard={'dismiss': { 'keys': [27], 'action': Info(text='dismissed') }}, surfaces={ 'back': { 'frame': Frame(x=0, y=0, w=1800, h=1080), 'alpha': True, 'dismiss': { 'type': 'object', 'frame': Frame(x=0, y=0, w=1800, h=1080), 'action': Info(text='dismissed'), 'clickSound': None }, }, 'confirm': { 'frame': Frame(x=495, y=256, w=811, h=573), 'alpha': True, 'message': { 'type': 'text', 'frame': Frame(x=57, y=33, w=696, h=465), 'imageData': { 'frame': Frame(x=57, y=33, w=696, h=465) }, 'clickSound': None, 'data': { 'title': Text(frame=Frame(x=57, y=48, w=697, h=95), text='Title Here', format=TextFormat(fontSize=88, align='center', pos='center', colour=PgEss.colour.black)), 'content': Text(frame=Frame(x=57, y=156, w=697, h=183), text='Content of message here.', format=TextFormat(fontSize=68, align='center', pos='center', warpText=24, lineSpacing=0.8, colour=PgEss.colour.black)), }, }, 'no': { 'type': 'button', 'frame': Frame(x=92, y=371, w=285, h=95), 'imageData': { 'frame': Frame(x=92, y=371, w=285, h=95) }, 'action': Info(text='no') }, 'yes': { 'type': 'button', 'frame': Frame(x=433, y=371, w=285, h=95), 'imageData': { 'frame': Frame(x=433, y=371, w=285, h=95) }, 'action': Info(text='yes') }, }, 'notify': { 'frame': Frame(x=495, y=256, w=811, h=573), 'alpha': True, 'message': { 'type': 'text', 'frame': Frame(x=57, y=33, w=696, h=465), 'imageData': { 'frame': Frame(x=57, y=33, w=696, h=465) }, 'clickSound': None, 'data': { 'title': Text(frame=Frame(x=57, y=48, w=697, h=95), text='Title Here', format=TextFormat(fontSize=88, align='center', pos='center', colour=PgEss.colour.black)), 'content': Text(frame=Frame(x=57, y=156, w=697, h=183), text='Content of message here.', format=TextFormat(fontSize=68, align='center', pos='center', warpText=24, lineSpacing=0.8, colour=PgEss.colour.black)), }, }, 'ok': { 'type': 'button', 'frame': Frame(x=224, y=384, w=362, h=85), 'imageData': { 'frame': Frame(x=224, y=384, w=362, h=85) }, 'action': Info(text='no') }, } })
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), 'alpha': True, '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') }, 'page_text': { 'type': 'text', 'frame': Frame(x=769, y=974, w=262, h=75), 'imageData': { 'frame': Frame(x=769, y=974, w=262, h=106) }, 'selectable': False, 'data': { 'pages': Text(frame=Frame(x=769, y=974, w=262, h=75), prefix='1', text=' / ', suffix='10', format=TextFormat(fontSize=68, align='center', pos='center', colour=PgEss.colour.white)), } }, 'page_back': { 'type': 'button', 'frame': Frame(x=729, y=984, w=57, h=40), 'imageData': { 'frame': Frame(x=729, y=984, w=96, h=40) }, 'action': Runclass(run=PlayerRank.updateList, parameters={'page': -1}) }, 'page_next': { 'type': 'button', 'frame': Frame(x=1031, y=984, w=57, h=40), 'imageData': { 'frame': Frame(x=1031, y=984, w=96, h=40) }, 'action': Runclass(run=PlayerRank.updateList, parameters={'page': 1}) }, }, 'list_1': { 'frame': Frame(x=0, y=220, w=1800, h=168), 'rank': { 'type': 'object', 'frame': Frame(x=141, y=3, w=1519, h=140), 'imageData': { 'frame': Frame(x=141, y=3, w=1519, h=140) }, 'selectable': False, 'data': { 'postion': Text(frame=Frame(x=149, y=3, w=142, h=140), text='1', format=TextFormat(fontSize=96, align='center', pos='center', colour=PgEss.colour.white)), 'nickname': Text(frame=Frame(x=316, y=3, w=670, h=140), text='Demo', format=TextFormat(fontSize=96, align='left', pos='center', colour=PgEss.colour.white)), 'days': Text(frame=Frame(x=1210, y=3, w=379, h=140), text='100', suffix=' days', format=TextFormat(fontSize=96, align='right', pos='center', colour=PgEss.colour.white)), } }, }, 'list_2': { 'frame': Frame(x=0, y=404, w=1800, h=168), 'rank': { 'type': 'object', 'frame': Frame(x=141, y=3, w=1519, h=140), 'imageData': { 'frame': Frame(x=141, y=3, w=1519, h=140) }, 'selectable': False, 'data': { 'postion': Text(frame=Frame(x=149, y=3, w=142, h=140), text='1', format=TextFormat(fontSize=96, align='center', pos='center', colour=PgEss.colour.white)), 'nickname': Text(frame=Frame(x=316, y=3, w=670, h=140), text='Demo', format=TextFormat(fontSize=96, align='left', pos='center', colour=PgEss.colour.white)), 'days': Text(frame=Frame(x=1210, y=3, w=379, h=140), text='100', suffix=' days', format=TextFormat(fontSize=96, align='right', pos='center', colour=PgEss.colour.white)), } }, }, 'list_3': { 'frame': Frame(x=0, y=588, w=1800, h=168), 'rank': { 'type': 'object', 'frame': Frame(x=141, y=3, w=1519, h=140), 'imageData': { 'frame': Frame(x=141, y=3, w=1519, h=140) }, 'selectable': False, 'data': { 'postion': Text(frame=Frame(x=149, y=3, w=142, h=140), text='1', format=TextFormat(fontSize=96, align='center', pos='center', colour=PgEss.colour.white)), 'nickname': Text(frame=Frame(x=316, y=3, w=670, h=140), text='Demo', format=TextFormat(fontSize=96, align='left', pos='center', colour=PgEss.colour.white)), 'days': Text(frame=Frame(x=1210, y=3, w=379, h=140), text='100', suffix=' days', format=TextFormat(fontSize=96, align='right', pos='center', colour=PgEss.colour.white)), } }, }, 'list_4': { 'frame': Frame(x=0, y=772, w=1800, h=168), 'rank': { 'type': 'object', 'frame': Frame(x=141, y=3, w=1519, h=140), 'imageData': { 'frame': Frame(x=141, y=3, w=1519, h=140) }, 'selectable': False, 'data': { 'postion': Text(frame=Frame(x=149, y=3, w=142, h=140), text='1', format=TextFormat(fontSize=96, align='center', pos='center', colour=PgEss.colour.white)), 'nickname': Text(frame=Frame(x=316, y=3, w=670, h=140), text='Demo', format=TextFormat(fontSize=96, align='left', pos='center', colour=PgEss.colour.white)), 'days': Text(frame=Frame(x=1210, y=3, w=379, h=140), text='100', suffix=' days', format=TextFormat(fontSize=96, align='right', pos='center', colour=PgEss.colour.white)), } }, }, })
################## 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' }) } } })
end_game_screen = Screen( name='end_game', main=end_game, firstLoad=[], surfaces={ 'gameover': { '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) }, 'action': Switchscreen(type='load', screen='new_game') }, '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') }, 'leaderboard': { 'type': 'object', 'frame': Frame(x=462, y=443, w=876, h=111), 'imageData': { 'frame': Frame(x=462, y=443, w=876, h=111) }, 'action': Runclass(run=end_game.textfield_selected), 'data': { 'rankid': '', 'postion': Text(editable=False, frame=Frame(x=465, y=443, w=105, h=111), text='1', format=TextFormat(fontSize=68, align='center', pos='center', colour=PgEss.colour.white)), 'nickname': Text( frame=Frame(x=573, y=443, w=497, h=111), text='Demo', format=TextFormat(fontSize=68, align='left', pos='center', colour=PgEss.colour.white), validation=TextValidate( regex='[\w\s]{1,16}', invalidPrompt= 'Player nickname should be between 1 and 16 character\'s long.' )), 'days': Text(editable=False, frame=Frame(x=1073, y=443, w=236, h=111), text='100', suffix=' days', format=TextFormat(fontSize=68, align='right', pos='center', colour=PgEss.colour.white)), } } } })
new_game_screen = Screen ( name = 'new_game', main = new_game, keyboard = { 'back': { 'keys': [27], 'action': Switchscreen(type='back', screen='mainmenu') } }, surfaces = { 'options': { '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 }, 'nickname': { 'type': 'textfield', 'frame': Frame(x=747, y=341, w=925, h=140), 'imageData': {'frame': Frame(x=747, y=341, w=925, h=140)}, 'action': Runclass(run=new_game.textfield_selected), 'data': { 'text': Text ( frame = Frame(x=747, y=341, w=925, h=140), text = 'Benedict', format = TextFormat(fontSize=116, align='center', pos='center', colour=PgEss.colour.white), validation = TextValidate(regex='[\w\s]{1,16}', invalidPrompt='Player nickname should be between 1 and 16 character\'s long.') ), }, }, 'difficulty': { 'type': 'text', 'frame': Frame(x=1008, y=636, w=405, h=140), 'imageData': {'frame': Frame(x=1008, y=636, w=405, h=140)}, 'selectable': False, 'data': { 'index': 0, 'mode': Text ( frame = Frame(x=1008, y=636, w=405, h=140), text = 'Easy', format = TextFormat(fontSize=116, align='center', pos='center', colour=PgEss.colour.white) ), }, }, 'back': { 'type': 'button', 'frame': Frame(x=747, y=875, w=271, h=140), 'imageData': {'frame': Frame(x=747, y=875, w=271, h=140)}, 'action': Switchscreen(type='back', screen='mainmenu') }, 'play': { 'type': 'button', 'frame': Frame(x=1143, y=875, w=530, h=140), 'imageData': {'frame': Frame(x=1143, y=875, w=530, h=140)}, 'action': Runclass(run=PlayerData.new) }, 'difficulty_back': { 'type': 'button', 'frame': Frame(x=916, y=660, w=92, h=92), 'imageData': {'frame': Frame(x=747, y=636, w=260, h=92)}, 'action': Runclass(run=Difficulty.updateName, parameters={'index': -1}) }, 'difficulty_next': { 'type': 'button', 'frame': Frame(x=1412, y=660, w=92, h=92), 'imageData': {'frame': Frame(x=1412, y=636, w=260, h=92)}, 'action': Runclass(run=Difficulty.updateName, parameters={'index': 1}) } }, } )
saves_screen = Screen ( name = 'saves', main = saves, keyboard = { 'back': { 'keys': [27], 'action': Switchscreen(type='back', screen='mainmenu') }, 'page_back': { 'keys': [1073741904], 'action': Runclass(run=PlayerSaves.updateList, parameters={'page': -1}) }, 'page_next': { 'keys': [1073741903], 'action': Runclass(run=PlayerSaves.updateList, parameters={'page': 1}) }, }, surfaces = { 'board': { 'frame': Frame(x=0, y=0, w=1800, h=1080), 'alpha': True, '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') }, 'page_text': { 'type': 'text', 'frame': Frame(x=769, y=974, w=262, h=75), 'imageData': {'frame': Frame(x=769, y=974, w=262, h=106)}, 'selectable': False, 'data': { 'pages': Text ( frame = Frame(x=769, y=974, w=262, h=75), prefix = '1', text = ' / ', suffix = '10', format = TextFormat(fontSize=68, align='center', pos='center', colour=PgEss.colour.white) ), } }, 'page_back': { 'type': 'button', 'frame': Frame(x=729, y=984, w=57, h=40), 'imageData': {'frame': Frame(x=729, y=984, w=96, h=40)}, 'action': Runclass(run=PlayerSaves.updateList, parameters={'page': -1}) }, 'page_next': { 'type': 'button', 'frame': Frame(x=1031, y=984, w=57, h=40), 'imageData': {'frame': Frame(x=1031, y=984, w=96, h=40)}, 'action': Runclass(run=PlayerSaves.updateList, parameters={'page': 1}) }, 'delete_all': { 'type': 'button', 'frame': Frame(x=1528, y=58, w=132, h=103), 'imageData': {'frame': Frame(x=1528, y=58, w=132, h=103)}, 'action': Alert ( type='confirm', title='Delete All', content='Are you sure you want to delete all saves?', yes=Runclass(run=PlayerSaves.deleteAll) ), } }, 'list_1': { 'frame': Frame(x=0, y=220, w=1800, h=168), 'file': { 'type': 'text', 'frame': Frame(x=181, y=3, w=660, h=140), 'imageData': {'frame': Frame(x=181, y=3, w=660, h=140)}, 'selectable': False, 'data': { 'fileid': '', 'nickname': Text ( frame = Frame(x=181, y=3, w=576, h=140), text = 'Ben 10', format = TextFormat(fontSize=96, align='left', pos='center', colour=PgEss.colour.white) ), 'date': Text ( frame = Frame(x=794, y=3, w=576, h=140), text = '20/12/2020 10:23pm', format = TextFormat(fontSize=62, align='right', pos='center', colour=PgEss.colour.white) ), } }, 'delete': { 'type': 'button', 'frame': Frame(x=1429, y=22, w=100, h=100), 'imageData': {'frame': Frame(x=1429, y=3, w=100, h=100)}, 'action': Alert ( type='confirm', title='Deleted Saved', content='Are you sure you want to delete the savefile?', yes=Runclass(run=PlayerSaves.deleteSaved, parameters={'number': 1}) ), }, 'play': { 'type': 'button', 'frame': Frame(x=1532, y=22, w=100, h=100), 'imageData': {'frame': Frame(x=1532, y=3, w=100, h=100)}, 'action': Runclass(run=PlayerSaves.playSaved, parameters={'number': 1}) }, }, 'list_2': { 'frame': Frame(x=0, y=404, w=1800, h=168), 'file': { 'type': 'text', 'frame': Frame(x=181, y=3, w=660, h=140), 'imageData': {'frame': Frame(x=181, y=3, w=660, h=140)}, 'selectable': False, 'data': { 'fileid': '', 'nickname': Text ( frame = Frame(x=181, y=3, w=576, h=140), text = 'Ben 10', format = TextFormat(fontSize=96, align='left', pos='center', colour=PgEss.colour.white) ), 'date': Text ( frame = Frame(x=794, y=3, w=576, h=140), text = '20/12/2020 10:23pm', format = TextFormat(fontSize=62, align='right', pos='center', colour=PgEss.colour.white) ), } }, 'delete': { 'type': 'button', 'frame': Frame(x=1429, y=22, w=100, h=100), 'imageData': {'frame': Frame(x=1429, y=3, w=100, h=100)}, 'action': Alert ( type='confirm', title='Deleted Saved', content='Are you sure you want to delete the savefile?', yes=Runclass(run=PlayerSaves.deleteSaved, parameters={'number': 2}) ), }, 'play': { 'type': 'button', 'frame': Frame(x=1532, y=22, w=100, h=100), 'imageData': {'frame': Frame(x=1532, y=3, w=100, h=100)}, 'action': Runclass(run=PlayerSaves.playSaved, parameters={'number': 2}) }, }, 'list_3': { 'frame': Frame(x=0, y=588, w=1800, h=168), 'file': { 'type': 'text', 'frame': Frame(x=181, y=3, w=660, h=140), 'imageData': {'frame': Frame(x=181, y=3, w=660, h=140)}, 'selectable': False, 'data': { 'fileid': '', 'nickname': Text ( frame = Frame(x=181, y=3, w=576, h=140), text = 'Ben 10', format = TextFormat(fontSize=96, align='left', pos='center', colour=PgEss.colour.white) ), 'date': Text ( frame = Frame(x=794, y=3, w=576, h=140), text = '20/12/2020 10:23pm', format = TextFormat(fontSize=62, align='right', pos='center', colour=PgEss.colour.white) ), } }, 'delete': { 'type': 'button', 'frame': Frame(x=1429, y=22, w=100, h=100), 'imageData': {'frame': Frame(x=1429, y=3, w=100, h=100)}, 'action': Alert ( type='confirm', title='Deleted Saved', content='Are you sure you want to delete the savefile?', yes=Runclass(run=PlayerSaves.deleteSaved, parameters={'number': 3}) ), }, 'play': { 'type': 'button', 'frame': Frame(x=1532, y=22, w=100, h=100), 'imageData': {'frame': Frame(x=1532, y=3, w=100, h=100)}, 'action': Runclass(run=PlayerSaves.playSaved, parameters={'number': 3}) }, }, 'list_4': { 'frame': Frame(x=0, y=772, w=1800, h=168), 'file': { 'type': 'text', 'frame': Frame(x=181, y=3, w=660, h=140), 'imageData': {'frame': Frame(x=181, y=3, w=660, h=140)}, 'selectable': False, 'data': { 'fileid': '', 'nickname': Text ( frame = Frame(x=181, y=3, w=576, h=140), text = 'Ben 10', format = TextFormat(fontSize=96, align='left', pos='center', colour=PgEss.colour.white) ), 'date': Text ( frame = Frame(x=794, y=3, w=576, h=140), text = '20/12/2020 10:23pm', format = TextFormat(fontSize=62, align='right', pos='center', colour=PgEss.colour.white) ), } }, 'delete': { 'type': 'button', 'frame': Frame(x=1429, y=22, w=100, h=100), 'imageData': {'frame': Frame(x=1429, y=3, w=100, h=100)}, 'action': Alert ( type='confirm', title='Deleted Saved', content='Are you sure you want to delete the savefile?', yes=Runclass(run=PlayerSaves.deleteSaved, parameters={'number': 4}) ), }, 'play': { 'type': 'button', 'frame': Frame(x=1532, y=22, w=100, h=100), 'imageData': {'frame': Frame(x=1532, y=3, w=100, h=100)}, 'action': Runclass(run=PlayerSaves.playSaved, parameters={'number': 4}) }, }, } )
shop_screen = Screen ( name = 'shop', main = shop, keyboard = { 'back': { 'keys': [27], 'action': Switchscreen(type='back') } }, surfaces = { 'store': { 'frame': Frame(x=0, y=0, w=1800, h=1080), 'back': { 'type': 'button', 'frame': Frame(x=70, y=50, w=132, h=103), 'imageData': {'frame': Frame(x=70, y=50, w=132, h=103)}, 'action': Switchscreen(type='back') }, 'stats': { 'type': 'text', 'frame': Frame(x=1075, y=0, w=725, h=270), 'imageData': {'frame': Frame(x=1075, y=0, w=725, h=270)}, 'data': { 'damage': Text ( frame = Frame(x=1414, y=81, w=307, h=59), prefix = 'Damage: ', text = '2 - 4', format = TextFormat(fontSize=52, align='left', pos='center', colour=PgEss.colour.red) ), 'defence': Text ( frame = Frame(x=1414, y=140, w=307, h=59), prefix = 'Defence: ', text = '1', format = TextFormat(fontSize=52, align='left', pos='center', colour=PgEss.colour.blue) ), 'health': Text ( frame = Frame(x=1099, y=81, w=307, h=59), prefix = 'Health: ', text = '20/20', format = TextFormat(fontSize=52, align='left', pos='center', colour=PgEss.colour.green) ), 'elixir': Text ( frame = Frame(x=1099, y=140, w=307, h=59), prefix = 'Elixir: ', text = '10', format = TextFormat(fontSize=52, align='left', pos='center', colour=PgEss.colour.purple) ), }, }, 'shield': { 'type': 'button', 'frame': Frame(x=609, y=301, w=527, h=300), 'imageData': {'frame': Frame(x=609, y=301, w=527, h=300)}, 'overlayDataFrame': True, 'action': Runclass(run=Store.checkBuy, parameters={'weapon': 'shield'}), 'data': { 'object': Text ( frame = Frame(x=120, y=25, w=237, h=83), text = 'Shield', format = TextFormat(fontSize=76, align='left', pos='center', colour=PgEss.colour.white) ), 'price': Text ( frame = Frame(x=357, y=33, w=83, h=69), text = '20', format = TextFormat(fontSize=62, align='right', pos='center', colour=PgEss.colour.purple) ), 'gain_1': Text ( frame = Frame(x=25, y=112, w=349, h=75), prefix = 'Defence: ', text = '+ 2', format = TextFormat(fontSize=68, align='left', pos='center', colour=PgEss.colour.blue) ), 'gain_2': Text ( frame = Frame(x=25, y=185, w=349, h=75), prefix = 'Damage: ', text = '+ 1', format = TextFormat(fontSize=68, align='left', pos='center', colour=PgEss.colour.red) ), } }, 'sword': { 'type': 'button', 'frame': Frame(x=1194, y=301, w=527, h=300), 'imageData': {'frame': Frame(x=1194, y=301, w=527, h=300)}, 'overlayDataFrame': True, 'action': Runclass(run=Store.checkBuy, parameters={'weapon': 'sword'}), 'data': { 'object': Text ( frame = Frame(x=120, y=25, w=237, h=83), text = 'Sword', format = TextFormat(fontSize=76, align='left', pos='center', colour=PgEss.colour.white) ), 'price': Text ( frame = Frame(x=357, y=33, w=83, h=69), text = '20', format = TextFormat(fontSize=62, align='right', pos='center', colour=PgEss.colour.purple) ), 'gain_1': Text ( frame = Frame(x=25, y=112, w=349, h=75), prefix = 'Defence: ', text = '+ 2', format = TextFormat(fontSize=68, align='left', pos='center', colour=PgEss.colour.blue) ), 'gain_2': Text ( frame = Frame(x=25, y=185, w=349, h=75), prefix = 'Damage: ', text = '+ 1', format = TextFormat(fontSize=68, align='left', pos='center', colour=PgEss.colour.red) ), } }, 'armour': { 'type': 'button', 'frame': Frame(x=609, y=666, w=527, h=300), 'imageData': {'frame': Frame(x=609, y=666, w=527, h=300)}, 'overlayDataFrame': True, 'action': Runclass(run=Store.checkBuy, parameters={'weapon': 'armour'}), 'data': { 'object': Text ( frame = Frame(x=120, y=25, w=237, h=83), text = 'Armour', format = TextFormat(fontSize=76, align='left', pos='center', colour=PgEss.colour.white) ), 'price': Text ( frame = Frame(x=357, y=33, w=83, h=69), text = '20', format = TextFormat(fontSize=62, align='right', pos='center', colour=PgEss.colour.purple) ), 'gain_1': Text ( frame = Frame(x=25, y=112, w=349, h=75), prefix = 'Defence: ', text = '+ 2', format = TextFormat(fontSize=68, align='left', pos='center', colour=PgEss.colour.blue) ), 'gain_2': Text ( frame = Frame(x=25, y=185, w=349, h=75), prefix = 'Damage: ', text = '+ 1', format = TextFormat(fontSize=68, align='left', pos='center', colour=PgEss.colour.red) ), } }, 'potion': { 'type': 'button', 'frame': Frame(x=1194, y=666, w=527, h=300), 'imageData': {'frame': Frame(x=1194, y=666, w=527, h=300)}, 'overlayDataFrame': True, 'action': Runclass(run=Store.checkBuy, parameters={'weapon': 'potion'}), 'data': { 'object': Text ( frame = Frame(x=120, y=25, w=237, h=83), text = 'Potion', format = TextFormat(fontSize=76, align='left', pos='center', colour=PgEss.colour.white) ), 'price': Text ( frame = Frame(x=357, y=33, w=83, h=69), text = '20', format = TextFormat(fontSize=62, align='right', pos='center', colour=PgEss.colour.purple) ), 'gain_1': Text ( frame = Frame(x=25, y=112, w=349, h=75), prefix = 'Defence: ', text = '+ 2', format = TextFormat(fontSize=68, align='left', pos='center', colour=PgEss.colour.blue) ), 'gain_2': Text ( frame = Frame(x=25, y=185, w=349, h=75), prefix = 'Damage: ', text = '+ 1', format = TextFormat(fontSize=68, align='left', pos='center', colour=PgEss.colour.red) ), } }, } } )
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) }, 'action': Switchscreen(type='load', screen='leaderboard') }, 'credits': { 'type': 'button', 'frame': Frame(x=878, y=875, w=652, h=134), 'imageData': { 'frame': Frame(x=878, y=875, w=652, h=134) }, 'action': Switchscreen(type='load', screen='credit') }, 'quit': { 'type': 'button', 'frame': Frame(x=1705, y=986, w=84, h=84), 'imageData': { 'frame': Frame(x=1690, y=975, w=110, h=105) }, 'action': Alert(type='confirm', title='Quit Game', content='Are you sure you want to quit?', yes=Info(text='quit')), }, } })