コード例 #1
0
    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
コード例 #2
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)
コード例 #3
0
    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)
コード例 #4
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)
コード例 #5
0
    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')
コード例 #6
0
    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')
コード例 #7
0
 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 = []
コード例 #8
0
    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 = []
コード例 #9
0
    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
コード例 #10
0
 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)
コード例 #11
0
 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 = []
コード例 #12
0
 def __init__(self, window, surface):
     Drawable.__init__(self)
     ViewTools.__init__(self, window, surface, static_objects)
     GuiElement.__init__(self, surface)
     self.prev_hovered = False
コード例 #13
0
 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 = []