def setup_scene(): pf.set_ambient_light_color((1.0, 1.0, 1.0)) pf.set_emit_light_color((1.0, 1.0, 1.0)) pf.set_emit_light_pos((1664.0, 1024.0, 384.0)) pf.disable_fog_of_war() pf.load_map("assets/maps", "plain.pfmap") pf.add_faction("RED", (255, 0, 0, 255)) pf.add_faction("BLUE", (0, 0, 255, 255)) pf.set_diplomacy_state(0, 1, pf.DIPLOMACY_STATE_WAR) pf.set_faction_controllable(0, False) pf.set_faction_controllable(1, False)
############################################################ # Global settings # ############################################################ pf.set_ambient_light_color((1.0, 1.0, 1.0)) pf.set_emit_light_color((1.0, 1.0, 1.0)) pf.set_emit_light_pos((1664.0, 1024.0, 384.0)) pf.set_active_font("OptimusPrinceps.ttf") pf.new_game_string(globals.active_map.pfmap_str(), update_navgrid=False) 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)