@@ -44,6 +44,8 @@ public partial class ArgonJudgementCounterDisplay : CompositeDrawable, ISerialis
4444 [ SettingSource ( typeof ( JudgementCounterDisplayStrings ) , nameof ( JudgementCounterDisplayStrings . FlowDirection ) ) ]
4545 public Bindable < Direction > FlowDirection { get ; } = new Bindable < Direction > ( ) ;
4646
47+ private readonly Bindable < int ? > wireframeDigits = new Bindable < int ? > ( ) ;
48+
4749 protected FillFlowContainer < ArgonJudgementCounter > CounterFlow = null ! ;
4850
4951 [ BackgroundDependencyLoader ]
@@ -59,9 +61,13 @@ private void load()
5961
6062 foreach ( var counter in judgementCountController . Counters )
6163 {
62- ArgonJudgementCounter counterComponent = new ArgonJudgementCounter ( counter ) ;
63- counterComponent . WireframeOpacity . BindTo ( WireframeOpacity ) ;
64- counterComponent . ShowLabel . BindTo ( ShowLabel ) ;
64+ counter . ResultCount . BindValueChanged ( _ => updateWireframeDigits ( ) ) ;
65+ ArgonJudgementCounter counterComponent = new ArgonJudgementCounter ( counter )
66+ {
67+ WireframeOpacity = { BindTarget = WireframeOpacity } ,
68+ WireframeDigits = { BindTarget = wireframeDigits } ,
69+ ShowLabel = { BindTarget = ShowLabel } ,
70+ } ;
6571 CounterFlow . Add ( counterComponent ) ;
6672 }
6773 }
@@ -71,7 +77,7 @@ protected override void LoadComplete()
7177 base . LoadComplete ( ) ;
7278 Mode . BindValueChanged ( _ => updateVisibility ( ) ) ;
7379 ShowMaxJudgement . BindValueChanged ( _ => updateVisibility ( ) , true ) ;
74- FlowDirection . BindValueChanged ( d => CounterFlow . Direction = getFillDirection ( d . NewValue ) , true ) ;
80+ FlowDirection . BindValueChanged ( _ => updateFlowDirection ( ) , true ) ;
7581 }
7682
7783 private void updateVisibility ( )
@@ -85,6 +91,21 @@ private void updateVisibility()
8591 else
8692 counter . Hide ( ) ;
8793 }
94+
95+ updateWireframeDigits ( ) ;
96+ }
97+
98+ private void updateFlowDirection ( )
99+ {
100+ CounterFlow . Direction = getFillDirection ( FlowDirection . Value ) ;
101+ updateWireframeDigits ( ) ;
102+ }
103+
104+ private void updateWireframeDigits ( )
105+ {
106+ wireframeDigits . Value = FlowDirection . Value == Direction . Vertical
107+ ? Math . Max ( 2 , CounterFlow . Children . Where ( counter => counter . State . Value == Visibility . Visible ) . Max ( counter => counter . Result . ResultCount . Value ) . ToString ( ) . Length )
108+ : null ;
88109 }
89110
90111 private bool shouldBeVisible ( int index , ArgonJudgementCounter counter )
0 commit comments