Example #1
0
    def initialize(self):

        text = TextComponent(self, self.text, self.color)
        self.add_component(text)

        border = BorderComponent(self)
        self.add_component(border)
Example #2
0
    def initialize(self):

        text = TextComponent(self, 'Pass')
        self.add_component(text)

        border = BorderComponent(self)
        self.add_component(border)
Example #3
0
    def initialize(self):

        c = BorderComponent(self)
        self.add_component(c)

        def build_func(building_id):
            def build():
                self.action.choose_build_action(building_id)

            return build

        BuildChoiceCard(self.ui, 0, 'Begin Palace Construction',
                        build_func(PALACE), self)
        BuildChoiceCard(self.ui, 1, 'Begin Ziggurat Construction',
                        build_func(ZIGGURAT), self)
        BuildChoiceCard(self.ui, 2, 'Construct Tower', build_func(TOWER), self)
        BuildChoiceCard(self.ui, 3, 'Construct Granary', build_func(GRANARY),
                        self)
Example #4
0
    def initialize(self):

        self.add_component(TextComponent(self, 'Construct'))
        self.add_component(BorderComponent(self))
Example #5
0
    def add_border_component(self, ui, key):

        element = ui.get_element(key)
        element.add_component(BorderComponent(element, style=1))