Ejemplo n.º 1
0
def NewMusicFile():
    global track_list

    track_list = UI.TrackList()
    del track_list
    tge.Utils.GarbageCollector_Collect()

    # -- Unload the Current SoundCahce -- #
    UI.ContentManager.UnloadSoundTuneCache()

    # -- Update Tittlebar -- #
    var.ProcessReference.TITLEBAR_TEXT = "OneTrack v{0}".format(
        var.ProcessReference.DefaultContents.Get_RegKey("/version"))

    track_list = UI.TrackList()
    track_list.Rectangle = pygame.Rect(0, 100, Core.MAIN.ScreenWidth,
                                       Core.MAIN.ScreenHeight - 200)

    var.BPM = 150
    var.Rows = 32
    var.GenerateSoundCache = True
    var.SelectedTrack = 0
    var.Highlight = 4
    var.HighlightSecond = 16
    var.Patterns = 2

    OptionsBar.UpdateChanger()
    OptionsBar.Update()

    var.ProcessReference.DefaultContents.Write_RegKey(
        "/dialog/imported_older_version/show_once", "False")
Ejemplo n.º 2
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()