better stats formatting
							parent
							
								
									1aae36dfbc
								
							
						
					
					
						commit
						8774723f43
					
				
							
								
								
									
										32
									
								
								Stats.swift
								
								
								
								
							
							
						
						
									
										32
									
								
								Stats.swift
								
								
								
								
							| 
						 | 
					@ -19,7 +19,9 @@ struct StatsPanel: View {
 | 
				
			||||||
        Array(repeatElement(GridItem(.flexible()), count: columnCount))
 | 
					        Array(repeatElement(GridItem(.flexible()), count: columnCount))
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    var body: some View {
 | 
					    var body: some View {
 | 
				
			||||||
        LazyVGrid (columns:columns ,  spacing: 5) {
 | 
					        HStack(spacing: 5) {
 | 
				
			||||||
 | 
					            VStack (spacing: 5) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                VStack {
 | 
					                VStack {
 | 
				
			||||||
                    Text("back Ribbon")
 | 
					                    Text("back Ribbon")
 | 
				
			||||||
                        .foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
 | 
					                        .foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
 | 
				
			||||||
| 
						 | 
					@ -31,7 +33,7 @@ struct StatsPanel: View {
 | 
				
			||||||
                    Text("next Ribbon")
 | 
					                    Text("next Ribbon")
 | 
				
			||||||
                        .foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
 | 
					                        .foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
 | 
				
			||||||
                        .font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
 | 
					                        .font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
 | 
				
			||||||
                if (nextRibbon.count > 0) {
 | 
					                    if nextRibbon.count > 0 {
 | 
				
			||||||
                        RibbonDebug(ribbonDebug: RibbonDebugPrint(ribbon: nextRibbon[0]))
 | 
					                        RibbonDebug(ribbonDebug: RibbonDebugPrint(ribbon: nextRibbon[0]))
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
| 
						 | 
					@ -43,23 +45,6 @@ struct StatsPanel: View {
 | 
				
			||||||
                    RibbonDebug(ribbonDebug: RibbonDebugPrint(ribbon: selectedRibbon[0]))
 | 
					                    RibbonDebug(ribbonDebug: RibbonDebugPrint(ribbon: selectedRibbon[0]))
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
               ForEach(RibbonMap(ribbons: allRibbons), id: \.self) { ribbon in
 | 
					 | 
				
			||||||
                   Print("quack3: \(ribbon)")
 | 
					 | 
				
			||||||
                   RibbonDebug(ribbonDebug: ribbon)
 | 
					 | 
				
			||||||
               }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            //VStack(spacing: 10) {
 | 
					 | 
				
			||||||
            //    Text("All Ribbons")
 | 
					 | 
				
			||||||
            //        .foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
 | 
					 | 
				
			||||||
            //        .font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            //    ForEach(RibbonMap(ribbons: allRibbons), id: \.self) { ribbon in
 | 
					 | 
				
			||||||
            //        //Print("quack2: \(ribbon)")
 | 
					 | 
				
			||||||
            //        RibbonDebug(ribbonDebug: RibbonDebugPrint(ribbon: ribbon))
 | 
					 | 
				
			||||||
            //    }
 | 
					 | 
				
			||||||
            //}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                VStack {
 | 
					                VStack {
 | 
				
			||||||
                    Text("pc offset: \(paneConnector.currentOffset)")
 | 
					                    Text("pc offset: \(paneConnector.currentOffset)")
 | 
				
			||||||
                        .foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
 | 
					                        .foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
 | 
				
			||||||
| 
						 | 
					@ -72,6 +57,15 @@ struct StatsPanel: View {
 | 
				
			||||||
                        .font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
 | 
					                        .font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            VStack (spacing: 5) {
 | 
				
			||||||
 | 
					               ForEach(RibbonMap(ribbons: allRibbons), id: \.self) { ribbon in
 | 
				
			||||||
 | 
					                   Print("quack3: \(ribbon)")
 | 
				
			||||||
 | 
					                   RibbonDebug(ribbonDebug: ribbon)
 | 
				
			||||||
 | 
					               }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
func RibbonMap(ribbons: [Ribbon]) -> [[String]] {
 | 
					func RibbonMap(ribbons: [Ribbon]) -> [[String]] {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -235,8 +235,8 @@ class PaneConnector: NSObject, ObservableObject {
 | 
				
			||||||
    var currentId = ""
 | 
					    var currentId = ""
 | 
				
			||||||
    var currentOffset = CGFloat()
 | 
					    var currentOffset = CGFloat()
 | 
				
			||||||
    var visibilityTracker: VisibilityTracker<String>?
 | 
					    var visibilityTracker: VisibilityTracker<String>?
 | 
				
			||||||
    var scrollId = ""
 | 
					    @Published var scrollId = ""
 | 
				
			||||||
    var scrollOffset = CGFloat()
 | 
					    @Published var scrollOffset = CGFloat()
 | 
				
			||||||
    var setScrollOffset: CGFloat?
 | 
					    var setScrollOffset: CGFloat?
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue