Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include info about Triple and Quadruple notes on a line #97

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Classes/EddaConstants.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Windows;
using System.Windows.Media;

namespace Edda.Const {
Expand Down Expand Up @@ -151,6 +152,12 @@ public static class BPMChange {
public const double NamePadding = 3;
public const double Opacity = 0.75;
}
public static class Stats {
public static readonly MediaColor Colour = Colors.Black;
public static readonly MediaColor WarningColour = Colors.Crimson;
public static readonly FontWeight FontWeight = FontWeights.Regular;
public static readonly FontWeight WarningFontWeight = FontWeights.Bold;
}

// Waveform drawing
public static class Waveform {
Expand Down
4 changes: 4 additions & 0 deletions Classes/MapEditor/Stats/MapStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public class MapStats {
public int selectedNotes;
public int singleNotes;
public int doubleNotes;
public int tripleNotes;
public int quadrupleNotes;

/// <summary>
/// Column variety
Expand Down Expand Up @@ -49,6 +51,8 @@ public void RecalculateNotes(SortedSet<Note> notes, SortedSet<Note> selectedNote
this.selectedNotes = selectedNotes.Count;
singleNotes = CalculateRowNotes(notes, 1);
doubleNotes = CalculateRowNotes(notes, 2);
tripleNotes = CalculateRowNotes(notes, 3);
quadrupleNotes = CalculateRowNotes(notes, 4);
}

private static int CalculateRowNotes(SortedSet<Note> notes, int rowCount) {
Expand Down
16 changes: 12 additions & 4 deletions Windows/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -274,18 +274,19 @@
<Grid VerticalAlignment="Center">
<Grid.Resources>
<Style TargetType="Border" >
<Setter Property="Padding" Value="5,1,5,1" />
<Setter Property="Padding" Value="2.5,1,2.5,1" />
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.9*" />
<ColumnDefinition Width="0.85*" />
<ColumnDefinition Width="0.9*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="0.95*" />
</Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.Column="0">
<TextBlock VerticalAlignment="Center">All</TextBlock>
Expand All @@ -299,6 +300,9 @@
<Border Grid.Row="0" Grid.Column="3">
<TextBlock VerticalAlignment="Center">Double</TextBlock>
</Border>
<Border Grid.Row="0" Grid.Column="4">
<TextBlock x:Name="notesStatsTriplePlusLabel" VerticalAlignment="Center">Triple+</TextBlock>
</Border>
<Border Grid.Row="1" Grid.Column="0">
<TextBlock x:Name="notesStatsAll" VerticalAlignment="Center">734</TextBlock>
</Border>
Expand All @@ -311,9 +315,13 @@
<Border Grid.Row="1" Grid.Column="3">
<TextBlock x:Name="notesStatsDouble" VerticalAlignment="Center">210</TextBlock>
</Border>
<Border Grid.Row="1" Grid.Column="4">
<TextBlock x:Name="notesStatsTriplePlus" VerticalAlignment="Center">0</TextBlock>
</Border>
<Border Grid.RowSpan="2" Grid.Column="0" BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" BorderThickness="0,0,1,0"/>
<Border Grid.RowSpan="2" Grid.Column="1" BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" BorderThickness="0,0,1,0"/>
<Border Grid.RowSpan="2" Grid.Column="2" BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" BorderThickness="0,0,1,0"/>
<Border Grid.RowSpan="2" Grid.Column="3" BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" BorderThickness="0,0,1,0"/>
</Grid>
</Expander>
<Border BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" BorderThickness="0,0,0,1"/>
Expand Down
10 changes: 10 additions & 0 deletions Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,16 @@ private void SetNotesStats(MapStats stats) {
notesStatsSelected.Text = stats.selectedNotes.ToString();
notesStatsSingle.Text = stats.singleNotes.ToString();
notesStatsDouble.Text = stats.doubleNotes.ToString();
var triplePlusNotes = stats.tripleNotes + stats.quadrupleNotes;
notesStatsTriplePlus.Text = triplePlusNotes.ToString();
var triplePlusFontWeight = triplePlusNotes > 0 ? Editor.Stats.WarningFontWeight : Editor.Stats.FontWeight;
notesStatsTriplePlusLabel.FontWeight = triplePlusFontWeight;
notesStatsTriplePlus.FontWeight = triplePlusFontWeight;
var triplePlusColor = new SolidColorBrush(
triplePlusNotes > 0 ? Editor.Stats.WarningColour : Editor.Stats.Colour
);
notesStatsTriplePlusLabel.Foreground = triplePlusColor;
notesStatsTriplePlus.Foreground = triplePlusColor;
}

private void SetColumnStats(MapStats stats) {
Expand Down