Пример #1
0
    def __init__(self, window, surface):
        MapTools.__init__(self, 0, 0)
        Drawable.__init__(self)
        self.window = window
        self.surface = surface
        self.accepted = False

        self.observed = set()
        self.tiles = []
        self.map = defaultdict(lambda: defaultdict(lambda: 'fog'))
        self.world_size = 0
        self.background = 'fog'
        self.main_tile = 'fog'
Пример #2
0
    def __init__(self, window, surface):
        MapTools.__init__(self, 0, 0)
        Drawable.__init__(self)
        self.window = window
        self.surface = surface
        self.accepted = False

        self.observed = set()
        self.tiles = []
        self.map = defaultdict(lambda: defaultdict(lambda: 'fog'))
        self.world_size = 0
        self.background = 'fog'
        self.main_tile = 'fog'
Пример #3
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 = []
Пример #4
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 = []
Пример #5
0
 def __init__(self, window, surface):
     Drawable.__init__(self)
     ViewTools.__init__(self, window, surface, dynamic_objects)
     self.focus_object = False
Пример #6
0
 def draw(self):
     self.title.draw()
     Drawable.draw(self)
Пример #7
0
 def __init__(self, window, surface):
     Drawable.__init__(self)
     ViewTools.__init__(self, window, surface, static_objects)
     GuiElement.__init__(self, surface)
     self.prev_hovered = False
Пример #8
0
 def draw(self):
     self.title.draw()
     Drawable.draw(self)
Пример #9
0
 def draw(self):
     x, y = self.get_shift().get()
     self.surface.draw_background(x, y, self.background)
     Drawable.draw(self)
Пример #10
0
 def draw(self):
     x,y = self.get_shift().get()
     self.surface.draw_background(x,y, self.background)
     Drawable.draw(self)
Пример #11
0
 def __init__(self, window, surface):
     Drawable.__init__(self)
     ViewTools.__init__(self, window, surface, dynamic_objects)
     self.focus_object = False