Ejemplo n.º 1
0
 private bool LFRecursiveDraw(List <TreeViewItem> sis, ref int iter)
 {
     foreach (LogicFolderTreeViewItem child in sis)
     {
         TextureString ts = child.TextureString;
         if (iter >= 0)
         {
             if (child == lfTreeView.SelectedItem)
             {
                 logicInfoSelection.RectangleHeight = ts.CharacterHeight + gapY;
                 logicInfoSelection.RectangleWidth  = ts.JustWidth;
                 logicInfoSelection.Position        = ts.Position;
                 logicInfoSelection.Update();
                 logicInfoSelection.Draw();
             }
             ts.Draw();
             if (!child.LogicFolderInfo.IsFolder)
             {
                 score.Position = new Vector2(ts.Position.X - 20, ts.Position.Y - 2);
                 score.Update();
                 score.Draw();
             }
             else
             {
                 folder.Position = new Vector2(ts.Position.X - 20, ts.Position.Y);
                 folder.Update();
                 folder.Draw();
             }
             if (child == cutOrCopylftvi)
             {
                 /*GraphicsUtility.DrawLine(new Vector2(ts.Position.X - 20, ts.Position.Y + ts.CharacterHeight + gapY),
                  *  new Vector2(ts.Position.X + ts.JustWidth, ts.Position.Y + ts.CharacterHeight + gapY),
                  *  PPDColors.White, 0.5f, cut ? GraphicsUtility.LineMode.Dashed : GraphicsUtility.LineMode.Solid, white);*/
             }
         }
         iter++;
         if (iter >= maxHeightNumber)
         {
             return(false);
         }
         if (child.LogicFolderInfo.IsFolder && child.IsExpanded)
         {
             if (!LFRecursiveDraw(child.Items, ref iter))
             {
                 return(false);
             }
         }
     }
     return(true);
 }
Ejemplo n.º 2
0
 private bool RecursiveDraw(List <TreeViewItem> sis, ref int iter)
 {
     foreach (SongInfoTreeViewItem child in sis)
     {
         TextureString ts = child.TextureString;
         if (iter >= 0)
         {
             if (child == siTreeView.SelectedItem)
             {
                 songInfoSelection.RectangleHeight = ts.CharacterHeight + gapY;
                 songInfoSelection.RectangleWidth  = ts.JustWidth;
                 songInfoSelection.Position        = ts.Position;
                 songInfoSelection.Update();
                 songInfoSelection.Draw();
             }
             ts.Draw();
             if (child.SongInformation.IsPPDSong)
             {
                 score.Position = new Vector2(ts.Position.X - 20, ts.Position.Y - 2);
                 score.Update();
                 score.Draw();
             }
             else
             {
                 folder.Position = new Vector2(ts.Position.X - 20, ts.Position.Y);
                 folder.Update();
                 folder.Draw();
             }
         }
         iter++;
         if (iter >= maxHeightNumber)
         {
             return(false);
         }
         if (!child.SongInformation.IsPPDSong && child.IsExpanded)
         {
             if (!RecursiveDraw(child.Items, ref iter))
             {
                 return(false);
             }
         }
     }
     return(true);
 }