Esempio n. 1
0
    def __init__(self, view):
        self.view = view
        self.fc = None

        self.__perf_window = psw.PerfStatsWindow()
        self.__settings_vc = tbvc.TabBarVC(stw.SettingsTabbedWindow(), 
            tab_change_event=common.constants.EVENT_SETTINGS_TAB_SEL_CHANGED)
        self.__settings_vc.push_child("Video", vsvc.VideoSettingsVC(vsw.VideoSettingsWindow()))
        self.__settings_vc.push_child("Game", gsvc.GameSettingsVC(gsw.GameSettingsWindow()))
        self.__settings_shown = False
        self.__session_window = sw.SessionWindow()
Esempio n. 2
0
    def __init__(self, view):
        self.__view = view
        self.__perf_view = psw.PerfStatsWindow()
        self.__settings_vc = tbvc.TabBarVC(stw.SettingsTabbedWindow(), 
            tab_change_event=common.constants.EVENT_SETTINGS_TAB_SEL_CHANGED)
        self.__settings_vc.push_child("Video", vsvc.VideoSettingsVC(vsw.VideoSettingsWindow()))
        self.__settings_vc.push_child("Game", gsvc.GameSettingsVC(gsw.GameSettingsWindow()))
        self.__settings_shown = False

        self.__view.fac_names = [fac["name"] for fac in pf.get_factions_list()]
        assert len(self.__view.fac_names) > 0
        if len(self.__view.fac_names) >= 2:
            self.__view.active_fac_idx = 1
        else:
            self.__view.active_fac_idx = 0
Esempio n. 3
0
minimap_pos = pf.get_minimap_position()
pf.set_minimap_position(UI_LEFT_PANE_WIDTH + minimap_pos[0], minimap_pos[1])

pf.disable_unit_selection()
pf.disable_fog_of_war()

pf.add_faction(DEFAULT_FACTION_NAME, DEFAULT_FACTION_COLOR)
mouse_events.install()

############################################################
# Setup UI                                                 #
############################################################

terrain_tab_vc = ttvc.TerrainTabVC(ttw.TerrainTabWindow())
objects_tab_vc = otvc.ObjectsVC(otw.ObjectsTabWindow())
diplo_tab_vc = dtvc.DiplomacyVC(dtw.DiplomacyTabWindow())

tab_bar_vc = tbvc.TabBarVC(tbw.TabBarWindow(), EVENT_TOP_TAB_SELECTION_CHANGED)
tab_bar_vc.push_child("Terrain", terrain_tab_vc)
tab_bar_vc.push_child("Objects", objects_tab_vc)
tab_bar_vc.push_child("Diplomacy", diplo_tab_vc)
tab_bar_vc.activate()
tab_bar_vc.view.show()

menu = mw.Menu()
menuvc = mvc.MenuVC(menu)
menuvc.activate()

mb = mw.MenuButtonWindow(menu)
mb.show()