feat(scoreboard): units 7+8 — the layer's properties panel (facts, colours, plate, size)
Selecting a Scoreboard layer now shows its settings, using the app's own widgets only: - eight fact checkboxes (subscribers, watch hours, Super Chats, new members, milestones, last member, last Super Chat, last gift) - text colour and plate colour via YtComboBox over BorderColorPalette (the app's one palette — TASK 63's rule: a picker IS the app's drop-down, never a hand-built menu) - plate on/off, plate opacity, text size 14-24 Every change pushes through the presenter (SetStyle/SetTiles) and repaints the strip, so the preview and the output follow immediately. One look per layout, stored on the view-model: the scoreboard is a single billboard, not eight independent widgets. Guard: ScoreboardPropertiesTests asserts the panel is gated on SelectedElement.IsScoreboard, binds all eight facts and the four look controls, uses YtComboBox/YtCheckBox only, and that the VM surface exists for each name (a typo would otherwise bind to nothing in silence).
This commit is contained in:
@@ -447,6 +447,61 @@
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Scoreboard config (creator 2026-10-30): the ego wall's billboard —
|
||||
which eight facts show, and how the strip is painted. -->
|
||||
<StackPanel Visibility="{Binding SelectedElement.IsScoreboard, Converter={StaticResource BoolToVis}}" Margin="0,0,0,8">
|
||||
<TextBlock Text="Facts" Foreground="{StaticResource Brush.OnSurfaceVariant}" FontSize="11" FontWeight="SemiBold" Margin="0,0,0,4"/>
|
||||
<WrapPanel Margin="10,0,0,0">
|
||||
<CheckBox Style="{StaticResource YtCheckBox}" Content="Subscribers" Margin="0,0,10,4"
|
||||
IsChecked="{Binding ScoreboardShowSubscribers, Mode=TwoWay}"/>
|
||||
<CheckBox Style="{StaticResource YtCheckBox}" Content="Watch hours" Margin="0,0,10,4"
|
||||
IsChecked="{Binding ScoreboardShowWatchHours, Mode=TwoWay}"/>
|
||||
<CheckBox Style="{StaticResource YtCheckBox}" Content="Super Chats" Margin="0,0,10,4"
|
||||
IsChecked="{Binding ScoreboardShowSuperChats, Mode=TwoWay}"/>
|
||||
<CheckBox Style="{StaticResource YtCheckBox}" Content="New members" Margin="0,0,10,4"
|
||||
IsChecked="{Binding ScoreboardShowNewMembers, Mode=TwoWay}"/>
|
||||
<CheckBox Style="{StaticResource YtCheckBox}" Content="Milestones" Margin="0,0,10,4"
|
||||
IsChecked="{Binding ScoreboardShowMilestones, Mode=TwoWay}"/>
|
||||
<CheckBox Style="{StaticResource YtCheckBox}" Content="Last member" Margin="0,0,10,4"
|
||||
IsChecked="{Binding ScoreboardShowLastMember, Mode=TwoWay}"/>
|
||||
<CheckBox Style="{StaticResource YtCheckBox}" Content="Last Super Chat" Margin="0,0,10,4"
|
||||
IsChecked="{Binding ScoreboardShowLastSuperChat, Mode=TwoWay}"/>
|
||||
<CheckBox Style="{StaticResource YtCheckBox}" Content="Last gift" Margin="0,0,10,4"
|
||||
IsChecked="{Binding ScoreboardShowLastGift, Mode=TwoWay}"/>
|
||||
</WrapPanel>
|
||||
|
||||
<TextBlock Text="Text colour" Foreground="{StaticResource Brush.OnSurfaceVariant}" FontSize="11" Margin="10,6,0,2"/>
|
||||
<ComboBox Style="{StaticResource YtComboBox}" Height="24" FontSize="11" Margin="10,0,0,6"
|
||||
ItemsSource="{Binding ScoreboardColorOptions}" DisplayMemberPath="Name"
|
||||
SelectedValuePath="Hex" SelectedValue="{Binding ScoreboardTextColor, Mode=TwoWay}"/>
|
||||
|
||||
<CheckBox Style="{StaticResource YtCheckBox}" Content="Background plate" Margin="10,0,0,4"
|
||||
IsChecked="{Binding ScoreboardBackgroundEnabled, Mode=TwoWay}"/>
|
||||
<ComboBox Style="{StaticResource YtComboBox}" Height="24" FontSize="11" Margin="10,0,0,6"
|
||||
ItemsSource="{Binding ScoreboardColorOptions}" DisplayMemberPath="Name"
|
||||
SelectedValuePath="Hex" SelectedValue="{Binding ScoreboardBackgroundColor, Mode=TwoWay}"
|
||||
IsEnabled="{Binding ScoreboardBackgroundEnabled}"/>
|
||||
<DockPanel Margin="10,0,0,6" IsEnabled="{Binding ScoreboardBackgroundEnabled}">
|
||||
<TextBlock DockPanel.Dock="Left" Text="Opacity" Foreground="{StaticResource Brush.OnSurfaceVariant}"
|
||||
FontSize="11" Width="60" VerticalAlignment="Center"/>
|
||||
<TextBlock DockPanel.Dock="Right" Width="42" TextAlignment="Right" FontSize="11"
|
||||
Foreground="{StaticResource Brush.OnSurfaceVariant}" VerticalAlignment="Center"
|
||||
Text="{Binding ScoreboardBackgroundOpacity, StringFormat={}{0:P0}}"/>
|
||||
<Slider Minimum="0" Maximum="1" SmallChange="0.05" LargeChange="0.1"
|
||||
Value="{Binding ScoreboardBackgroundOpacity, Mode=TwoWay}" VerticalAlignment="Center"/>
|
||||
</DockPanel>
|
||||
|
||||
<DockPanel Margin="10,0,0,0">
|
||||
<TextBlock DockPanel.Dock="Left" Text="Text size" Foreground="{StaticResource Brush.OnSurfaceVariant}"
|
||||
FontSize="11" Width="60" VerticalAlignment="Center"/>
|
||||
<TextBlock DockPanel.Dock="Right" Width="42" TextAlignment="Right" FontSize="11"
|
||||
Foreground="{StaticResource Brush.OnSurfaceVariant}" VerticalAlignment="Center"
|
||||
Text="{Binding ScoreboardFontSize, StringFormat={}{0:0}}"/>
|
||||
<Slider Minimum="14" Maximum="24" SmallChange="1" LargeChange="2"
|
||||
Value="{Binding ScoreboardFontSize, Mode=TwoWay}" VerticalAlignment="Center"/>
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Countdown config -->
|
||||
<StackPanel Visibility="{Binding SelectedElement.IsCountdown, Converter={StaticResource BoolToVis}}" Margin="0,0,0,8">
|
||||
<TextBlock Text="Timer (minutes)" Foreground="{StaticResource Brush.OnSurfaceVariant}" FontSize="11" Margin="0,0,0,2"/>
|
||||
|
||||
Reference in New Issue
Block a user