def __init__(self, surface): GuiElement.__init__(self, surface) self.y = 500 self.label = TextLabel(self.surface, self.template, self.x, self.y, 100) self.name, self.size = '', 0
def __init__(self, surface,): GuiElement.__init__(self, surface) x,y = 50, self.surface.height-50 with open(self.help_file, 'r') as hfile: self.help_text = hfile.read() self.label = TextLabel(self.surface, self.text, x,y, self.surface.width)
def __init__( self, surface, ): GuiElement.__init__(self, surface) x, y = self.surface.center.get() self.label = Label(self.surface, 'Waiting for server response', x, y)
def __init__( self, surface, ): GuiElement.__init__(self, surface) x, y = 50, self.surface.height - 50 with open(self.help_file, 'r') as hfile: self.help_text = hfile.read() self.label = TextLabel(self.surface, self.text, x, y, self.surface.width)
def __init__(self, surface): GuiElement.__init__(self, surface) Stat.y = 670 stat = partial(Stat, surface) self.hp = stat('hp: %.2f/%d') self.kills = stat('kills: %s') self.speed = stat('speed: %s') self.deaths = stat('deaths: %s') self.damage = stat('damage: %s') self.gold = stat('gold: %s') self.skills = stat('skills: %s') self.invisible = stat('invisible: %s')
def __init__(self, surface): GuiElement.__init__(self, surface) Drawable.__init__(self) self.slots = {} self.key_to_num = {k:i+1 for i,k in enumerate(self.control_keys)} self.x = 100 self.y = 300 self.dy = 40 self.tilenames = {} for item_type_name in dir(item_types): item_type = getattr(item_types, item_type_name) if hasattr(item_type, 'tilename'): tilename = item_type.tilename type_name = item_type.__name__ self.tilenames[type_name] = tilename self.title = Label(self.surface, 'Equipment:', self.x, self.y) self.tiles = []
def __init__(self, surface): GuiElement.__init__(self, surface) Drawable.__init__(self) self.slots = {} self.key_to_num = {k: i + 1 for i, k in enumerate(self.control_keys)} self.x = 100 self.y = 300 self.dy = 40 self.tilenames = {} for item_type_name in dir(item_types): item_type = getattr(item_types, item_type_name) if hasattr(item_type, 'tilename'): tilename = item_type.tilename type_name = item_type.__name__ self.tilenames[type_name] = tilename self.title = Label(self.surface, 'Equipment:', self.x, self.y) self.tiles = []
def __init__(self, surface,): GuiElement.__init__(self, surface) x,y = self.surface.center.get() self.label = Label(self.surface,'Waiting for server response', x,y)
def __init__(self, surface): GuiElement.__init__(self, surface) self.x = 100 self.y = 400 self.title = Label(self.surface, 'Online:', self.x, self.y) self.plist = []
def __init__(self, window, surface): Drawable.__init__(self) ViewTools.__init__(self, window, surface, static_objects) GuiElement.__init__(self, surface) self.prev_hovered = False