diff --git a/Controls/MusicOrderViewer.Designer.cs b/Controls/MusicOrderViewer.Designer.cs
new file mode 100644
index 0000000..e198698
--- /dev/null
+++ b/Controls/MusicOrderViewer.Designer.cs
@@ -0,0 +1,149 @@
+namespace TaikoSoundEditor.Controls
+{
+ partial class MusicOrderViewer
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.MusicOrdersPanel = new System.Windows.Forms.Panel();
+ this.RightButton = new System.Windows.Forms.Button();
+ this.ControlsPanel = new System.Windows.Forms.Panel();
+ this.PasteButton = new System.Windows.Forms.Button();
+ this.CutButton = new System.Windows.Forms.Button();
+ this.PageLabel = new System.Windows.Forms.Label();
+ this.LeftButton = new System.Windows.Forms.Button();
+ this.ControlsPanel.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // MusicOrdersPanel
+ //
+ this.MusicOrdersPanel.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.MusicOrdersPanel.Location = new System.Drawing.Point(20, 32);
+ this.MusicOrdersPanel.Name = "MusicOrdersPanel";
+ this.MusicOrdersPanel.Size = new System.Drawing.Size(467, 265);
+ this.MusicOrdersPanel.TabIndex = 0;
+ this.MusicOrdersPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.MusicOrdersPanel_Paint);
+ this.MusicOrdersPanel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MusicOrdersPanel_MouseDown);
+ this.MusicOrdersPanel.MouseLeave += new System.EventHandler(this.MusicOrdersPanel_MouseLeave);
+ this.MusicOrdersPanel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.MusicOrdersPanel_MouseMove);
+ this.MusicOrdersPanel.Resize += new System.EventHandler(this.MusicOrdersPanel_Resize);
+ //
+ // RightButton
+ //
+ this.RightButton.Dock = System.Windows.Forms.DockStyle.Right;
+ this.RightButton.Location = new System.Drawing.Point(487, 32);
+ this.RightButton.Name = "RightButton";
+ this.RightButton.Size = new System.Drawing.Size(20, 265);
+ this.RightButton.TabIndex = 1;
+ this.RightButton.Text = ">";
+ this.RightButton.UseVisualStyleBackColor = true;
+ this.RightButton.Click += new System.EventHandler(this.RightButton_Click);
+ //
+ // ControlsPanel
+ //
+ this.ControlsPanel.Controls.Add(this.PasteButton);
+ this.ControlsPanel.Controls.Add(this.CutButton);
+ this.ControlsPanel.Controls.Add(this.PageLabel);
+ this.ControlsPanel.Dock = System.Windows.Forms.DockStyle.Top;
+ this.ControlsPanel.Location = new System.Drawing.Point(0, 0);
+ this.ControlsPanel.Name = "ControlsPanel";
+ this.ControlsPanel.Size = new System.Drawing.Size(507, 32);
+ this.ControlsPanel.TabIndex = 2;
+ //
+ // PasteButton
+ //
+ this.PasteButton.BackgroundImage = global::TaikoSoundEditor.Properties.Resources.ic_paste_gs;
+ this.PasteButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.PasteButton.FlatAppearance.BorderSize = 0;
+ this.PasteButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.PasteButton.Location = new System.Drawing.Point(33, 3);
+ this.PasteButton.Name = "PasteButton";
+ this.PasteButton.Size = new System.Drawing.Size(24, 24);
+ this.PasteButton.TabIndex = 2;
+ this.PasteButton.UseVisualStyleBackColor = true;
+ this.PasteButton.Click += new System.EventHandler(this.PasteButton_Click);
+ //
+ // CutButton
+ //
+ this.CutButton.BackgroundImage = global::TaikoSoundEditor.Properties.Resources.ic_cut_gs;
+ this.CutButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.CutButton.FlatAppearance.BorderSize = 0;
+ this.CutButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.CutButton.Location = new System.Drawing.Point(3, 3);
+ this.CutButton.Name = "CutButton";
+ this.CutButton.Size = new System.Drawing.Size(24, 24);
+ this.CutButton.TabIndex = 1;
+ this.CutButton.UseVisualStyleBackColor = true;
+ this.CutButton.Click += new System.EventHandler(this.CutButton_Click);
+ //
+ // PageLabel
+ //
+ this.PageLabel.Anchor = System.Windows.Forms.AnchorStyles.Top;
+ this.PageLabel.AutoSize = true;
+ this.PageLabel.Location = new System.Drawing.Point(217, 8);
+ this.PageLabel.Name = "PageLabel";
+ this.PageLabel.Size = new System.Drawing.Size(67, 15);
+ this.PageLabel.TabIndex = 0;
+ this.PageLabel.Text = "Page # of #";
+ //
+ // LeftButton
+ //
+ this.LeftButton.Dock = System.Windows.Forms.DockStyle.Left;
+ this.LeftButton.Location = new System.Drawing.Point(0, 32);
+ this.LeftButton.Name = "LeftButton";
+ this.LeftButton.Size = new System.Drawing.Size(20, 265);
+ this.LeftButton.TabIndex = 3;
+ this.LeftButton.Text = "<";
+ this.LeftButton.UseVisualStyleBackColor = true;
+ this.LeftButton.Click += new System.EventHandler(this.LeftButton_Click);
+ //
+ // MusicOrderViewer
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.MusicOrdersPanel);
+ this.Controls.Add(this.LeftButton);
+ this.Controls.Add(this.RightButton);
+ this.Controls.Add(this.ControlsPanel);
+ this.Name = "MusicOrderViewer";
+ this.Size = new System.Drawing.Size(507, 297);
+ this.ControlsPanel.ResumeLayout(false);
+ this.ControlsPanel.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private Panel MusicOrdersPanel;
+ private Button RightButton;
+ private Panel ControlsPanel;
+ private Button LeftButton;
+ private Label PageLabel;
+ private Button CutButton;
+ private Button PasteButton;
+ }
+}
diff --git a/Controls/MusicOrderViewer.cs b/Controls/MusicOrderViewer.cs
new file mode 100644
index 0000000..3778423
--- /dev/null
+++ b/Controls/MusicOrderViewer.cs
@@ -0,0 +1,347 @@
+using System.Diagnostics;
+using System.Drawing.Drawing2D;
+using TaikoSoundEditor.Data;
+using TaikoSoundEditor.Properties;
+
+namespace TaikoSoundEditor.Controls
+{
+ public partial class MusicOrderViewer : UserControl
+ {
+ public MusicOrderViewer()
+ {
+ InitializeComponent();
+
+
+ typeof(Control).GetProperty("DoubleBuffered", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)
+ .SetValue(MusicOrdersPanel, true);
+ }
+
+ internal WordList WordList { get; set; }
+
+ private List SongCards = new();
+
+ public void AddSong(MusicOrder mo)
+ {
+ SongCards.Add(new SongCard(WordList, mo));
+ CurrentPage = CurrentPage;
+ }
+
+ private int _CurrentPage = 0;
+ public int CurrentPage
+ {
+ get => _CurrentPage;
+ set
+ {
+ _CurrentPage = value;
+ PageLabel.Text = $"Page {_CurrentPage + 1} of {PagesCount}";
+ MusicOrdersPanel.Invalidate();
+
+ LeftButton.Enabled = _CurrentPage > 0;
+ RightButton.Enabled = _CurrentPage < PagesCount - 1;
+ }
+ }
+
+ public int PagesCount => (SongCards.Count + ItemsPerPage - 1) / ItemsPerPage;
+
+ private int _ItemsPerRow = 4;
+ private int _ItemsPerCol = 5;
+ public int ItemsPerRow
+ {
+ get => _ItemsPerRow;
+ set
+ {
+ _ItemsPerRow = value;
+ MusicOrdersPanel.Invalidate();
+ }
+ }
+
+ public int ItemsPerCol
+ {
+ get => _ItemsPerCol;
+ set
+ {
+ _ItemsPerCol = value;
+ MusicOrdersPanel.Invalidate();
+ }
+ }
+
+ public int ItemsPerPage => ItemsPerRow * ItemsPerCol;
+
+
+ private static int ItemsPadding = 3;
+
+ public void RefreshMusicOrdersPanel(Graphics g)
+ {
+ var cards = SongCards.Skip(CurrentPage * ItemsPerPage).Take(ItemsPerPage).ToArray();
+
+ int itemW = MusicOrdersPanel.Width / ItemsPerRow - 2 * ItemsPadding;
+ int itemH = MusicOrdersPanel.Height / ItemsPerCol - 2 * ItemsPadding;
+
+ var cursor = MusicOrdersPanel.PointToClient(Cursor.Position);
+
+ for (int r = 0; r < ItemsPerCol; r++)
+ {
+ for (int c = 0; c < ItemsPerRow; c++)
+ {
+ int index = r * ItemsPerRow + c;
+
+ var rect = new Rectangle(
+ c * (itemW + 2 * ItemsPadding) + ItemsPadding,
+ r * (itemH + 2 * ItemsPadding) + ItemsPadding,
+ itemW,
+ itemH);
+
+ if (index >= cards.Length)
+ {
+ if (index == cards.Length && rect.Contains(cursor) && PasteMode)
+ {
+
+
+ g.DrawLine(Pens.Black, rect.Left - 2, rect.Top, rect.Left - 2, rect.Top + rect.Height);
+ }
+ break;
+ }
+
+ var card = cards[index];
+
+ g.FillRectangle(new SolidBrush(card.Color), rect);
+
+ if(card.IsSelected)
+ {
+ g.DrawRectangle(Pens.Blue, rect.Left - 1, rect.Top - 1, rect.Width + 1, rect.Height + 1);
+ g.DrawRectangle(Pens.Green, rect.Left - 2, rect.Top - 2, rect.Width + 3, rect.Height + 3);
+ g.FillRectangle(new SolidBrush(Color.FromArgb(128, Color.White)), rect);
+ }
+
+ if(card.IsCut)
+ {
+ g.FillRectangle(new HatchBrush(HatchStyle.ForwardDiagonal, Color.White, card.Color), rect);
+ }
+
+ if (rect.Contains(cursor))
+ {
+ if (PasteMode)
+ {
+ g.DrawLine(Pens.Black, rect.Left - 2, rect.Top, rect.Left - 2, rect.Top + rect.Height);
+ }
+ else
+ {
+ g.FillRectangle(new SolidBrush(Color.FromArgb(192, Color.White)), rect);
+ }
+ }
+
+ var cardInfo = $"{card.Id} ({card.Genre})\n{card.Title}\n{card.Subtitle}";
+ g.DrawString(cardInfo, Font, Brushes.Black, rect);
+ }
+ }
+ }
+
+ private void MusicOrdersPanel_Resize(object sender, EventArgs e)
+ {
+ MusicOrdersPanel.Invalidate();
+ }
+
+ private void MusicOrdersPanel_Paint(object sender, PaintEventArgs e)
+ {
+ RefreshMusicOrdersPanel(e.Graphics);
+ }
+
+ private void LeftButton_Click(object sender, EventArgs e)
+ {
+ if (CurrentPage > 0) CurrentPage--;
+ }
+
+ private void RightButton_Click(object sender, EventArgs e)
+ {
+ if (CurrentPage < PagesCount - 1) CurrentPage++;
+ }
+
+ private void MusicOrdersPanel_MouseMove(object sender, MouseEventArgs e)
+ {
+ Invalidate();
+ }
+
+ private void MusicOrdersPanel_MouseLeave(object sender, EventArgs e)
+ {
+ Invalidate();
+ }
+
+ public HashSet Selection = new();
+ public HashSet CutSelection = new();
+
+
+ private void MusicOrdersPanel_MouseDown(object sender, MouseEventArgs e)
+ {
+ if (e.Button != MouseButtons.Left) return;
+ var cursor = e.Location;
+
+ int itemW = MusicOrdersPanel.Width / ItemsPerRow;
+ int itemH = MusicOrdersPanel.Height / ItemsPerCol;
+
+ int row = cursor.Y / itemH;
+ int col = cursor.X / itemW;
+ //Debug.WriteLine($"{row} {col}");
+
+
+ if (row < 0 || row >= ItemsPerCol || col < 0 || col >= ItemsPerRow)
+ return;
+ var index = CurrentPage * ItemsPerPage + row * ItemsPerRow + col;
+
+ if (PasteMode)
+ {
+ if (index < 0 || index > SongCards.Count) return;
+
+ SongCard before = null, after = null;
+
+ for (int i = index; i < SongCards.Count; i++)
+ if (!SongCards[i].IsCut)
+ {
+ before = SongCards[i];
+ break;
+ }
+ for (int i = index - 1; i >= 0; i--)
+ if (!SongCards[i].IsCut)
+ {
+ after = SongCards[i];
+ break;
+ }
+
+ string message = "Do you want to move the selected songs?";
+
+ if (before != null)
+ {
+ if (after != null && before != after)
+ {
+ message = $"Do you want to move the selected songs before {before.Id} and after {after.Id}?";
+ }
+ else
+ {
+ message = $"Do you want to move the selected songs before {before.Id}?";
+ }
+ }
+ else if(after != null)
+ {
+ message = $"Do you want to move the selected songs after {after.Id}?";
+ }
+
+ if (MessageBox.Show(message, "Move songs?", MessageBoxButtons.YesNo) != DialogResult.Yes)
+ return;
+
+ SongCards.RemoveAll(CutSelection.Contains);
+ var ix = after != null ? SongCards.IndexOf(after)+1 : before != null ? SongCards.IndexOf(before) : 0;
+ SongCards.InsertRange(ix, CutSelection);
+
+ foreach (var c in CutSelection) c.IsCut = false;
+ CutSelection.Clear();
+ PasteMode = false;
+ PasteActive = false;
+ CutActive = false;
+ MusicOrdersPanel.Invalidate();
+
+ return;
+ }
+
+ if (index < 0 || index >= SongCards.Count) return;
+
+ var card = SongCards[index];
+
+ if (Form.ModifierKeys == Keys.Control)
+ {
+ if(card.IsSelected)
+ {
+ card.IsSelected = false;
+ Selection.Remove(card);
+ }
+ else
+ {
+ card.IsSelected = true;
+ Selection.Add(card);
+ }
+ MusicOrdersPanel.Invalidate();
+ }
+ else
+ {
+ foreach(var sel in Selection)
+ {
+ sel.IsSelected = false;
+ }
+ Selection.Clear();
+
+ card.IsSelected = true;
+ Selection.Add(card);
+ MusicOrdersPanel.Invalidate();
+ }
+
+ CutActive = Selection.Count > 0;
+ }
+
+ private bool _CutActive = false;
+ public bool CutActive
+ {
+ get => _CutActive;
+ set
+ {
+ _CutActive = value;
+ CutButton.BackgroundImage = CutActive ? Resources.ic_cut : Resources.ic_cut_gs;
+ CutButton.Enabled = CutActive;
+ }
+ }
+
+ private bool _PasteActive = false;
+ public bool PasteActive
+ {
+ get => _PasteActive;
+ set
+ {
+ _PasteActive = value;
+ PasteButton.BackgroundImage = PasteActive ? Resources.ic_paste : Resources.ic_paste_gs;
+ PasteButton.Enabled = PasteActive;
+ }
+ }
+
+ private void CutButton_Click(object sender, EventArgs e)
+ {
+ PasteMode = false;
+ foreach(var card in CutSelection)
+ {
+ card.IsCut = false;
+ }
+ CutSelection.Clear();
+
+ foreach(var card in Selection)
+ {
+ card.IsCut = true;
+ card.IsSelected = false;
+ CutSelection.Add(card);
+ }
+ Selection.Clear();
+
+ PasteActive = CutSelection.Count > 0;
+ CutActive= Selection.Count > 0;
+
+ MusicOrdersPanel.Invalidate();
+ }
+
+ private bool _PasteMode = false;
+
+ public bool PasteMode
+ {
+ get => _PasteMode;
+ set
+ {
+ _PasteMode = value;
+ PasteButton.FlatAppearance.BorderSize = _PasteMode ? 1 : 0;
+ }
+ }
+
+ private void PasteButton_Click(object sender, EventArgs e)
+ {
+ PasteMode = !PasteMode;
+
+ foreach (var card in Selection)
+ card.IsSelected = false;
+ Selection.Clear();
+ MusicOrdersPanel.Invalidate();
+ }
+ }
+}
diff --git a/Controls/MusicOrderViewer.resx b/Controls/MusicOrderViewer.resx
new file mode 100644
index 0000000..f298a7b
--- /dev/null
+++ b/Controls/MusicOrderViewer.resx
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Controls/SongCard.cs b/Controls/SongCard.cs
new file mode 100644
index 0000000..e2fdcef
--- /dev/null
+++ b/Controls/SongCard.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using TaikoSoundEditor.Data;
+using TaikoSoundEditor.Extensions;
+using TaikoSoundEditor.Utils;
+
+namespace TaikoSoundEditor.Controls
+{
+ public class SongCard
+ {
+ internal WordList WordList { get; }
+ public MusicOrder MusicOrder { get; }
+
+ public string Id => $"{MusicOrder.UniqueId}.{MusicOrder.Id}";
+ public string Title => WordList.GetBySong(MusicOrder.Id).JapaneseText;
+ public string Subtitle => WordList.GetBySongSub(MusicOrder.Id).JapaneseText;
+ public string Genre => MusicOrder.Genre.ToString();
+ public Color Color => Constants.GenreColors[MusicOrder.GenreNo.Clamp(0, Constants.GenreColors.Length - 1)];
+
+ public SongCard(WordList wordList, MusicOrder musicOrder)
+ {
+ WordList = wordList;
+ MusicOrder = musicOrder;
+ }
+
+ public bool IsSelected { get; set; } = false;
+
+ public bool IsCut { get; set; } = false;
+ }
+}
diff --git a/Data/WordList.cs b/Data/WordList.cs
index 3530ce2..d4a77ea 100644
--- a/Data/WordList.cs
+++ b/Data/WordList.cs
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace TaikoSoundEditor.Data
{
- internal class WordList
+ public class WordList
{
[JsonPropertyName("items")]
public List Items { get; set; } = new List();
diff --git a/Extensions/IntExtensions.cs b/Extensions/IntExtensions.cs
new file mode 100644
index 0000000..4f2a471
--- /dev/null
+++ b/Extensions/IntExtensions.cs
@@ -0,0 +1,7 @@
+namespace TaikoSoundEditor.Extensions
+{
+ internal static class IntExtensions
+ {
+ public static int Clamp(this int x, int a, int b) => x <= a ? a : x >= b ? b : x;
+ }
+}
diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs
index abf8eb2..96cdbd9 100644
--- a/MainForm.Designer.cs
+++ b/MainForm.Designer.cs
@@ -87,6 +87,7 @@
this.WordsGB = new System.Windows.Forms.GroupBox();
this.WordsGrid = new System.Windows.Forms.PropertyGrid();
this.MusicOrderTab = new System.Windows.Forms.TabPage();
+ this.MusicOrderViewer = new TaikoSoundEditor.Controls.MusicOrderViewer();
this.RemoveSongButton = new System.Windows.Forms.Button();
this.DatatableSpaces = new System.Windows.Forms.CheckBox();
this.ExportOpenOnFinished = new System.Windows.Forms.CheckBox();
@@ -143,6 +144,7 @@
this.WordDetailGB.SuspendLayout();
this.WordSubGB.SuspendLayout();
this.WordsGB.SuspendLayout();
+ this.MusicOrderTab.SuspendLayout();
this.groupBox8.SuspendLayout();
this.groupBox3.SuspendLayout();
this.tabPage3.SuspendLayout();
@@ -789,6 +791,7 @@
//
// MusicOrderTab
//
+ this.MusicOrderTab.Controls.Add(this.MusicOrderViewer);
this.MusicOrderTab.Location = new System.Drawing.Point(4, 24);
this.MusicOrderTab.Name = "MusicOrderTab";
this.MusicOrderTab.Padding = new System.Windows.Forms.Padding(3);
@@ -797,6 +800,17 @@
this.MusicOrderTab.Text = "Music Order";
this.MusicOrderTab.UseVisualStyleBackColor = true;
//
+ // MusicOrderViewer
+ //
+ this.MusicOrderViewer.CurrentPage = 0;
+ this.MusicOrderViewer.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.MusicOrderViewer.ItemsPerCol = 5;
+ this.MusicOrderViewer.ItemsPerRow = 4;
+ this.MusicOrderViewer.Location = new System.Drawing.Point(3, 3);
+ this.MusicOrderViewer.Name = "MusicOrderViewer";
+ this.MusicOrderViewer.Size = new System.Drawing.Size(515, 290);
+ this.MusicOrderViewer.TabIndex = 0;
+ //
// RemoveSongButton
//
this.RemoveSongButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@@ -1195,6 +1209,7 @@
this.WordDetailGB.ResumeLayout(false);
this.WordSubGB.ResumeLayout(false);
this.WordsGB.ResumeLayout(false);
+ this.MusicOrderTab.ResumeLayout(false);
this.groupBox8.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);
@@ -1300,5 +1315,6 @@
private Label label19;
private NumericUpDown SimpleStarUraBox;
private Button LocateInMusicOrderButton;
+ private Controls.MusicOrderViewer MusicOrderViewer;
}
}
\ No newline at end of file
diff --git a/MainForm.RequestFiles.cs b/MainForm.RequestFiles.cs
index 01b1920..417b43f 100644
--- a/MainForm.RequestFiles.cs
+++ b/MainForm.RequestFiles.cs
@@ -103,9 +103,18 @@ namespace TaikoSoundEditor
Logger.Info($"Setting LoadedMusicBox DataSource");
LoadedMusicBinding = new BindingSource();
- LoadedMusicBinding.DataSource = MusicInfos.Items.Where(mi => mi.UniqueId != 0).ToList();
+ var cleanList = MusicInfos.Items.Where(mi => mi.UniqueId != 0).ToList();
+
+ LoadedMusicBinding.DataSource = cleanList;
LoadedMusicBox.DataSource = LoadedMusicBinding;
TabControl.SelectedIndex = 1;
+
+
+ MusicOrderViewer.WordList = WordList;
+ foreach (var musicOrder in MusicOrders.Items)
+ {
+ MusicOrderViewer.AddSong(musicOrder);
+ }
});
#endregion
diff --git a/MainForm.cs b/MainForm.cs
index 637c220..19bb0cf 100644
--- a/MainForm.cs
+++ b/MainForm.cs
@@ -18,7 +18,7 @@ namespace TaikoSoundEditor
NewSoundsBox.DataSource = AddedMusicBinding;
TabControl.SelectedIndexChanged += TabControl_SelectedIndexChanged;
- SimpleGenreBox.DataSource = Enum.GetValues(typeof(Genre));
+ SimpleGenreBox.DataSource = Enum.GetValues(typeof(Genre));
}
private void TabControl_SelectedIndexChanged(object sender, EventArgs e)
@@ -175,6 +175,11 @@ namespace TaikoSoundEditor
private void SoundViewTab_SelectedIndexChanged(object sender, EventArgs e)
{
+ if(SoundViewTab.SelectedTab==MusicOrderTab)
+ {
+ return;
+ }
+
if (!(SoundViewTab.SelectedTab == SoundViewerExpert || SoundViewTab.SelectedTab == SoundViewerSimple))
return;
@@ -235,7 +240,6 @@ namespace TaikoSoundEditor
item.MusicInfo.StarUra = (int)SimpleStarUraBox.Value;
return;
}
-
});
}
}
\ No newline at end of file
diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs
index 75cf615..83502aa 100644
--- a/Properties/Resources.Designer.cs
+++ b/Properties/Resources.Designer.cs
@@ -60,6 +60,46 @@ namespace TaikoSoundEditor.Properties {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ic_cut {
+ get {
+ object obj = ResourceManager.GetObject("ic_cut", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ic_cut_gs {
+ get {
+ object obj = ResourceManager.GetObject("ic_cut_gs", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ic_paste {
+ get {
+ object obj = ResourceManager.GetObject("ic_paste", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ic_paste_gs {
+ get {
+ object obj = ResourceManager.GetObject("ic_paste_gs", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Byte[].
///
diff --git a/Properties/Resources.resx b/Properties/Resources.resx
index 8e1f112..22cdd7a 100644
--- a/Properties/Resources.resx
+++ b/Properties/Resources.resx
@@ -118,6 +118,18 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ ..\Resources\ic_cut.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\ic_cut_gs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\ic_paste.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\ic_paste_gs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
..\Resources\song_ABCDEF_nus3bank.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
diff --git a/README.md b/README.md
index 2db4d81..efc2bd1 100644
--- a/README.md
+++ b/README.md
@@ -5,4 +5,5 @@ A simple tool to automatize the process of converting music to .nus3bank format
## Credits
- big shoutout to [Nabix](https://github.com/Nabixlol) for reaching me with the idea to create this tool, testing it and
- offering careful and insightful guidance through all the conversion steps to someone who has never even heard about this game before :))
\ No newline at end of file
+ offering careful and insightful guidance through all the conversion steps to someone who has never even heard about this game before :))
+- https://www.softicons.com/
\ No newline at end of file
diff --git a/Resources/ic_cut.png b/Resources/ic_cut.png
new file mode 100644
index 0000000..51cb8f8
Binary files /dev/null and b/Resources/ic_cut.png differ
diff --git a/Resources/ic_cut_gs.png b/Resources/ic_cut_gs.png
new file mode 100644
index 0000000..4d28626
Binary files /dev/null and b/Resources/ic_cut_gs.png differ
diff --git a/Resources/ic_paste.png b/Resources/ic_paste.png
new file mode 100644
index 0000000..d00ed00
Binary files /dev/null and b/Resources/ic_paste.png differ
diff --git a/Resources/ic_paste_gs.png b/Resources/ic_paste_gs.png
new file mode 100644
index 0000000..fb8b529
Binary files /dev/null and b/Resources/ic_paste_gs.png differ
diff --git a/Utils/Constants.cs b/Utils/Constants.cs
new file mode 100644
index 0000000..8527dac
--- /dev/null
+++ b/Utils/Constants.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+
+namespace TaikoSoundEditor.Utils
+{
+ internal static class Constants
+ {
+ static Random ColorRand = new Random(1236);
+
+ public static Color[] Colors = typeof(Color)
+ .GetProperties(BindingFlags.Static | BindingFlags.Public)
+ .Where(p => p.PropertyType == typeof(Color)).Select(p => (Color)p.GetValue(null))
+ .Where(c => c != Color.Transparent)
+ .OrderBy(_ => ColorRand.Next())
+ .ToArray();
+
+ public static Color[] GenreColors = Colors.Where(c => 0.5 <= c.GetBrightness() && c.GetBrightness() < 0.7 && c.GetSaturation() > 0.5).ToArray();
+ }
+}