本文整理汇总了Python中fsgs.platform.PlatformHandler.get_platform_ids方法的典型用法代码示例。如果您正苦于以下问题:Python PlatformHandler.get_platform_ids方法的具体用法?Python PlatformHandler.get_platform_ids怎么用?Python PlatformHandler.get_platform_ids使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fsgs.platform.PlatformHandler
的用法示例。
在下文中一共展示了PlatformHandler.get_platform_ids方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: show
# 需要导入模块: from fsgs.platform import PlatformHandler [as 别名]
# 或者: from fsgs.platform.PlatformHandler import get_platform_ids [as 别名]
def show():
global current_menu
# fade_from is used on init_display, so we initialize this
# color here. Set alpha to 2.0 to force 1 second of solid
# color in combination with 2 sec. animation below
if False and windows and not Settings.fullscreen_menu:
State.get().fade_from = (1.0, 1.0, 1.0, 2.0)
State.get().fade_to = (1.0, 1.0, 1.0, 0.0)
else:
State.get().fade_from = (0.0, 0.0, 0.0, 2.0)
State.get().fade_to = (0.0, 0.0, 0.0, 0.0)
init_display()
if LIGHTING:
init_lighting()
init_textures()
init_fonts()
if USE_MENU_TRANSITIONS:
compile_programs()
InputHandler.open()
on_resize((Render.get().display_width, Render.get().display_height))
image_loader = ImageLoader.get()
image_loader.start()
new_menu = create_main_menu()
State.get().history.append(new_menu)
for platform_id in PlatformHandler.get_platform_ids():
if "--" + platform_id in sys.argv:
platform_menu = ItemMenu()
platform_menu.parent_menu = new_menu
platform_item = PlatformItem(platform_id)
platform_menu.items.append(platform_item)
# platform_menu.set_selected_index(0, immediate=True)
new_menu = platform_item.activate(platform_menu)
print(new_menu)
State.get().history.append(new_menu)
break
set_current_menu(new_menu)
if len(new_menu) == 1:
# only n/a item showing, possibly
if len(AllMenuItem().activate(None)) == 0:
# no games, initiate game scan
rescan_games()
State.get().fade_start = get_current_time()
State.get().fade_end = get_current_time() + 2.000
# # make a timer so that update events are sent to modules at least once
# # every second
# pygame.time.set_timer(IDLE_EVENT, 1000)
State.get().start_time = get_current_time()