diff --git a/BAKKA-Editor/MainForm.Designer.cs b/BAKKA-Editor/MainForm.Designer.cs index f6fd2da..f466333 100644 --- a/BAKKA-Editor/MainForm.Designer.cs +++ b/BAKKA-Editor/MainForm.Designer.cs @@ -74,11 +74,11 @@ this.groupBox5 = new System.Windows.Forms.GroupBox(); this.currentSelectionLabel = new System.Windows.Forms.Label(); this.playbackGroupBox = new System.Windows.Forms.GroupBox(); + this.songFileLabel = new System.Windows.Forms.Label(); this.labelSpeed = new System.Windows.Forms.Label(); this.trackBarSpeed = new System.Windows.Forms.TrackBar(); this.trackBarVolume = new System.Windows.Forms.TrackBar(); this.labelVolume = new System.Windows.Forms.Label(); - this.songFileLabel = new System.Windows.Forms.Label(); this.label20 = new System.Windows.Forms.Label(); this.songTrackBar = new System.Windows.Forms.TrackBar(); this.selectSongButton = new System.Windows.Forms.Button(); @@ -317,6 +317,7 @@ 0, 0, 0}); + this.sizeNumeric.ValueChanged += new System.EventHandler(this.sizeNumeric_ValueChanged); // // label2 // @@ -350,6 +351,7 @@ this.positionNumeric.Name = "positionNumeric"; this.positionNumeric.Size = new System.Drawing.Size(38, 23); this.positionNumeric.TabIndex = 1; + this.positionNumeric.ValueChanged += new System.EventHandler(this.positionNumeric_ValueChanged); // // label1 // @@ -429,12 +431,15 @@ // // endChartButton // + this.endChartButton.BackColor = System.Drawing.Color.Black; + this.endChartButton.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point); + this.endChartButton.ForeColor = System.Drawing.Color.White; this.endChartButton.Location = new System.Drawing.Point(6, 225); this.endChartButton.Name = "endChartButton"; this.endChartButton.Size = new System.Drawing.Size(86, 23); this.endChartButton.TabIndex = 12; this.endChartButton.Text = "End of Chart"; - this.endChartButton.UseVisualStyleBackColor = true; + this.endChartButton.UseVisualStyleBackColor = false; this.endChartButton.Click += new System.EventHandler(this.endChartButton_Click); // // holdButton @@ -526,9 +531,9 @@ this.gimmickTypeGroupBox.Controls.Add(this.timeSigButton); this.gimmickTypeGroupBox.Controls.Add(this.bpmChangeButton); this.gimmickTypeGroupBox.Controls.Add(this.maskButton); - this.gimmickTypeGroupBox.Location = new System.Drawing.Point(127, 30); + this.gimmickTypeGroupBox.Location = new System.Drawing.Point(127, 27); this.gimmickTypeGroupBox.Name = "gimmickTypeGroupBox"; - this.gimmickTypeGroupBox.Size = new System.Drawing.Size(124, 249); + this.gimmickTypeGroupBox.Size = new System.Drawing.Size(124, 252); this.gimmickTypeGroupBox.TabIndex = 5; this.gimmickTypeGroupBox.TabStop = false; this.gimmickTypeGroupBox.Text = "Gimmick Types"; @@ -688,11 +693,11 @@ // this.playbackGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.playbackGroupBox.Controls.Add(this.songFileLabel); this.playbackGroupBox.Controls.Add(this.labelSpeed); this.playbackGroupBox.Controls.Add(this.trackBarSpeed); this.playbackGroupBox.Controls.Add(this.trackBarVolume); this.playbackGroupBox.Controls.Add(this.labelVolume); - this.playbackGroupBox.Controls.Add(this.songFileLabel); this.playbackGroupBox.Controls.Add(this.label20); this.playbackGroupBox.Controls.Add(this.songTrackBar); this.playbackGroupBox.Controls.Add(this.selectSongButton); @@ -704,6 +709,15 @@ this.playbackGroupBox.TabStop = false; this.playbackGroupBox.Text = "Playback"; // + // songFileLabel + // + this.songFileLabel.AutoSize = true; + this.songFileLabel.Location = new System.Drawing.Point(98, 81); + this.songFileLabel.Name = "songFileLabel"; + this.songFileLabel.Size = new System.Drawing.Size(134, 15); + this.songFileLabel.TabIndex = 33; + this.songFileLabel.Text = "Select File (*.ogg, *.wav)"; + // // labelSpeed // this.labelSpeed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); @@ -754,15 +768,6 @@ this.labelVolume.TabIndex = 0; this.labelVolume.Text = "Volume"; // - // songFileLabel - // - this.songFileLabel.AutoSize = true; - this.songFileLabel.Location = new System.Drawing.Point(98, 81); - this.songFileLabel.Name = "songFileLabel"; - this.songFileLabel.Size = new System.Drawing.Size(134, 15); - this.songFileLabel.TabIndex = 33; - this.songFileLabel.Text = "Select File (*.ogg, *.wav)"; - // // label20 // this.label20.AutoSize = true; diff --git a/BAKKA-Editor/MainForm.cs b/BAKKA-Editor/MainForm.cs index a77dea0..c23274a 100644 --- a/BAKKA-Editor/MainForm.cs +++ b/BAKKA-Editor/MainForm.cs @@ -205,6 +205,7 @@ namespace BAKKA_Editor chart = new(); isNewFile = true; isRecoveredFile = false; + ResetChartTime(); DeleteAutosaves(); UpdateNoteLabels(-1); UpdateGimmickLabels(-1); @@ -248,6 +249,7 @@ namespace BAKKA_Editor int timeSigUpper = initTimeSig != null ? initTimeSig.TimeSig.Upper : 4; int timeSigLower = initTimeSig != null ? initTimeSig.TimeSig.Lower : 4; initSettingsForm.SetValues(bpm, timeSigUpper, timeSigLower, chart.Offset, chart.MovieOffset); + ResetChartTime(); UpdateNoteLabels(chart.Notes.Count > 0 ? 0 : -1); UpdateGimmickLabels(chart.Gimmicks.Count > 0 ? 0 : -1); saveFileDialog.FileName = openFileDialog.FileName; @@ -595,12 +597,24 @@ namespace BAKKA_Editor } } + private void positionNumeric_ValueChanged(object sender, EventArgs e) + { + positionTrackBar.Value = (int)positionNumeric.Value; + circlePanel.Invalidate(); + } + private void positionTrackBar_ValueChanged(object sender, EventArgs e) { positionNumeric.Value = positionTrackBar.Value; circlePanel.Invalidate(); } + private void sizeNumeric_ValueChanged(object sender, EventArgs e) + { + sizeTrackBar.Value = (int)sizeNumeric.Value; + circlePanel.Invalidate(); + } + private void sizeTrackBar_ValueChanged(object sender, EventArgs e) { sizeNumeric.Value = sizeTrackBar.Value; @@ -1555,6 +1569,14 @@ namespace BAKKA_Editor } } + private void ResetChartTime() + { + measureNumeric.Value = beat1Numeric.Value = 0; + positionNumeric.Value = 0; + sizeNumeric.Value = 1; + updateTime(); + } + private void notePrevButton_Click(object sender, EventArgs e) { if (chart.Notes.Count == 0) @@ -1633,8 +1655,11 @@ namespace BAKKA_Editor { if (selectedNoteIndex == -1) return; - var currentNote = chart.Notes[selectedNoteIndex]; + + if (currentNote.NoteType == NoteType.EndOfChart) + return; + var newNote = new Note() { BeatInfo = currentNote.BeatInfo, @@ -1959,6 +1984,5 @@ namespace BAKKA_Editor currentSong.PlaybackSpeed = (trackBarSpeed.Value / (float)trackBarSpeed.Maximum); labelSpeed.Text = $"Speed (x{currentSong.PlaybackSpeed:0.00})"; } - } } \ No newline at end of file diff --git a/BAKKA-Editor/Operations/NoteOperation.cs b/BAKKA-Editor/Operations/NoteOperation.cs index 91a5f31..154a73a 100644 --- a/BAKKA-Editor/Operations/NoteOperation.cs +++ b/BAKKA-Editor/Operations/NoteOperation.cs @@ -16,6 +16,13 @@ namespace BAKKA_Editor.Operations { Chart = chart; Note = item; + + // Force End of Chart note to be the correct position and size + if (Note.NoteType == NoteType.EndOfChart) + { + Note.Position = 0; + Note.Size = 60; + } } public abstract void Redo(); diff --git a/BAKKA-Editor/Utils.cs b/BAKKA-Editor/Utils.cs index 6f186ea..c958074 100644 --- a/BAKKA-Editor/Utils.cs +++ b/BAKKA-Editor/Utils.cs @@ -53,6 +53,8 @@ namespace BAKKA_Editor case NoteType.Chain: case NoteType.ChainBonusFlair: return Color.FromArgb(204, 190, 45); + case NoteType.EndOfChart: + return Color.Black; default: return Color.Transparent; }