コード例 #1
0
    def onInit(self):
        self.config.options('float', {'update': 0.2, 'average': 1})
        self.config.option('size', 16, 'int')
        self.config.option('color', 0xffffff00, 'color')
        self.config.option('res_size', 12, 'int')
        self.config.option('res_color', 0xffffffff, 'color')
        self.config.option('res_warning', 0xffff0000, 'color')

        self.times = array.array('d')
        self.lastupd = self.prevt = time.perf_counter()
        self.txt = util.PlainText(font='HemiHeadBold')
        self.res = util.PlainText(font='HemiHeadBold')
        self._oldres = 0
コード例 #2
0
ファイル: hud.py プロジェクト: ursi/sbpe
    def onInit(self):
        self.config.options(
            'int', {
                'x': 100,
                'y': 20,
                'size_hp': 42,
                'size_hpmax': 24,
                'size_ammo': 20,
                'size_ammomax': 20,
                'size_currency': 16,
                'outline': 3,
                'spacing': 0,
                'bar_width': 90,
                'bar_height': 4,
                'bar_y': 10
            })
        self.config.options(
            'color', {
                'color_hp': 0xffffffff,
                'color_hp_full': 0xff00ff00,
                'color_ammo': 0xffffff00,
                'color_currency': 0xff9999ff,
                'bar_background': 0xff000000,
                'bar_outline': 0xff808080,
                'bar_color': 0xff0afde1,
                'bar_notches': 0xffffffff,
            })

        for name in ELEMS:
            setattr(self, 'txt_' + name, util.PlainText(font='HemiHeadBold'))

        self.draw = False
コード例 #3
0
    def onInit(self):
        num = ffi.new('int *')
        self.keyStates = lib.SDL_GetKeyboardState(num)
        self.numKeys = num[0]
        self.oldKeys = ffi.new('uint8_t[]', self.numKeys)

        self.updateBinds()

        self.config.option('info_time', 2, 'float')
        self.info = util.PlainText(size=16)
        self.last_change = 0
コード例 #4
0
    def onInit(self):
        self.config.option('trigger_color', 0xffff00ff, 'color')
        self.config.option('trigger_frame', 3, 'int')

        self.config.option('arrows', '', 'str')

        for opt in OPTS:
            self.config.option('arrows_' + opt[0], opt[1], opt[2])

        self.config.option('show_hp', False, 'bool')
        self.config.option('show_uses', True, 'bool')
        self.config.option('show_room_id', True, 'bool')

        self._initedopts = False
        self.numbers = util.NumberDict(size=32, color=0xffff80)
        self.negnumbers = util.NumberDict(size=16, color=0x8080ff)
        self.roomtxt = util.PlainText(size=16)
コード例 #5
0
    def onInit(self):
        self.config.options('bool', {
            'hide_shells': False,
            'hide_names': False,
            'hide_factions': False,
            'hide_healthbars': False,
            'hide_ally_objects': False,
            'hide_effects': False,
        })
        self.config.option('damage_flash_intensity', 1, 'float')

        self.hidden = set()
        self.oldbits = []

        self.config.option('replace_shake', True, 'bool')
        self._shake = 0
        self._flash = 0
        self.shaketxt = util.PlainText(size=30, color=0xffffff00)
コード例 #6
0
    def onInit(self):

        self.config.option('show_room_seed', True, 'bool')

        self.roomseed = util.PlainText(size=90)
        self.oldseed = 0
コード例 #7
0
ファイル: version.py プロジェクト: ursi/sbpe
 def onInit(self):
     self.vtxt = util.PlainText(size=16, font='HemiHeadBold')