From 04a86f755ab838c2a5ef40deecd5ba94eda10c85 Mon Sep 17 00:00:00 2001 From: NotImplementedLife Date: Sat, 29 Jul 2023 10:04:31 +0300 Subject: [PATCH] added music order fast navigation buttons --- Controls/MusicOrderViewer.Designer.cs | 96 ++++++++++++++++++++++---- Controls/MusicOrderViewer.cs | 24 +++++++ Properties/Resources.Designer.cs | 40 +++++++++++ Properties/Resources.resx | 12 ++++ Resources/ic_left_10.png | Bin 0 -> 757 bytes Resources/ic_list_end.png | Bin 0 -> 610 bytes Resources/ic_list_start.png | Bin 0 -> 617 bytes Resources/ic_right_10.png | Bin 0 -> 769 bytes 8 files changed, 158 insertions(+), 14 deletions(-) create mode 100644 Resources/ic_left_10.png create mode 100644 Resources/ic_list_end.png create mode 100644 Resources/ic_list_start.png create mode 100644 Resources/ic_right_10.png diff --git a/Controls/MusicOrderViewer.Designer.cs b/Controls/MusicOrderViewer.Designer.cs index f457361..3c4a78e 100644 --- a/Controls/MusicOrderViewer.Designer.cs +++ b/Controls/MusicOrderViewer.Designer.cs @@ -31,11 +31,15 @@ this.MusicOrdersPanel = new System.Windows.Forms.Panel(); this.RightButton = new System.Windows.Forms.Button(); this.ControlsPanel = new System.Windows.Forms.Panel(); + this.ListStartButton = new System.Windows.Forms.Button(); + this.ListEndButton = new System.Windows.Forms.Button(); + this.Left10Button = new System.Windows.Forms.Button(); + this.Right10Button = new System.Windows.Forms.Button(); + this.RemoveButton = new System.Windows.Forms.Button(); 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.RemoveButton = new System.Windows.Forms.Button(); this.ControlsPanel.SuspendLayout(); this.SuspendLayout(); // @@ -65,6 +69,10 @@ // // ControlsPanel // + this.ControlsPanel.Controls.Add(this.ListStartButton); + this.ControlsPanel.Controls.Add(this.ListEndButton); + this.ControlsPanel.Controls.Add(this.Left10Button); + this.ControlsPanel.Controls.Add(this.Right10Button); this.ControlsPanel.Controls.Add(this.RemoveButton); this.ControlsPanel.Controls.Add(this.PasteButton); this.ControlsPanel.Controls.Add(this.CutButton); @@ -75,6 +83,75 @@ this.ControlsPanel.Size = new System.Drawing.Size(507, 32); this.ControlsPanel.TabIndex = 2; // + // ListStartButton + // + this.ListStartButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.ListStartButton.BackgroundImage = global::TaikoSoundEditor.Properties.Resources.ic_list_start; + this.ListStartButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.ListStartButton.FlatAppearance.BorderSize = 0; + this.ListStartButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.ListStartButton.Location = new System.Drawing.Point(390, 3); + this.ListStartButton.Name = "ListStartButton"; + this.ListStartButton.Size = new System.Drawing.Size(24, 24); + this.ListStartButton.TabIndex = 7; + this.ListStartButton.UseVisualStyleBackColor = true; + this.ListStartButton.Click += new System.EventHandler(this.ListStartButton_Click); + // + // ListEndButton + // + this.ListEndButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.ListEndButton.BackgroundImage = global::TaikoSoundEditor.Properties.Resources.ic_list_end; + this.ListEndButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.ListEndButton.FlatAppearance.BorderSize = 0; + this.ListEndButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.ListEndButton.Location = new System.Drawing.Point(480, 3); + this.ListEndButton.Name = "ListEndButton"; + this.ListEndButton.Size = new System.Drawing.Size(24, 24); + this.ListEndButton.TabIndex = 6; + this.ListEndButton.UseVisualStyleBackColor = true; + this.ListEndButton.Click += new System.EventHandler(this.ListEndButton_Click); + // + // Left10Button + // + this.Left10Button.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.Left10Button.BackgroundImage = global::TaikoSoundEditor.Properties.Resources.ic_left_10; + this.Left10Button.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.Left10Button.FlatAppearance.BorderSize = 0; + this.Left10Button.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.Left10Button.Location = new System.Drawing.Point(420, 3); + this.Left10Button.Name = "Left10Button"; + this.Left10Button.Size = new System.Drawing.Size(24, 24); + this.Left10Button.TabIndex = 5; + this.Left10Button.UseVisualStyleBackColor = true; + this.Left10Button.Click += new System.EventHandler(this.Left10Button_Click); + // + // Right10Button + // + this.Right10Button.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.Right10Button.BackgroundImage = global::TaikoSoundEditor.Properties.Resources.ic_right_10; + this.Right10Button.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.Right10Button.FlatAppearance.BorderSize = 0; + this.Right10Button.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.Right10Button.Location = new System.Drawing.Point(450, 3); + this.Right10Button.Name = "Right10Button"; + this.Right10Button.Size = new System.Drawing.Size(24, 24); + this.Right10Button.TabIndex = 4; + this.Right10Button.UseVisualStyleBackColor = true; + this.Right10Button.Click += new System.EventHandler(this.Right10Button_Click); + // + // RemoveButton + // + this.RemoveButton.BackgroundImage = global::TaikoSoundEditor.Properties.Resources.ic_remove_gs; + this.RemoveButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.RemoveButton.FlatAppearance.BorderSize = 0; + this.RemoveButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RemoveButton.Location = new System.Drawing.Point(63, 3); + this.RemoveButton.Name = "RemoveButton"; + this.RemoveButton.Size = new System.Drawing.Size(24, 24); + this.RemoveButton.TabIndex = 3; + this.RemoveButton.UseVisualStyleBackColor = true; + this.RemoveButton.Click += new System.EventHandler(this.RemoveButton_Click); + // // PasteButton // this.PasteButton.BackgroundImage = global::TaikoSoundEditor.Properties.Resources.ic_paste_gs; @@ -122,19 +199,6 @@ this.LeftButton.UseVisualStyleBackColor = true; this.LeftButton.Click += new System.EventHandler(this.LeftButton_Click); // - // RemoveButton - // - this.RemoveButton.BackgroundImage = global::TaikoSoundEditor.Properties.Resources.ic_remove_gs; - this.RemoveButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; - this.RemoveButton.FlatAppearance.BorderSize = 0; - this.RemoveButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RemoveButton.Location = new System.Drawing.Point(63, 3); - this.RemoveButton.Name = "RemoveButton"; - this.RemoveButton.Size = new System.Drawing.Size(24, 24); - this.RemoveButton.TabIndex = 3; - this.RemoveButton.UseVisualStyleBackColor = true; - this.RemoveButton.Click += new System.EventHandler(this.RemoveButton_Click); - // // MusicOrderViewer // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); @@ -161,5 +225,9 @@ private Button CutButton; private Button PasteButton; private Button RemoveButton; + private Button Left10Button; + private Button Right10Button; + private Button ListStartButton; + private Button ListEndButton; } } diff --git a/Controls/MusicOrderViewer.cs b/Controls/MusicOrderViewer.cs index 32c64bb..385b5f2 100644 --- a/Controls/MusicOrderViewer.cs +++ b/Controls/MusicOrderViewer.cs @@ -401,5 +401,29 @@ namespace TaikoSoundEditor.Controls public delegate void OnSongRemoved(MusicOrderViewer sender, MusicOrder mo); public event OnSongRemoved SongRemoved; + + private void ListStartButton_Click(object sender, EventArgs e) + { + CurrentPage = 0; + MusicOrdersPanel.Invalidate(); + } + + private void ListEndButton_Click(object sender, EventArgs e) + { + CurrentPage = PagesCount - 1; + MusicOrdersPanel.Invalidate(); + } + + private void Left10Button_Click(object sender, EventArgs e) + { + CurrentPage -= 10; + MusicOrdersPanel.Invalidate(); + } + + private void Right10Button_Click(object sender, EventArgs e) + { + CurrentPage += 10; + MusicOrdersPanel.Invalidate(); + } } } diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index 33f3730..c944e19 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -80,6 +80,36 @@ namespace TaikoSoundEditor.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ic_left_10 { + get { + object obj = ResourceManager.GetObject("ic_left_10", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ic_list_end { + get { + object obj = ResourceManager.GetObject("ic_list_end", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ic_list_start { + get { + object obj = ResourceManager.GetObject("ic_list_start", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -120,6 +150,16 @@ namespace TaikoSoundEditor.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ic_right_10 { + get { + object obj = ResourceManager.GetObject("ic_right_10", 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 c06419e..4faf1a9 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -124,6 +124,15 @@ ..\Resources\ic_cut_gs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ic_left_10.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ic_list_end.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ic_list_start.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 @@ -136,6 +145,9 @@ ..\Resources\ic_remove_gs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ic_right_10.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/Resources/ic_left_10.png b/Resources/ic_left_10.png new file mode 100644 index 0000000000000000000000000000000000000000..9e5e2794918024de0a615f709200cf4754dd38e8 GIT binary patch literal 757 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0*XmQK~!i%?Up@g zR6!8OXVu(AA^|^0B8nivR;{dTM1)joA*h7`Q-}ev5eq>y5lhiV1npE1RD@_1QLvK; z;zyxiQpg$n7Gop1dmp#{XJ_A;9C>%=%gdeN?GJ|k?!3Fbotb^JM-GR>;m9<~YAjl7 zJ8BI|)!yO~tBaNetH6*_j{~B^=e3@+F7|ao_F~0e*o$*o-qk+);Y5iMthXOt9a-AlsiIJu)*tybd4uh$H7&S0Way z0@xh7=qyHI$1W(clWnU%iW_-aU|d0QESoRDKmv2Lk$OT{THP0Brm_^GiwmYNhwT8 z=k!XxXfaYb;w7t<`SjfW=zFg&y)k=p|AnFoAoI^yyV|*Azo9X zl2N~GHLU(zG?(XhZ{IWe_R4rRD$sBMcv+FG(C0JH=7rvD3&ctlD~g3Bv0!fVBD3rG zUSO!lvI6;>1s;*b3=DDyK$uZbZ`*dDhVPy(jv*P&Z>QLMLy9O4z~$ zP8;eKB3i^`&m=8Z61nB*qQfWa8CH@oHA-8;H>ejj}JSmuZ7lR0~y2Wg0KwK^@FAhA8y{nv&eNGj(@r<};?!O{p^rwkGLK+TY{;e|O+T8U0T&4<3I{zmc#(y~VC_ zBlq*o)90T&9c-UwxT7(nPrOp^Lt-(w=%8Dx)Ko@A$iqkRoJ!&$*&eu zGtT{sa(`0E7I&8afh32`{_cGrp6kE)TK(YiUZ$G5CH2bEuAg~-{#*P_YUj?bFFom62n7XV8-8SlN3@?2K`SA6@g@S?}LhOGzfAu?_1atV_~@5U$|-)3Z- qqV7_>XUiW}aQFvkJURMw7u!Px#1ZP1_K>z@;j|==^1poj532;bRa{vGyzyJUqzyT31wzmKP0scuuK~!i%?Uqd_ zY+)G3-#N$kxeBFmWyT#fjfO%ArS96oMoCJOZduqUHY}{H%tA^Q79z<;7P4YPy6To_ ziZF!|BDy|m#2n|$hx0sV&cejZc(a+#^Q))dZ2s@ly#LdgVFW=C1VIoc#uD?lF}T`1 z3KlG4AK2US_Xju`yg4D}wB_3x=wEKa8_dcUhrog$;@R3wCfvcBGoS`~=jzA7R$I{k z*j3yJV!n%Y^jPb^4|nk9;xTUnp7EMlaB)TMAF$ij0Ae{A5_;!k13l5c{cZjGCg-5@51UeHCkR+UL0Ws#JSS#|ER5`L341}tl?i9Zwhux3YGAk_0Vet1Qq(-#oSvxRO`y5u-&1ryz zlnA>&m#cVkN1OjgVyhEkzTW|Z-yX*zSbMv4fbDhpAZ8KtBTu#-(JNm6yB)l_&oFNT z2F;zn=D{T{$pg06>No1&ctEdB9)GxlHx~~zV9?ZFJ_r6;DRqMbw+e`@PoE~-!J9Ln z2I6UGvrmJwC9wy*wQ!cw4&GeaH$V^sK@bFCUKo1=!u%vx);G`L00000NkvXXu0mjf D5m^=R literal 0 HcmV?d00001 diff --git a/Resources/ic_right_10.png b/Resources/ic_right_10.png new file mode 100644 index 0000000000000000000000000000000000000000..3e5cac71b8d3c158b69f449005f3671d8e96bd90 GIT binary patch literal 769 zcmV+c1OEJpP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0+vZcK~!i%?Up}i z6hRcm--za70s$k4r=1ckEYwCtuu+6yp((Wy3>FF!5D^hX6A{u_i3o~~2-eyOD%Xfe z&=@QvxkJT7O-Mj&B)5OZ@6F7fxy9s8cg{23{NUr8H@nR4n>RbNVLRtZ)Q#H#H>XS?CrL>4%P* zYu3n|z@U^}7p44Y!iD4Qgr4gr5vubN#(h@FoWNpWw)3!WIwG1Unngw0F9@;5bXlQc z34k(^$eA{^5v^uN$9L6X37ZMveSd=4o`$X0k$TWZ-0&Go&gZ!AcJE`>!R!0lSn8%f zz*+)$IqafUJc3SN6QYxYi0BxSy3cK!EWOEsTIT?^&=`ZH$I0b$k{?-n{>b{ptBOCldN)|SQH=( z^vVf*?YOKs*#G+q)SUpYc^1zo%a8nOg<4)kWv$55 z3V$s>QGhWad`kh#JhmpS^9>9X_-7Jp_BVGMY?Ine+|k~lJfGj7d~SA5d1?IJnDRUC zcc>17+l8_oWNEga*}9t@6)do$qLb{H`7P{eTm@`bAfe~PCjQyull&0-hr5&dBT3;Z z(5MR3i#v(`bzB0?#wE~fmVE*ahr{7$Wr%(NBtluwQBHQ700000NkvXXu0mjf@m69B literal 0 HcmV?d00001