當前位置: 首頁>>代碼示例>>Python>>正文


Python PlatformHandler.get_platform_ids方法代碼示例

本文整理匯總了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()
開發者ID:EdwardBetts,項目名稱:fs-uae-launcher,代碼行數:60,代碼來源:window.py


注:本文中的fsgs.platform.PlatformHandler.get_platform_ids方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。