Beispiel #1
0
# Screen objects #
##################
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': {
Beispiel #2
0
         '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)
             },
Beispiel #3
0
        # No action
        if event_result == None: return
        # Quit program
        if event_result.contains('outcome', 'quit'): return 'quit'


##################
# 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)
Beispiel #4
0
                    end_game.rankColour()

        # Quit program
        if event_result.contains('outcome', 'quit'): return 'quit'


##################
# Screen objects #
##################
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')
Beispiel #5
0
# Screen objects #
##################
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),
Beispiel #6
0
            '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),
Beispiel #7
0
# Screen objects #
##################
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',
Beispiel #8
0
        # No action
        if event_result == None: return
        # Quit program
        if event_result.contains('outcome', 'quit'): return 'quit'


##################
# 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')