Esempio n. 1
0

class white(_ResourceDesc):
    __slots__ = ('name', )

    def load(self, loader):
        atlas = get_atlas()
        white = atlas.add(pyglet.image.ImageData(4, 4, 'RGBA', '\xFF'*64))
        c = white.tex_coords
        f = c[0:3]; t = c[6:9]
        white.tex_coords = ((f[0] + t[0]) / 2, (f[1] + t[1]) / 2, 0) * 4
        return white


resource = Resource(respath, [
    bgm('bgm_hall'),

    lazytexture('bg_login'),
    lazytexture('bg_gamehall'),
    lazytexture('bg_ingame'),
    lazytexture('worldmap'),
    lazytexture('worldmap_shadow'),
    lazytexture('bg_gamelist'),
    lazytexture('bg_eventsbox'),
    lazytexture('bg_chatbox'),

    img('imagesel_shine'),
    imgdata('icon'),

    img('speaker'),
    img('speaker_off'),
Esempio n. 2
0
from client.ui.resloader import Resource, _ResourceDesc, anim, bgm, img, img_grid, img_with_grayed, sound, subdir, texture, define_atlas, lazytexture, encrypted_texture
import os

respath = os.path.join(os.path.dirname(__file__), 'res')
define_atlas('portrait', (1024, 2048))


class ui_meta(_ResourceDesc):
    __slots__ = ('name', )

    def load(self, loader):
        import gamepack.thb.ui.ui_meta  # noqa


resource = Resource(respath, [
    bgm('bgm_game'),

    [img_with_grayed('thblogo_' + i) for i in [
        '3v3', '8id', '5id', 'kof', 'raid', 'faith',
    ]],

    img('win'), img('lose'),
    anim('hurt', [50, 50, 50, 50, 200, 30, 30, 30, 30, 2000]),

    [img('card_' + i, 'card') for i in [
        'shinesoft', 'hidden', 'question', 'showncardtag',

        'attack', 'graze', 'heal', 'demolition', 'reject', 'sealarray',
        'nazrinrod', 'opticalcloak', 'greenufo', 'redufo', 'sinsack',
        'yukaridimension', 'duel', 'sinsackcarnival', 'mapcannon',
        'hakurouken', 'reactor', 'umbrella', 'roukanken', 'gungnir',