コード例 #1
0
 public void ReloadCurrentPlaylistBrowser()
 {
     currentPlaylistBrowser.ResetCursorX();
     currentPlaylistBrowser.CurrentList = controller.CurrentSongsToString;
     currentPlaylistBrowser.GetFileNames();
     currentPlaylistBrowser.Draw();
 }
コード例 #2
0
    void OnGUI()
    {
        if (active)
        {
            if (fb.showConfirm)
            {
                GUI.BeginGroup(new Rect((Screen.width + 300) / 2, (Screen.height - 100) / 2, 200, 100));

                GUI.Box(new Rect(0, 0, 200, 100), "");
                GUI.Label(new Rect(10, 10, 200, 100), "Do you want to save?");
                if (GUI.Button(new Rect(30, 40, 60, 30), "Cancel"))
                {
                    fb.showConfirm = false;
                }
                ;
                if (GUI.Button(new Rect(100, 40, 60, 30), "Save"))
                {
                    fb.SaveFile();
                    fb.showConfirm = false;
                    ToggleFileBrowser();
                }
                ;
                GUI.EndGroup();
            }
            if (fb.showExit)
            {
                GUI.BeginGroup(new Rect((Screen.width + 200) / 2, (Screen.height - 100) / 2, 200, 100));

                GUI.Box(new Rect(0, 0, 200, 100), "");
                GUI.Label(new Rect(10, 10, 200, 100), "Do you want to Exit?");
                if (GUI.Button(new Rect(30, 40, 60, 30), "Cancel"))
                {
                    fb.showExit = false;
                }
                ;
                if (GUI.Button(new Rect(100, 40, 60, 30), "Exit"))
                {
                    fb.showExit = false;
                    ToggleFileBrowser();
                }
                ;

                GUI.EndGroup();
            }



            if (fb.Draw())
            { //true is returned when a file has been selected
              //the output file is a member if the FileInfo class, if cancel was selected the value is null

                //output = (fb.outputFile == null) ? "cancel hit" : fb.outputFile.ToString();
                //gameObject.SetActive(false);
            }
        }
    }
コード例 #3
0
ファイル: LoadMenu.cs プロジェクト: papakaliati/ConsoleDraw
        private void UpdateFileTypeFilter()
        {
            var filter        = FileTypes.FirstOrDefault(x => x.Value == fileTypeDropdown.Text);
            var currentFilter = FileTypes.FirstOrDefault(x => x.Key == fileSelect.FilterByExtension);

            if (currentFilter.Key != filter.Key)
            {
                fileSelect.FilterByExtension = filter.Key;
                fileSelect.GetFileNames();
                fileSelect.Draw();
            }
        }
コード例 #4
0
 public void ReloadLibraryBrowser()
 {
     libraryBrowser.CurrentList = controller.LibrariesToString;
     libraryBrowser.GetFileNames();
     libraryBrowser.Draw();
 }
コード例 #5
0
 public void ReloadPlaylistsBrowser()
 {
     playlistsBrowser.CurrentList = controller.PlaylistsToString;
     playlistsBrowser.GetFileNames();
     playlistsBrowser.Draw();
 }