示例#1
0
def GameDraw(DISPLAY):
    global track_list
    global TopBarControls
    global DropDownFileMenu
    global LastScreenFrame

    if not var.DisableControls:
        if not var.FileMenuEnabled:
            DISPLAY.fill((UI.ThemesManager_GetProperty("BackgroundColor")))

            track_list.Render(DISPLAY)
            TopBarControls.Render(DISPLAY)

            OptionsBar.Draw(DISPLAY)
            EditorBar.Draw(DISPLAY)

            SoundCacheMessage.Draw(DISPLAY)

            LastScreenFrame = DISPLAY.copy()

        else:
            DISPLAY.blit(LastScreenFrame, (0, 0))

            TopBarControls.Render(DISPLAY)

            DropDownFileMenu.Render(DISPLAY)
示例#2
0
def EventUpdate(event):
    global track_list
    global TopBarControls
    global DropDownFileMenu

    if not var.DisableControls:
        if not var.FileMenuEnabled:
            track_list.EventUpdate(event)
            OptionsBar.EventUpdate(event)
            EditorBar.EventUpdate(event)

        DropDownFileMenu.EventUpdate(event)
        TopBarControls.EventUpdate(event)
示例#3
0
def Update():
    global track_list
    global TopBarControls
    global DropDownFileMenu

    SaveFileDialog.Update()
    OpenFileDialog.Update()

    if var.DisableControls:
        return

    TopBarControls.Update()
    UpdateTopBar()

    if var.FileMenuEnabled:
        DropDownFileMenu.Update()
        return

    track_list.Update()
    OptionsBar.Update()
    EditorBar.Update()
    SoundCacheMessage.Update()
示例#4
0
def Initialize():
    global track_list
    global TopBarControls
    global DropDownFileMenu

    # Add all widgets
    ButtonsList = list()
    ButtonsList.append(UI.Button(pygame.Rect(0, 0, 0, 0), "File", 14))
    TopBarControls = UI.ButtonsBar((3, 5, Core.MAIN.ScreenWidth, 32),
                                   ButtonsList)
    DropDownFileMenuList = (("Load", DropDownButtonsActions_LoadButton),
                            ("Save", DropDownButtonsActions_SaveButton),
                            ("New File", DropDownButtonsActions_NewFileButton),
                            ("About", DropDownButtonsActions_AboutButton),
                            ("Settings",
                             DropDownButtonsActions_SettingsButton))
    DropDownFileMenu = UI.DropDownMenu(pygame.Rect(10, 35, 120, 65),
                                       DropDownFileMenuList)

    OptionsBar.Initialize()
    EditorBar.Initialize()
    SoundCacheMessage.Initialize()

    NewMusicFile()