Compare commits
19
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27497c92ba | ||
|
|
076e86b643 | ||
|
|
d9a72132a0 | ||
|
|
23883e46b6 | ||
|
|
bfa9f8f791 | ||
|
|
e695203087 | ||
|
|
85d3f63c50 | ||
|
|
89db842aa2 | ||
|
|
679ca8c130 | ||
|
|
8f67e6498c | ||
|
|
51231b2e2e | ||
|
|
b56900d6c7 | ||
|
|
64b1be61c9 | ||
|
|
d5106d3030 | ||
|
|
84a1248234 | ||
|
|
a6be9e759a | ||
|
|
cd29218fc8 | ||
|
|
8d0b39774e | ||
|
|
971285d0aa |
@@ -7,9 +7,9 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>$(VersionPrefix)2.0.0</Version>
|
||||
<Version>$(VersionPrefix)2.1.6</Version>
|
||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||
<FileVersion>2.0.0</FileVersion>
|
||||
<FileVersion>2.1.6</FileVersion>
|
||||
<Company>Goatgarien</Company>
|
||||
<Copyright>2022</Copyright>
|
||||
<StartupObject>BAKKA_Editor.Program</StartupObject>
|
||||
|
||||
+12
-5
@@ -80,6 +80,9 @@ namespace BAKKA_Editor
|
||||
Dictionary<int, int> refByLine = new();
|
||||
for (int i = index; i < file.Length; i++)
|
||||
{
|
||||
if (String.IsNullOrWhiteSpace(file[i]))
|
||||
continue;
|
||||
|
||||
var parsed = file[i].Split(new string[] {" "}, StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
|
||||
NoteBase temp = new();
|
||||
temp.BeatInfo = new BeatInfo(Convert.ToInt32(parsed[0]), Convert.ToInt32(parsed[1]));
|
||||
@@ -254,10 +257,14 @@ namespace BAKKA_Editor
|
||||
TimeEvents[0].StartTime = Offset * 1000.0;
|
||||
for (int i = 1; i < TimeEvents.Count; i++)
|
||||
{
|
||||
TimeEvents[i].StartTime = ((TimeEvents[i].Measure - TimeEvents[i - 1].Measure) * 4 * TimeEvents[i - 1].TimeSig.Ratio * 60000.0 / TimeEvents[i].BPM) + TimeEvents[i - 1].StartTime;
|
||||
TimeEvents[i].StartTime = ((TimeEvents[i].Measure - TimeEvents[i - 1].Measure) * (4.0f * TimeEvents[i - 1].TimeSig.Ratio * (60000.0 / TimeEvents[i - 1].BPM))) + TimeEvents[i - 1].StartTime;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
((60000.0 / evt.BPM) * 4.0 * evt.TimeSig.Ratio) * measure = time
|
||||
time / ((60000.0 / evt.BPM) * 4.0 * evt.TimeSig.Ratio) = measure
|
||||
*/
|
||||
|
||||
/// <summary>
|
||||
/// Translate clock time to beats
|
||||
/// </summary>
|
||||
@@ -271,7 +278,7 @@ namespace BAKKA_Editor
|
||||
var evt = TimeEvents.Where(x => time >= x.StartTime).LastOrDefault();
|
||||
if (evt == null)
|
||||
evt = TimeEvents[0];
|
||||
return new BeatInfo((float)(evt.BPM * (time - evt.StartTime) / (60000.0f * evt.TimeSig.Ratio * 4)) + evt.Measure);
|
||||
return new BeatInfo((float)((time - evt.StartTime) / ((60000.0 / evt.BPM) * 4.0f * evt.TimeSig.Ratio) + evt.Measure));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -287,7 +294,7 @@ namespace BAKKA_Editor
|
||||
var evt = TimeEvents.Where(x => beat.MeasureDecimal >= x.Measure).LastOrDefault();
|
||||
if (evt == null)
|
||||
evt = TimeEvents[0];
|
||||
return (int)((60000.0 * 4.0 * evt.TimeSig.Ratio / evt.BPM) * (beat.MeasureDecimal - evt.Measure) + evt.StartTime);
|
||||
return (int)(((60000.0 / evt.BPM) * 4.0f * evt.TimeSig.Ratio) * (beat.MeasureDecimal - evt.Measure) + evt.StartTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+142
-26
@@ -4,6 +4,8 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Threading.Tasks;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace BAKKA_Editor
|
||||
{
|
||||
@@ -15,10 +17,7 @@ namespace BAKKA_Editor
|
||||
public PointF CenterPoint { get; private set; }
|
||||
public float Radius { get; private set; }
|
||||
public float CurrentMeasure { get; set; }
|
||||
/// <summary>
|
||||
/// Number of measures in the future that are visible
|
||||
/// </summary>
|
||||
public float TotalMeasureShowNotes { get; set; } = 0.5f;
|
||||
public float Hispeed { get; set; } = 1.5f;
|
||||
|
||||
// Pens and Brushes
|
||||
public Pen BasePen { get; set; }
|
||||
@@ -74,11 +73,103 @@ namespace BAKKA_Editor
|
||||
FlairPen = new Pen(Color.FromArgb(FlairTransparency, Color.Yellow), PanelSize.Width * 8.0f / 600.0f);
|
||||
}
|
||||
|
||||
private ArcInfo GetScaledRect(float objectTime)
|
||||
private float GetTotalMeasureShowNotes(Chart chart)
|
||||
{
|
||||
//Convert hispeed to frames
|
||||
float displayFrames = 73.0f - ((Hispeed - 1.5f) * 10.0f);
|
||||
//Account for hispeed gimmick
|
||||
List<Gimmick> HispeedChanges = new List<Gimmick>();
|
||||
Gimmick InitialSpeed = chart.Gimmicks.Where(x => x.GimmickType == GimmickType.HiSpeedChange && CurrentMeasure > x.Measure).LastOrDefault();
|
||||
//Add initial hispeed to list
|
||||
if (InitialSpeed == null)
|
||||
{
|
||||
InitialSpeed = new Gimmick();
|
||||
InitialSpeed.HiSpeed = 1.0;
|
||||
}
|
||||
HispeedChanges.Add(InitialSpeed);
|
||||
//add all hispeed changes to list that happen within the current total time to show notes
|
||||
float tempTotalTime = ((displayFrames / 60.0f) * 1000.0f);
|
||||
float currentTime = chart.GetTime(new BeatInfo(CurrentMeasure));
|
||||
float tempEndTime = currentTime + tempTotalTime;
|
||||
HispeedChanges.AddRange(chart.Gimmicks.Where(
|
||||
x => x.Measure >= CurrentMeasure
|
||||
&& chart.GetTime(new BeatInfo(x.Measure)) < tempEndTime
|
||||
&& x.GimmickType == GimmickType.HiSpeedChange).ToList());
|
||||
if (HispeedChanges.Count > 1)
|
||||
{
|
||||
for (int i = 0; i < HispeedChanges.Count; i++)
|
||||
{
|
||||
float timeDiff;
|
||||
float itemTime;
|
||||
float modifiedTime;
|
||||
if (chart.GetTime(HispeedChanges[i].BeatInfo) <= (tempTotalTime + currentTime))
|
||||
{
|
||||
if (i == 0)
|
||||
itemTime = currentTime;
|
||||
else
|
||||
itemTime = chart.GetTime(HispeedChanges[i].BeatInfo);
|
||||
if (i != HispeedChanges.Count - 1)
|
||||
{
|
||||
float tempTestITimeDiff = (currentTime + tempTotalTime) - itemTime;
|
||||
float tempTestIModifiedTime = (tempTestITimeDiff) / (float)(HispeedChanges[i].HiSpeed);
|
||||
if ((currentTime + tempTotalTime - tempTestITimeDiff + tempTestIModifiedTime) < chart.GetTime(HispeedChanges[i + 1].BeatInfo))
|
||||
{
|
||||
timeDiff = (currentTime + tempTotalTime) - itemTime;
|
||||
modifiedTime = timeDiff / (float)HispeedChanges[i].HiSpeed;
|
||||
}
|
||||
else
|
||||
{
|
||||
timeDiff = chart.GetTime(HispeedChanges[i + 1].BeatInfo) - itemTime;
|
||||
modifiedTime = timeDiff / (float)HispeedChanges[i].HiSpeed;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
timeDiff = (currentTime + tempTotalTime) - itemTime;
|
||||
modifiedTime = timeDiff / (float)HispeedChanges[i].HiSpeed;
|
||||
}
|
||||
tempTotalTime = tempTotalTime - timeDiff + modifiedTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
tempTotalTime /= (float)HispeedChanges[0].HiSpeed;
|
||||
}
|
||||
//convert total time to total measure
|
||||
tempEndTime = currentTime + tempTotalTime;
|
||||
BeatInfo EndMeasure = chart.GetBeat(tempEndTime);
|
||||
return EndMeasure.MeasureDecimal - CurrentMeasure;
|
||||
}
|
||||
|
||||
private float GetNoteScaleFromMeasure(Chart chart, float objectTime)
|
||||
{
|
||||
// Scale from 0-1
|
||||
float objectTimeAsTime = chart.GetTime(new BeatInfo(objectTime));
|
||||
float currentTime = chart.GetTime(new BeatInfo(CurrentMeasure));
|
||||
float EndTimeShowNotes = chart.GetTime(new BeatInfo(CurrentMeasure + GetTotalMeasureShowNotes(chart)));
|
||||
float notescaleInit;
|
||||
var LatestHispeedChange = chart.Gimmicks.Where(x => x.GimmickType == GimmickType.HiSpeedChange && CurrentMeasure >= x.Measure).LastOrDefault();
|
||||
if (LatestHispeedChange != null && LatestHispeedChange.HiSpeed < 0.0)
|
||||
{
|
||||
//Reverse
|
||||
notescaleInit = (objectTimeAsTime - currentTime) / (EndTimeShowNotes - currentTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Normal
|
||||
notescaleInit = 1 - ((objectTimeAsTime - currentTime) / (EndTimeShowNotes - currentTime));
|
||||
}
|
||||
//Scale math
|
||||
notescaleInit = 0.001f + (float)Math.Pow(notescaleInit, 3.0f) - (0.501f * (float)Math.Pow(notescaleInit, 2.0f)) + (0.5f * notescaleInit);
|
||||
return notescaleInit;
|
||||
}
|
||||
|
||||
private ArcInfo GetScaledRect(Chart chart, float objectTime)
|
||||
{
|
||||
ArcInfo info = new();
|
||||
float notescaleInit = 1 - ((objectTime - CurrentMeasure) * (1 / TotalMeasureShowNotes)); // Scale from 0-1
|
||||
info.NoteScale = (float)Math.Pow(10.0f, notescaleInit) / 10.0f;
|
||||
|
||||
info.NoteScale = GetNoteScaleFromMeasure(chart, objectTime);
|
||||
float scaledRectSize = DrawRect.Width * info.NoteScale;
|
||||
float scaledRadius = scaledRectSize / 2.0f;
|
||||
info.Rect = new RectangleF(
|
||||
@@ -89,9 +180,9 @@ namespace BAKKA_Editor
|
||||
return info;
|
||||
}
|
||||
|
||||
private ArcInfo GetArcInfo(Note note)
|
||||
private ArcInfo GetArcInfo(Chart chart, Note note)
|
||||
{
|
||||
ArcInfo info = GetScaledRect(note.Measure);
|
||||
ArcInfo info = GetScaledRect(chart, note.Measure);
|
||||
info.StartAngle = -note.Position * 6;
|
||||
info.ArcLength = -note.Size * 6;
|
||||
if(info.ArcLength != -360)
|
||||
@@ -191,15 +282,15 @@ namespace BAKKA_Editor
|
||||
}
|
||||
}
|
||||
|
||||
public void DrawCircle()
|
||||
public void DrawCircle(Chart chart)
|
||||
{
|
||||
// Switch drawing modes
|
||||
bufGraphics.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
||||
|
||||
// Draw measure circle
|
||||
for (float meas = (float)Math.Ceiling(CurrentMeasure); (meas - CurrentMeasure) < TotalMeasureShowNotes; meas += 1.0f)
|
||||
for (float meas = (float)Math.Ceiling(CurrentMeasure); (meas - CurrentMeasure) < GetTotalMeasureShowNotes(chart); meas += 1.0f)
|
||||
{
|
||||
var info = GetScaledRect(meas);
|
||||
var info = GetScaledRect(chart, meas);
|
||||
if (info.Rect.Width >= 1)
|
||||
{
|
||||
bufGraphics.Graphics.DrawEllipse(BeatPen, info.Rect);
|
||||
@@ -242,21 +333,41 @@ namespace BAKKA_Editor
|
||||
}
|
||||
}
|
||||
|
||||
public void DrawGimmicks(Chart chart, bool showGimmicks, int selectedGimmickIndex)
|
||||
{
|
||||
if (showGimmicks)
|
||||
{
|
||||
List<Gimmick> drawGimmicks = chart.Gimmicks.Where(
|
||||
x => x.Measure >= CurrentMeasure
|
||||
&& x.Measure <= (CurrentMeasure + GetTotalMeasureShowNotes(chart))).ToList();
|
||||
|
||||
foreach (var gimmick in drawGimmicks)
|
||||
{
|
||||
var info = GetScaledRect(chart, gimmick.Measure);
|
||||
|
||||
if (info.Rect.Width >= 1)
|
||||
{
|
||||
bufGraphics.Graphics.DrawEllipse(GetPen(gimmick), info.Rect);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void DrawHolds(Chart chart, bool highlightSelectedNote, int selectedNoteIndex)
|
||||
{
|
||||
ArcInfo currentInfo = GetScaledRect(CurrentMeasure);
|
||||
ArcInfo endInfo = GetScaledRect(CurrentMeasure + TotalMeasureShowNotes);
|
||||
ArcInfo currentInfo = GetScaledRect(chart, CurrentMeasure);
|
||||
ArcInfo endInfo = GetScaledRect(chart, CurrentMeasure + GetTotalMeasureShowNotes(chart));
|
||||
|
||||
// First, draw holes that start before the viewpoint and have nodes that end after
|
||||
List<Note> holdNotes = chart.Notes.Where(
|
||||
x => x.Measure < CurrentMeasure
|
||||
&& x.NextNote != null
|
||||
&& x.NextNote.Measure > (CurrentMeasure + TotalMeasureShowNotes)
|
||||
&& x.NextNote.Measure > (CurrentMeasure + GetTotalMeasureShowNotes(chart))
|
||||
&& x.IsHold).ToList();
|
||||
foreach (var note in holdNotes)
|
||||
{
|
||||
ArcInfo info = GetArcInfo(note);
|
||||
ArcInfo nextInfo = GetArcInfo((Note)note.NextNote);
|
||||
ArcInfo info = GetArcInfo(chart, note);
|
||||
ArcInfo nextInfo = GetArcInfo(chart, (Note)note.NextNote);
|
||||
//GraphicsPath path = new GraphicsPath();
|
||||
//path.AddArc(endInfo.Rect, info.StartAngle, info.ArcLength);
|
||||
//path.AddArc(currentInfo.Rect, info.StartAngle + info.ArcLength, -info.ArcLength);
|
||||
@@ -303,16 +414,16 @@ namespace BAKKA_Editor
|
||||
// Second, draw all the notes on-screen
|
||||
holdNotes = chart.Notes.Where(
|
||||
x => x.Measure >= CurrentMeasure
|
||||
&& x.Measure <= (CurrentMeasure + TotalMeasureShowNotes)
|
||||
&& x.Measure <= (CurrentMeasure + GetTotalMeasureShowNotes(chart))
|
||||
&& x.IsHold).ToList();
|
||||
foreach (var note in holdNotes)
|
||||
{
|
||||
ArcInfo info = GetArcInfo(note);
|
||||
ArcInfo info = GetArcInfo(chart, note);
|
||||
|
||||
// If the previous note is off-screen, this case handles that
|
||||
if (note.PrevNote != null && note.PrevNote.Measure < CurrentMeasure)
|
||||
{
|
||||
ArcInfo prevInfo = GetArcInfo((Note)note.PrevNote);
|
||||
ArcInfo prevInfo = GetArcInfo(chart, (Note)note.PrevNote);
|
||||
float ratio = (currentInfo.Rect.Width - info.Rect.Width) / (prevInfo.Rect.Width - info.Rect.Width);
|
||||
float startNoteAngle = info.StartAngle;
|
||||
float endNoteAngle = prevInfo.StartAngle;
|
||||
@@ -336,9 +447,9 @@ namespace BAKKA_Editor
|
||||
}
|
||||
|
||||
// If the next note is on-screen, this case handles that
|
||||
if (note.NextNote != null && note.NextNote.Measure <= (CurrentMeasure + TotalMeasureShowNotes))
|
||||
if (note.NextNote != null && note.NextNote.Measure <= (CurrentMeasure + GetTotalMeasureShowNotes(chart)))
|
||||
{
|
||||
ArcInfo nextInfo = GetArcInfo((Note)note.NextNote);
|
||||
ArcInfo nextInfo = GetArcInfo(chart, (Note)note.NextNote);
|
||||
GraphicsPath path = new GraphicsPath();
|
||||
path.AddArc(info.Rect, info.StartAngle, info.ArcLength);
|
||||
path.AddArc(nextInfo.Rect, nextInfo.StartAngle + nextInfo.ArcLength, -nextInfo.ArcLength);
|
||||
@@ -346,9 +457,9 @@ namespace BAKKA_Editor
|
||||
}
|
||||
|
||||
// If the next note is off-screen, this case handles that
|
||||
if (note.NextNote != null && note.NextNote.Measure > (CurrentMeasure + TotalMeasureShowNotes))
|
||||
if (note.NextNote != null && note.NextNote.Measure > (CurrentMeasure + GetTotalMeasureShowNotes(chart)))
|
||||
{
|
||||
ArcInfo nextInfo = GetArcInfo((Note)note.NextNote);
|
||||
ArcInfo nextInfo = GetArcInfo(chart, (Note)note.NextNote);
|
||||
float ratio = (endInfo.Rect.Width - nextInfo.Rect.Width) / (info.Rect.Width - nextInfo.Rect.Width);
|
||||
float startNoteAngle = nextInfo.StartAngle;
|
||||
float endNoteAngle = info.StartAngle;
|
||||
@@ -396,11 +507,11 @@ namespace BAKKA_Editor
|
||||
{
|
||||
List<Note> drawNotes = chart.Notes.Where(
|
||||
x => x.Measure >= CurrentMeasure
|
||||
&& x.Measure <= (CurrentMeasure + TotalMeasureShowNotes)
|
||||
&& x.Measure <= (CurrentMeasure + GetTotalMeasureShowNotes(chart))
|
||||
&& !x.IsHold && !x.IsMask).ToList();
|
||||
foreach (var note in drawNotes)
|
||||
{
|
||||
ArcInfo info = GetArcInfo(note);
|
||||
ArcInfo info = GetArcInfo(chart, note);
|
||||
|
||||
if (info.Rect.Width >= 1)
|
||||
{
|
||||
@@ -450,6 +561,11 @@ namespace BAKKA_Editor
|
||||
{
|
||||
return new Pen(Color.FromArgb(CursorTransparency, Utils.NoteTypeToColor(noteType)), PanelSize.Width * 24.0f / 600.0f);
|
||||
}
|
||||
|
||||
public Pen GetPen(Gimmick gimmick)
|
||||
{
|
||||
return new Pen(Utils.GimmickTypeToColor(gimmick.GimmickType), PanelSize.Width * 1.0f / 600.0f);
|
||||
}
|
||||
}
|
||||
|
||||
internal struct ArcInfo
|
||||
|
||||
+27
-27
@@ -36,7 +36,7 @@ namespace BAKKA_Editor
|
||||
internal DialogResult Show(
|
||||
Gimmick baseGimmick, FormReason reason, Gimmick? gim1 = null, Gimmick? gim2 = null)
|
||||
{
|
||||
var quant = Utils.GetQuantization(baseGimmick.BeatInfo.Beat, 16);
|
||||
var quant = Utils.GetQuantization(baseGimmick.BeatInfo.Beat, 12);
|
||||
|
||||
gimmick = new Gimmick();
|
||||
gimmick.BeatInfo = new BeatInfo(baseGimmick.BeatInfo);
|
||||
@@ -46,15 +46,15 @@ namespace BAKKA_Editor
|
||||
{
|
||||
case GimmickType.BpmChange:
|
||||
startMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
||||
startBeat1Numeric.Value = quant.Item1;
|
||||
startBeat2Numeric.Value = quant.Item2;
|
||||
startBeat1Numeric.Value = quant.Item1;
|
||||
if (reason == FormReason.Edit)
|
||||
gimmickBpmNumeric.Value = (decimal)baseGimmick.BPM;
|
||||
break;
|
||||
case GimmickType.TimeSignatureChange:
|
||||
startMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
||||
startBeat1Numeric.Value = quant.Item1;
|
||||
startBeat2Numeric.Value = quant.Item2;
|
||||
startBeat1Numeric.Value = quant.Item1;
|
||||
if (reason == FormReason.Edit)
|
||||
{
|
||||
timeSig1Numeric.Value = baseGimmick.TimeSig.Upper;
|
||||
@@ -63,73 +63,73 @@ namespace BAKKA_Editor
|
||||
break;
|
||||
case GimmickType.HiSpeedChange:
|
||||
startMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
||||
startBeat1Numeric.Value = quant.Item1;
|
||||
startBeat2Numeric.Value = quant.Item2;
|
||||
startBeat1Numeric.Value = quant.Item1;
|
||||
if (reason == FormReason.Edit)
|
||||
hiSpeedNumeric.Value = (decimal)baseGimmick.HiSpeed;
|
||||
break;
|
||||
case GimmickType.ReverseStart:
|
||||
startMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
||||
startBeat1Numeric.Value = quant.Item1;
|
||||
startBeat2Numeric.Value = quant.Item2;
|
||||
startBeat1Numeric.Value = quant.Item1;
|
||||
if (reason == FormReason.Edit && gim1 != null && gim2 != null)
|
||||
{
|
||||
var quantMid1 = Utils.GetQuantization(gim1.BeatInfo.Beat, 16);
|
||||
var quantEnd1 = Utils.GetQuantization(gim2.BeatInfo.Beat, 16);
|
||||
var quantMid1 = Utils.GetQuantization(gim1.BeatInfo.Beat, 12);
|
||||
var quantEnd1 = Utils.GetQuantization(gim2.BeatInfo.Beat, 12);
|
||||
revEnd1MeasureNumeric.Value = gim1.BeatInfo.Measure;
|
||||
revEnd1Beat1Numeric.Value = quantMid1.Item1;
|
||||
revEnd1Beat2Numeric.Value = quantMid1.Item2;
|
||||
revEnd1Beat1Numeric.Value = quantMid1.Item1;
|
||||
revEnd2MeasureNumeric.Value = gim2.BeatInfo.Measure;
|
||||
revEnd2Beat1Numeric.Value = quantEnd1.Item1;
|
||||
revEnd2Beat2Numeric.Value = quantEnd1.Item2;
|
||||
revEnd2Beat1Numeric.Value = quantEnd1.Item1;
|
||||
}
|
||||
break;
|
||||
case GimmickType.ReverseMiddle:
|
||||
var quantStart2 = Utils.GetQuantization(gim1.BeatInfo.Beat, 16);
|
||||
var quantEnd2 = Utils.GetQuantization(gim2.BeatInfo.Beat, 16);
|
||||
startMeasureNumeric.Value = gim1.BeatInfo.Measure;
|
||||
startBeat1Numeric.Value = quantStart2.Item1;
|
||||
var quantStart2 = Utils.GetQuantization(gim1.BeatInfo.Beat, 12);
|
||||
var quantEnd2 = Utils.GetQuantization(gim2.BeatInfo.Beat, 12);
|
||||
startMeasureNumeric.Value = gim1.BeatInfo.Measure;
|
||||
startBeat2Numeric.Value = quantStart2.Item2;
|
||||
startBeat1Numeric.Value = quantStart2.Item1;
|
||||
revEnd1MeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
||||
revEnd1Beat1Numeric.Value = quant.Item1;
|
||||
revEnd1Beat2Numeric.Value = quant.Item2;
|
||||
revEnd1Beat1Numeric.Value = quant.Item1;
|
||||
revEnd2MeasureNumeric.Value = gim2.BeatInfo.Measure;
|
||||
revEnd2Beat1Numeric.Value = quantEnd2.Item1;
|
||||
revEnd2Beat2Numeric.Value = quantEnd2.Item2;
|
||||
revEnd2Beat1Numeric.Value = quantEnd2.Item1;
|
||||
break;
|
||||
case GimmickType.ReverseEnd:
|
||||
var quantStart3 = Utils.GetQuantization(gim1.BeatInfo.Beat, 16);
|
||||
var quantMid3 = Utils.GetQuantization(gim2.BeatInfo.Beat, 16);
|
||||
var quantStart3 = Utils.GetQuantization(gim1.BeatInfo.Beat, 12);
|
||||
var quantMid3 = Utils.GetQuantization(gim2.BeatInfo.Beat, 12);
|
||||
startMeasureNumeric.Value = gim1.BeatInfo.Measure;
|
||||
startBeat1Numeric.Value = quantStart3.Item1;
|
||||
startBeat2Numeric.Value = quantStart3.Item2;
|
||||
revEnd1MeasureNumeric.Value = gim2.BeatInfo.Measure;
|
||||
revEnd1Beat1Numeric.Value = quantMid3.Item1;
|
||||
startBeat1Numeric.Value = quantStart3.Item1;
|
||||
revEnd1MeasureNumeric.Value = gim2.BeatInfo.Measure;
|
||||
revEnd1Beat2Numeric.Value = quantMid3.Item2;
|
||||
revEnd1Beat1Numeric.Value = quantMid3.Item1;
|
||||
revEnd2MeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
||||
revEnd2Beat1Numeric.Value = quant.Item1;
|
||||
revEnd2Beat2Numeric.Value = quant.Item2;
|
||||
revEnd2Beat1Numeric.Value = quant.Item1;
|
||||
break;
|
||||
case GimmickType.StopStart:
|
||||
startMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
||||
startBeat1Numeric.Value = quant.Item1;
|
||||
startBeat2Numeric.Value = quant.Item2;
|
||||
startBeat1Numeric.Value = quant.Item1;
|
||||
if (reason == FormReason.Edit)
|
||||
{
|
||||
var stopEnd = Utils.GetQuantization(gim1.BeatInfo.Beat, 16);
|
||||
var stopEnd = Utils.GetQuantization(gim1.BeatInfo.Beat, 12);
|
||||
stopEndMeasureNumeric.Value = gim1.BeatInfo.Measure;
|
||||
stopEndBeat1Numeric.Value = stopEnd.Item1;
|
||||
stopEndBeat2Numeric.Value = stopEnd.Item2;
|
||||
stopEndBeat1Numeric.Value = stopEnd.Item1;
|
||||
}
|
||||
break;
|
||||
case GimmickType.StopEnd:
|
||||
var stopStart = Utils.GetQuantization(gim1.BeatInfo.Beat, 16);
|
||||
var stopStart = Utils.GetQuantization(gim1.BeatInfo.Beat, 12);
|
||||
startMeasureNumeric.Value = gim1.BeatInfo.Measure;
|
||||
startBeat1Numeric.Value = stopStart.Item1;
|
||||
startBeat2Numeric.Value = stopStart.Item2;
|
||||
startBeat1Numeric.Value = stopStart.Item1;
|
||||
stopEndMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
||||
stopEndBeat1Numeric.Value = quant.Item1;
|
||||
stopEndBeat2Numeric.Value = quant.Item2;
|
||||
stopEndBeat1Numeric.Value = quant.Item1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
+5
@@ -96,6 +96,11 @@
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.initOffsetNumeric.Minimum = new decimal(new int[] {
|
||||
9999,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
this.initOffsetNumeric.Name = "initOffsetNumeric";
|
||||
this.initOffsetNumeric.Size = new System.Drawing.Size(100, 23);
|
||||
this.initOffsetNumeric.TabIndex = 26;
|
||||
|
||||
Generated
+77
-61
@@ -100,6 +100,7 @@
|
||||
this.showCursorDuringPlaybackToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.highlightViewedNoteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.selectLastInsertedNoteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.showGimmicksInCircleViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.chartToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.initialChartSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -108,6 +109,7 @@
|
||||
this.undoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.redoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.groupBox6 = new System.Windows.Forms.GroupBox();
|
||||
this.gimmickJumpToCurrTimeButton = new System.Windows.Forms.Button();
|
||||
this.gimmickDeleteButton = new System.Windows.Forms.Button();
|
||||
this.gimmickEditButton = new System.Windows.Forms.Button();
|
||||
this.gimmickBeatLabel = new System.Windows.Forms.Label();
|
||||
@@ -125,8 +127,7 @@
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.noteSizeLabel = new System.Windows.Forms.Label();
|
||||
this.label17 = new System.Windows.Forms.Label();
|
||||
this.noteNextMeasureButton = new System.Windows.Forms.Button();
|
||||
this.notePrevMeasureButton = new System.Windows.Forms.Button();
|
||||
this.noteJumpToCurrTimeButton = new System.Windows.Forms.Button();
|
||||
this.noteDeleteSelectedButton = new System.Windows.Forms.Button();
|
||||
this.noteEditSelectedButton = new System.Windows.Forms.Button();
|
||||
this.noteBeatLabel = new System.Windows.Forms.Label();
|
||||
@@ -289,12 +290,12 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.sizeTrackBar.Location = new System.Drawing.Point(50, 81);
|
||||
this.sizeTrackBar.Maximum = 60;
|
||||
this.sizeTrackBar.Minimum = 1;
|
||||
this.sizeTrackBar.Minimum = 4;
|
||||
this.sizeTrackBar.Name = "sizeTrackBar";
|
||||
this.sizeTrackBar.Size = new System.Drawing.Size(183, 45);
|
||||
this.sizeTrackBar.TabIndex = 5;
|
||||
this.sizeTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
|
||||
this.sizeTrackBar.Value = 1;
|
||||
this.sizeTrackBar.Value = 4;
|
||||
this.sizeTrackBar.ValueChanged += new System.EventHandler(this.sizeTrackBar_ValueChanged);
|
||||
//
|
||||
// sizeNumeric
|
||||
@@ -306,7 +307,7 @@
|
||||
0,
|
||||
0});
|
||||
this.sizeNumeric.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
@@ -314,7 +315,7 @@
|
||||
this.sizeNumeric.Size = new System.Drawing.Size(38, 23);
|
||||
this.sizeNumeric.TabIndex = 4;
|
||||
this.sizeNumeric.Value = new decimal(new int[] {
|
||||
1,
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
@@ -437,7 +438,7 @@
|
||||
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.Size = new System.Drawing.Size(97, 23);
|
||||
this.endChartButton.TabIndex = 12;
|
||||
this.endChartButton.Text = "End of Chart";
|
||||
this.endChartButton.UseVisualStyleBackColor = false;
|
||||
@@ -448,7 +449,7 @@
|
||||
this.holdButton.BackColor = System.Drawing.Color.Yellow;
|
||||
this.holdButton.Location = new System.Drawing.Point(6, 196);
|
||||
this.holdButton.Name = "holdButton";
|
||||
this.holdButton.Size = new System.Drawing.Size(86, 23);
|
||||
this.holdButton.Size = new System.Drawing.Size(97, 23);
|
||||
this.holdButton.TabIndex = 11;
|
||||
this.holdButton.Text = "Hold";
|
||||
this.holdButton.UseVisualStyleBackColor = false;
|
||||
@@ -459,7 +460,7 @@
|
||||
this.chainButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(190)))), ((int)(((byte)(45)))));
|
||||
this.chainButton.Location = new System.Drawing.Point(6, 167);
|
||||
this.chainButton.Name = "chainButton";
|
||||
this.chainButton.Size = new System.Drawing.Size(86, 23);
|
||||
this.chainButton.Size = new System.Drawing.Size(97, 23);
|
||||
this.chainButton.TabIndex = 10;
|
||||
this.chainButton.Text = "Chain";
|
||||
this.chainButton.UseVisualStyleBackColor = false;
|
||||
@@ -471,7 +472,7 @@
|
||||
this.blueButton.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.blueButton.Location = new System.Drawing.Point(6, 138);
|
||||
this.blueButton.Name = "blueButton";
|
||||
this.blueButton.Size = new System.Drawing.Size(86, 23);
|
||||
this.blueButton.Size = new System.Drawing.Size(97, 23);
|
||||
this.blueButton.TabIndex = 9;
|
||||
this.blueButton.Text = "↓ Snap";
|
||||
this.blueButton.UseVisualStyleBackColor = false;
|
||||
@@ -483,7 +484,7 @@
|
||||
this.redButton.ForeColor = System.Drawing.Color.White;
|
||||
this.redButton.Location = new System.Drawing.Point(6, 109);
|
||||
this.redButton.Name = "redButton";
|
||||
this.redButton.Size = new System.Drawing.Size(86, 23);
|
||||
this.redButton.Size = new System.Drawing.Size(97, 23);
|
||||
this.redButton.TabIndex = 8;
|
||||
this.redButton.Text = "↑ Snap";
|
||||
this.redButton.UseVisualStyleBackColor = false;
|
||||
@@ -494,7 +495,7 @@
|
||||
this.greenButton.BackColor = System.Drawing.Color.Lime;
|
||||
this.greenButton.Location = new System.Drawing.Point(6, 80);
|
||||
this.greenButton.Name = "greenButton";
|
||||
this.greenButton.Size = new System.Drawing.Size(86, 23);
|
||||
this.greenButton.Size = new System.Drawing.Size(97, 23);
|
||||
this.greenButton.TabIndex = 7;
|
||||
this.greenButton.Text = "⤿ Slide";
|
||||
this.greenButton.UseVisualStyleBackColor = false;
|
||||
@@ -505,7 +506,7 @@
|
||||
this.orangeButton.BackColor = System.Drawing.Color.Orange;
|
||||
this.orangeButton.Location = new System.Drawing.Point(6, 51);
|
||||
this.orangeButton.Name = "orangeButton";
|
||||
this.orangeButton.Size = new System.Drawing.Size(86, 23);
|
||||
this.orangeButton.Size = new System.Drawing.Size(97, 23);
|
||||
this.orangeButton.TabIndex = 6;
|
||||
this.orangeButton.Text = "⤾ Slide";
|
||||
this.orangeButton.UseVisualStyleBackColor = false;
|
||||
@@ -516,7 +517,7 @@
|
||||
this.tapButton.BackColor = System.Drawing.Color.Fuchsia;
|
||||
this.tapButton.Location = new System.Drawing.Point(6, 22);
|
||||
this.tapButton.Name = "tapButton";
|
||||
this.tapButton.Size = new System.Drawing.Size(86, 23);
|
||||
this.tapButton.Size = new System.Drawing.Size(97, 23);
|
||||
this.tapButton.TabIndex = 5;
|
||||
this.tapButton.Text = "Touch";
|
||||
this.tapButton.UseVisualStyleBackColor = false;
|
||||
@@ -845,12 +846,13 @@
|
||||
//
|
||||
this.visualHispeedNumeric.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.visualHispeedNumeric.DecimalPlaces = 2;
|
||||
this.visualHispeedNumeric.DecimalPlaces = 1;
|
||||
this.visualHispeedNumeric.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.visualHispeedNumeric.Increment = new decimal(new int[] {
|
||||
5,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
65536});
|
||||
this.visualHispeedNumeric.Location = new System.Drawing.Point(6, 37);
|
||||
this.visualHispeedNumeric.Maximum = new decimal(new int[] {
|
||||
500,
|
||||
@@ -861,12 +863,13 @@
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
196608});
|
||||
65536});
|
||||
this.visualHispeedNumeric.Name = "visualHispeedNumeric";
|
||||
this.visualHispeedNumeric.Size = new System.Drawing.Size(102, 23);
|
||||
this.visualHispeedNumeric.Size = new System.Drawing.Size(102, 29);
|
||||
this.visualHispeedNumeric.TabIndex = 11;
|
||||
this.visualHispeedNumeric.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.visualHispeedNumeric.Value = new decimal(new int[] {
|
||||
5,
|
||||
15,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
@@ -941,7 +944,8 @@
|
||||
this.showCursorToolStripMenuItem,
|
||||
this.showCursorDuringPlaybackToolStripMenuItem,
|
||||
this.highlightViewedNoteToolStripMenuItem,
|
||||
this.selectLastInsertedNoteToolStripMenuItem});
|
||||
this.selectLastInsertedNoteToolStripMenuItem,
|
||||
this.showGimmicksInCircleViewToolStripMenuItem});
|
||||
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
|
||||
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
this.viewToolStripMenuItem.Text = "View";
|
||||
@@ -952,14 +956,14 @@
|
||||
this.showCursorToolStripMenuItem.CheckOnClick = true;
|
||||
this.showCursorToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.showCursorToolStripMenuItem.Name = "showCursorToolStripMenuItem";
|
||||
this.showCursorToolStripMenuItem.Size = new System.Drawing.Size(230, 22);
|
||||
this.showCursorToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.showCursorToolStripMenuItem.Text = "Show Cursor";
|
||||
this.showCursorToolStripMenuItem.Click += new System.EventHandler(this.showCursorToolStripMenuItem_Click);
|
||||
//
|
||||
// showCursorDuringPlaybackToolStripMenuItem
|
||||
//
|
||||
this.showCursorDuringPlaybackToolStripMenuItem.Name = "showCursorDuringPlaybackToolStripMenuItem";
|
||||
this.showCursorDuringPlaybackToolStripMenuItem.Size = new System.Drawing.Size(230, 22);
|
||||
this.showCursorDuringPlaybackToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.showCursorDuringPlaybackToolStripMenuItem.Text = "Show Cursor During Playback";
|
||||
//
|
||||
// highlightViewedNoteToolStripMenuItem
|
||||
@@ -968,17 +972,28 @@
|
||||
this.highlightViewedNoteToolStripMenuItem.CheckOnClick = true;
|
||||
this.highlightViewedNoteToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.highlightViewedNoteToolStripMenuItem.Name = "highlightViewedNoteToolStripMenuItem";
|
||||
this.highlightViewedNoteToolStripMenuItem.Size = new System.Drawing.Size(230, 22);
|
||||
this.highlightViewedNoteToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.highlightViewedNoteToolStripMenuItem.Text = "Highlight Viewed Note";
|
||||
//
|
||||
// selectLastInsertedNoteToolStripMenuItem
|
||||
//
|
||||
this.selectLastInsertedNoteToolStripMenuItem.Checked = true;
|
||||
this.selectLastInsertedNoteToolStripMenuItem.CheckOnClick = true;
|
||||
this.selectLastInsertedNoteToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.selectLastInsertedNoteToolStripMenuItem.Name = "selectLastInsertedNoteToolStripMenuItem";
|
||||
this.selectLastInsertedNoteToolStripMenuItem.Size = new System.Drawing.Size(285, 26);
|
||||
this.selectLastInsertedNoteToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.selectLastInsertedNoteToolStripMenuItem.Text = "Select Last Inserted Note";
|
||||
//
|
||||
// showGimmicksInCircleViewToolStripMenuItem
|
||||
//
|
||||
this.showGimmicksInCircleViewToolStripMenuItem.Checked = true;
|
||||
this.showGimmicksInCircleViewToolStripMenuItem.CheckOnClick = true;
|
||||
this.showGimmicksInCircleViewToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.showGimmicksInCircleViewToolStripMenuItem.Name = "showGimmicksInCircleViewToolStripMenuItem";
|
||||
this.showGimmicksInCircleViewToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.showGimmicksInCircleViewToolStripMenuItem.Text = "Show Gimmicks In Circle View";
|
||||
this.showGimmicksInCircleViewToolStripMenuItem.Click += new System.EventHandler(this.showGimmicksInCircleViewToolStripMenuItem_Click);
|
||||
//
|
||||
// chartToolStripMenuItem
|
||||
//
|
||||
this.chartToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
@@ -1046,6 +1061,7 @@
|
||||
// groupBox6
|
||||
//
|
||||
this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox6.Controls.Add(this.gimmickJumpToCurrTimeButton);
|
||||
this.groupBox6.Controls.Add(this.gimmickDeleteButton);
|
||||
this.groupBox6.Controls.Add(this.gimmickEditButton);
|
||||
this.groupBox6.Controls.Add(this.gimmickBeatLabel);
|
||||
@@ -1058,17 +1074,27 @@
|
||||
this.groupBox6.Controls.Add(this.label5);
|
||||
this.groupBox6.Controls.Add(this.gimmickNextButton);
|
||||
this.groupBox6.Controls.Add(this.gimmickPrevButton);
|
||||
this.groupBox6.Location = new System.Drawing.Point(874, 633);
|
||||
this.groupBox6.Location = new System.Drawing.Point(874, 602);
|
||||
this.groupBox6.Name = "groupBox6";
|
||||
this.groupBox6.Size = new System.Drawing.Size(256, 142);
|
||||
this.groupBox6.Size = new System.Drawing.Size(256, 173);
|
||||
this.groupBox6.TabIndex = 33;
|
||||
this.groupBox6.TabStop = false;
|
||||
this.groupBox6.Text = "Gimmick View";
|
||||
//
|
||||
// gimmickJumpToCurrTimeButton
|
||||
//
|
||||
this.gimmickJumpToCurrTimeButton.Location = new System.Drawing.Point(7, 48);
|
||||
this.gimmickJumpToCurrTimeButton.Name = "gimmickJumpToCurrTimeButton";
|
||||
this.gimmickJumpToCurrTimeButton.Size = new System.Drawing.Size(243, 23);
|
||||
this.gimmickJumpToCurrTimeButton.TabIndex = 14;
|
||||
this.gimmickJumpToCurrTimeButton.Text = "Jump To Nearest Gimmick @ Current Time";
|
||||
this.gimmickJumpToCurrTimeButton.UseVisualStyleBackColor = true;
|
||||
this.gimmickJumpToCurrTimeButton.Click += new System.EventHandler(this.gimmickJumpToCurrTimeButton_Click);
|
||||
//
|
||||
// gimmickDeleteButton
|
||||
//
|
||||
this.gimmickDeleteButton.ForeColor = System.Drawing.Color.Red;
|
||||
this.gimmickDeleteButton.Location = new System.Drawing.Point(134, 109);
|
||||
this.gimmickDeleteButton.Location = new System.Drawing.Point(134, 139);
|
||||
this.gimmickDeleteButton.Name = "gimmickDeleteButton";
|
||||
this.gimmickDeleteButton.Size = new System.Drawing.Size(113, 23);
|
||||
this.gimmickDeleteButton.TabIndex = 11;
|
||||
@@ -1078,7 +1104,7 @@
|
||||
//
|
||||
// gimmickEditButton
|
||||
//
|
||||
this.gimmickEditButton.Location = new System.Drawing.Point(6, 109);
|
||||
this.gimmickEditButton.Location = new System.Drawing.Point(6, 139);
|
||||
this.gimmickEditButton.Name = "gimmickEditButton";
|
||||
this.gimmickEditButton.Size = new System.Drawing.Size(113, 23);
|
||||
this.gimmickEditButton.TabIndex = 10;
|
||||
@@ -1089,7 +1115,7 @@
|
||||
// gimmickBeatLabel
|
||||
//
|
||||
this.gimmickBeatLabel.AutoSize = true;
|
||||
this.gimmickBeatLabel.Location = new System.Drawing.Point(173, 47);
|
||||
this.gimmickBeatLabel.Location = new System.Drawing.Point(173, 78);
|
||||
this.gimmickBeatLabel.Name = "gimmickBeatLabel";
|
||||
this.gimmickBeatLabel.Size = new System.Drawing.Size(36, 15);
|
||||
this.gimmickBeatLabel.TabIndex = 9;
|
||||
@@ -1098,7 +1124,7 @@
|
||||
// gimmickValueLabel
|
||||
//
|
||||
this.gimmickValueLabel.AutoSize = true;
|
||||
this.gimmickValueLabel.Location = new System.Drawing.Point(76, 89);
|
||||
this.gimmickValueLabel.Location = new System.Drawing.Point(76, 120);
|
||||
this.gimmickValueLabel.Name = "gimmickValueLabel";
|
||||
this.gimmickValueLabel.Size = new System.Drawing.Size(36, 15);
|
||||
this.gimmickValueLabel.TabIndex = 8;
|
||||
@@ -1107,7 +1133,7 @@
|
||||
// gimmickTypeLabel
|
||||
//
|
||||
this.gimmickTypeLabel.AutoSize = true;
|
||||
this.gimmickTypeLabel.Location = new System.Drawing.Point(76, 68);
|
||||
this.gimmickTypeLabel.Location = new System.Drawing.Point(76, 99);
|
||||
this.gimmickTypeLabel.Name = "gimmickTypeLabel";
|
||||
this.gimmickTypeLabel.Size = new System.Drawing.Size(36, 15);
|
||||
this.gimmickTypeLabel.TabIndex = 7;
|
||||
@@ -1116,7 +1142,7 @@
|
||||
// gimmickMeasureLabel
|
||||
//
|
||||
this.gimmickMeasureLabel.AutoSize = true;
|
||||
this.gimmickMeasureLabel.Location = new System.Drawing.Point(76, 47);
|
||||
this.gimmickMeasureLabel.Location = new System.Drawing.Point(76, 78);
|
||||
this.gimmickMeasureLabel.Name = "gimmickMeasureLabel";
|
||||
this.gimmickMeasureLabel.Size = new System.Drawing.Size(36, 15);
|
||||
this.gimmickMeasureLabel.TabIndex = 6;
|
||||
@@ -1126,7 +1152,7 @@
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
|
||||
this.label8.Location = new System.Drawing.Point(128, 45);
|
||||
this.label8.Location = new System.Drawing.Point(128, 76);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(39, 17);
|
||||
this.label8.TabIndex = 5;
|
||||
@@ -1136,7 +1162,7 @@
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
|
||||
this.label7.Location = new System.Drawing.Point(24, 87);
|
||||
this.label7.Location = new System.Drawing.Point(24, 118);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(46, 17);
|
||||
this.label7.TabIndex = 4;
|
||||
@@ -1146,7 +1172,7 @@
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
|
||||
this.label6.Location = new System.Drawing.Point(29, 66);
|
||||
this.label6.Location = new System.Drawing.Point(29, 97);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(41, 17);
|
||||
this.label6.TabIndex = 3;
|
||||
@@ -1156,7 +1182,7 @@
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
|
||||
this.label5.Location = new System.Drawing.Point(6, 45);
|
||||
this.label5.Location = new System.Drawing.Point(6, 76);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(64, 17);
|
||||
this.label5.TabIndex = 2;
|
||||
@@ -1189,8 +1215,7 @@
|
||||
this.noteViewGroupBox.Controls.Add(this.label9);
|
||||
this.noteViewGroupBox.Controls.Add(this.noteSizeLabel);
|
||||
this.noteViewGroupBox.Controls.Add(this.label17);
|
||||
this.noteViewGroupBox.Controls.Add(this.noteNextMeasureButton);
|
||||
this.noteViewGroupBox.Controls.Add(this.notePrevMeasureButton);
|
||||
this.noteViewGroupBox.Controls.Add(this.noteJumpToCurrTimeButton);
|
||||
this.noteViewGroupBox.Controls.Add(this.noteDeleteSelectedButton);
|
||||
this.noteViewGroupBox.Controls.Add(this.noteEditSelectedButton);
|
||||
this.noteViewGroupBox.Controls.Add(this.noteBeatLabel);
|
||||
@@ -1203,7 +1228,7 @@
|
||||
this.noteViewGroupBox.Controls.Add(this.label16);
|
||||
this.noteViewGroupBox.Controls.Add(this.noteNextButton);
|
||||
this.noteViewGroupBox.Controls.Add(this.notePrevButton);
|
||||
this.noteViewGroupBox.Location = new System.Drawing.Point(874, 420);
|
||||
this.noteViewGroupBox.Location = new System.Drawing.Point(874, 389);
|
||||
this.noteViewGroupBox.Name = "noteViewGroupBox";
|
||||
this.noteViewGroupBox.Size = new System.Drawing.Size(256, 207);
|
||||
this.noteViewGroupBox.TabIndex = 34;
|
||||
@@ -1248,25 +1273,15 @@
|
||||
this.label17.TabIndex = 14;
|
||||
this.label17.Text = "Size:";
|
||||
//
|
||||
// noteNextMeasureButton
|
||||
// noteJumpToCurrTimeButton
|
||||
//
|
||||
this.noteNextMeasureButton.Location = new System.Drawing.Point(134, 48);
|
||||
this.noteNextMeasureButton.Name = "noteNextMeasureButton";
|
||||
this.noteNextMeasureButton.Size = new System.Drawing.Size(116, 23);
|
||||
this.noteNextMeasureButton.TabIndex = 13;
|
||||
this.noteNextMeasureButton.Text = "Next Measure >>";
|
||||
this.noteNextMeasureButton.UseVisualStyleBackColor = true;
|
||||
this.noteNextMeasureButton.Click += new System.EventHandler(this.noteNextMeasureButton_Click);
|
||||
//
|
||||
// notePrevMeasureButton
|
||||
//
|
||||
this.notePrevMeasureButton.Location = new System.Drawing.Point(6, 48);
|
||||
this.notePrevMeasureButton.Name = "notePrevMeasureButton";
|
||||
this.notePrevMeasureButton.Size = new System.Drawing.Size(116, 23);
|
||||
this.notePrevMeasureButton.TabIndex = 12;
|
||||
this.notePrevMeasureButton.Text = "<< Prev Measure";
|
||||
this.notePrevMeasureButton.UseVisualStyleBackColor = true;
|
||||
this.notePrevMeasureButton.Click += new System.EventHandler(this.notePrevMeasureButton_Click);
|
||||
this.noteJumpToCurrTimeButton.Location = new System.Drawing.Point(7, 48);
|
||||
this.noteJumpToCurrTimeButton.Name = "noteJumpToCurrTimeButton";
|
||||
this.noteJumpToCurrTimeButton.Size = new System.Drawing.Size(243, 23);
|
||||
this.noteJumpToCurrTimeButton.TabIndex = 13;
|
||||
this.noteJumpToCurrTimeButton.Text = "Jump To Nearest Note @ Current Time";
|
||||
this.noteJumpToCurrTimeButton.UseVisualStyleBackColor = true;
|
||||
this.noteJumpToCurrTimeButton.Click += new System.EventHandler(this.noteJumpToCurrTimeButton_Click);
|
||||
//
|
||||
// noteDeleteSelectedButton
|
||||
//
|
||||
@@ -1409,7 +1424,7 @@
|
||||
this.Controls.Add(this.menuStrip);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MainMenuStrip = this.menuStrip;
|
||||
this.MinimumSize = new System.Drawing.Size(1154, 812);
|
||||
this.MinimumSize = new System.Drawing.Size(1158, 826);
|
||||
this.Name = "MainForm";
|
||||
this.Text = "BAKKA Editor - [New File]";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
|
||||
@@ -1539,8 +1554,7 @@
|
||||
private Label label9;
|
||||
private Label noteSizeLabel;
|
||||
private Label label17;
|
||||
private Button noteNextMeasureButton;
|
||||
private Button notePrevMeasureButton;
|
||||
private Button noteJumpToCurrTimeButton;
|
||||
private Button noteDeleteSelectedButton;
|
||||
private Button noteEditSelectedButton;
|
||||
private Label noteBeatLabel;
|
||||
@@ -1561,5 +1575,7 @@
|
||||
private TrackBar trackBarVolume;
|
||||
private Label labelSpeed;
|
||||
private TrackBar trackBarSpeed;
|
||||
private Button gimmickJumpToCurrTimeButton;
|
||||
private ToolStripMenuItem showGimmicksInCircleViewToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
+186
-63
@@ -30,6 +30,7 @@ namespace BAKKA_Editor
|
||||
Note lastNote;
|
||||
Note? nextSelectedNote; // so that we know the last newly inserted note
|
||||
Note? endOfChartNote;
|
||||
bool isInsertingHold = false;
|
||||
|
||||
// Music
|
||||
ISoundEngine soundEngine = new ISoundEngine();
|
||||
@@ -123,11 +124,14 @@ namespace BAKKA_Editor
|
||||
File.WriteAllText("settings.toml", Toml.FromModel(userSettings));
|
||||
}
|
||||
// Apply settings
|
||||
showCursorToolStripMenuItem.Checked = userSettings.ViewSettings.ShowCursor;
|
||||
showCursorDuringPlaybackToolStripMenuItem.Checked = userSettings.ViewSettings.ShowCursorDuringPlayback;
|
||||
highlightViewedNoteToolStripMenuItem.Checked = userSettings.ViewSettings.HighlightViewedNote;
|
||||
selectLastInsertedNoteToolStripMenuItem.Checked = userSettings.ViewSettings.SelectLastInsertedNote;
|
||||
autoSaveTimer.Interval = userSettings.SaveSettings.AutoSaveInterval * 60000;
|
||||
showCursorToolStripMenuItem.Checked = userSettings.ViewSettings.ShowCursor;
|
||||
showCursorDuringPlaybackToolStripMenuItem.Checked = userSettings.ViewSettings.ShowCursorDuringPlayback;
|
||||
highlightViewedNoteToolStripMenuItem.Checked = userSettings.ViewSettings.HighlightViewedNote;
|
||||
showGimmicksInCircleViewToolStripMenuItem.Checked = userSettings.ViewSettings.ShowGimmicks;
|
||||
selectLastInsertedNoteToolStripMenuItem.Checked = userSettings.ViewSettings.SelectLastInsertedNote;
|
||||
visualHispeedNumeric.Value = (decimal)userSettings.ViewSettings.HispeedSetting;
|
||||
trackBarVolume.Value = userSettings.ViewSettings.Volume;
|
||||
autoSaveTimer.Interval = userSettings.SaveSettings.AutoSaveInterval * 60000;
|
||||
autoSaveTimer.Enabled = true;
|
||||
// Update hotkey labels
|
||||
tapButton.AppendHotkey(userSettings.HotkeySettings.TouchHotkey);
|
||||
@@ -283,16 +287,23 @@ namespace BAKKA_Editor
|
||||
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
chart.WriteFile(saveFileDialog.FileName);
|
||||
isNewFile = false;
|
||||
if (isRecoveredFile)
|
||||
if (CurrentlyInsertingHold())
|
||||
{
|
||||
DeleteAutosaves();
|
||||
autosaveFile = "";
|
||||
MessageBox.Show("Cannot save while inserting holds\n Please finish the hold before saving", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
chart.WriteFile(saveFileDialog.FileName);
|
||||
isNewFile = false;
|
||||
if (isRecoveredFile)
|
||||
{
|
||||
DeleteAutosaves();
|
||||
autosaveFile = "";
|
||||
}
|
||||
isRecoveredFile = false;
|
||||
File.WriteAllText(tempStatusPath, "false");
|
||||
SetText();
|
||||
}
|
||||
isRecoveredFile = false;
|
||||
File.WriteAllText(tempStatusPath, "false");
|
||||
SetText();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -337,50 +348,77 @@ namespace BAKKA_Editor
|
||||
File.Delete(tempStatusPath);
|
||||
if (tempFilePath != "")
|
||||
File.Delete(tempFilePath);
|
||||
// Apply settings
|
||||
userSettings.ViewSettings.ShowCursor = showCursorToolStripMenuItem.Checked;
|
||||
userSettings.ViewSettings.ShowCursorDuringPlayback = showCursorDuringPlaybackToolStripMenuItem.Checked;
|
||||
userSettings.ViewSettings.HighlightViewedNote = highlightViewedNoteToolStripMenuItem.Checked;
|
||||
userSettings.ViewSettings.ShowGimmicks = showGimmicksInCircleViewToolStripMenuItem.Checked;
|
||||
userSettings.ViewSettings.SelectLastInsertedNote = selectLastInsertedNoteToolStripMenuItem.Checked;
|
||||
userSettings.ViewSettings.HispeedSetting = circleView.Hispeed;
|
||||
userSettings.ViewSettings.Volume = trackBarVolume.Value;
|
||||
userSettings.SaveSettings.AutoSaveInterval = autoSaveTimer.Interval / 60000;
|
||||
//Update user settings.toml
|
||||
if (File.Exists("settings.toml"))
|
||||
File.WriteAllText("settings.toml", Toml.FromModel(userSettings));
|
||||
}
|
||||
|
||||
private void SetSelectedObject(NoteType type)
|
||||
{
|
||||
currentNoteType = type;
|
||||
int minSize = 1;
|
||||
switch (type)
|
||||
{
|
||||
case NoteType.TouchNoBonus:
|
||||
updateLabel("Touch");
|
||||
minSize = 4;
|
||||
break;
|
||||
case NoteType.TouchBonus:
|
||||
updateLabel("Touch [Bonus]");
|
||||
minSize = 5;
|
||||
break;
|
||||
case NoteType.SnapRedNoBonus:
|
||||
updateLabel("Snap (R)");
|
||||
minSize = 6;
|
||||
break;
|
||||
case NoteType.SnapBlueNoBonus:
|
||||
updateLabel("Snap (B)");
|
||||
minSize = 6;
|
||||
break;
|
||||
case NoteType.SlideOrangeNoBonus:
|
||||
updateLabel("Slide (O)");
|
||||
minSize = 5;
|
||||
break;
|
||||
case NoteType.SlideOrangeBonus:
|
||||
updateLabel("Slide (O) [Bonus]");
|
||||
minSize = 7;
|
||||
break;
|
||||
case NoteType.SlideGreenNoBonus:
|
||||
updateLabel("Slide (G)");
|
||||
minSize = 5;
|
||||
break;
|
||||
case NoteType.SlideGreenBonus:
|
||||
updateLabel("Slide (G) [Bonus]");
|
||||
minSize = 7;
|
||||
break;
|
||||
case NoteType.HoldStartNoBonus:
|
||||
updateLabel("Hold Start");
|
||||
minSize = 2;
|
||||
break;
|
||||
case NoteType.HoldJoint:
|
||||
if (endHoldCheck.Checked)
|
||||
{
|
||||
updateLabel("Hold End");
|
||||
currentNoteType = NoteType.HoldEnd;
|
||||
minSize = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
updateLabel("Hold Middle");
|
||||
minSize = 0;
|
||||
}
|
||||
break;
|
||||
case NoteType.HoldEnd:
|
||||
endHoldCheck.Checked = true;
|
||||
updateLabel("Hold End");
|
||||
break;
|
||||
case NoteType.MaskAdd:
|
||||
@@ -390,6 +428,7 @@ namespace BAKKA_Editor
|
||||
updateLabel("Mask Add (Counter-Clockwise)");
|
||||
else
|
||||
updateLabel("Mask Add (From Center)");
|
||||
minSize = 1;
|
||||
break;
|
||||
case NoteType.MaskRemove:
|
||||
if (clockwiseMaskRadio.Checked)
|
||||
@@ -398,38 +437,53 @@ namespace BAKKA_Editor
|
||||
updateLabel("Mask Remove (Counter-Clockwise)");
|
||||
else
|
||||
updateLabel("Mask Remove (From Center)");
|
||||
minSize = 1;
|
||||
break;
|
||||
case NoteType.EndOfChart:
|
||||
updateLabel("End of Chart");
|
||||
minSize = 60;
|
||||
break;
|
||||
case NoteType.Chain:
|
||||
updateLabel("Chain");
|
||||
minSize = 4;
|
||||
break;
|
||||
case NoteType.TouchBonusFlair:
|
||||
updateLabel("Touch [R Note]");
|
||||
minSize = 6;
|
||||
break;
|
||||
case NoteType.SnapRedBonusFlair:
|
||||
updateLabel("Snap (R) [R Note]");
|
||||
minSize = 8;
|
||||
break;
|
||||
case NoteType.SnapBlueBonusFlair:
|
||||
updateLabel("Snap (B) [R Note]");
|
||||
minSize = 8;
|
||||
break;
|
||||
case NoteType.SlideOrangeBonusFlair:
|
||||
updateLabel("Slide (O) [R Note]");
|
||||
minSize = 10;
|
||||
break;
|
||||
case NoteType.SlideGreenBonusFlair:
|
||||
updateLabel("Slide (G) [R Note]");
|
||||
minSize = 10;
|
||||
break;
|
||||
case NoteType.HoldStartBonusFlair:
|
||||
updateLabel("Hold Start [R Note]");
|
||||
minSize = 8;
|
||||
break;
|
||||
case NoteType.ChainBonusFlair:
|
||||
updateLabel("Chain [R Note]");
|
||||
minSize = 10;
|
||||
break;
|
||||
default:
|
||||
updateLabel("None Selected");
|
||||
minSize = 1;
|
||||
break;
|
||||
}
|
||||
if (sizeNumeric.Value < minSize) sizeNumeric.Value = minSize;
|
||||
if (sizeTrackBar.Value < minSize) sizeTrackBar.Value = minSize;
|
||||
sizeNumeric.Minimum = minSize;
|
||||
sizeTrackBar.Minimum = minSize;
|
||||
circlePanel.Invalidate();
|
||||
}
|
||||
|
||||
@@ -520,11 +574,14 @@ namespace BAKKA_Editor
|
||||
circleView.DrawMasks(chart);
|
||||
|
||||
// Draw base and measure circle.
|
||||
circleView.DrawCircle();
|
||||
circleView.DrawCircle(chart);
|
||||
|
||||
// Draw degree lines
|
||||
circleView.DrawDegreeLines();
|
||||
|
||||
// Draw Gimmicks
|
||||
circleView.DrawGimmicks(chart, showGimmicksInCircleViewToolStripMenuItem.Checked, selectedGimmickIndex);
|
||||
|
||||
// Draw holds
|
||||
circleView.DrawHolds(chart, highlightViewedNoteToolStripMenuItem.Checked, selectedNoteIndex);
|
||||
|
||||
@@ -574,7 +631,13 @@ namespace BAKKA_Editor
|
||||
}
|
||||
updateTime();
|
||||
if (currentSong != null && !IsSongPlaying() && valueTriggerEvent != EventSource.TrackBar)
|
||||
songTrackBar.Value = chart.GetTime(new BeatInfo((int)measureNumeric.Value, (int)beat1Numeric.Value * 1920 / (int)beat2Numeric.Value));
|
||||
{
|
||||
int time = chart.GetTime(new BeatInfo((int)measureNumeric.Value, (int)beat1Numeric.Value * 1920 / (int)beat2Numeric.Value));
|
||||
if (time < 0)
|
||||
songTrackBar.Value = 0;
|
||||
else
|
||||
songTrackBar.Value = time;
|
||||
}
|
||||
|
||||
valueTriggerEvent = EventSource.None;
|
||||
}
|
||||
@@ -728,6 +791,10 @@ namespace BAKKA_Editor
|
||||
|
||||
private void holdButtonClicked()
|
||||
{
|
||||
// don't reset hold state if we're already inserting a hold
|
||||
if (isInsertingHold)
|
||||
return;
|
||||
|
||||
if (noBonusRadio.Checked)
|
||||
SetSelectedObject(NoteType.HoldStartNoBonus);
|
||||
else if (bonusRadio.Checked)
|
||||
@@ -948,6 +1015,8 @@ namespace BAKKA_Editor
|
||||
songTrackBar.Value = 0;
|
||||
songTrackBar.Maximum = (int)currentSong.PlayLength;
|
||||
playButton.Enabled = true;
|
||||
measureNumeric.Value = 0;
|
||||
beat1Numeric.Value = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -995,14 +1064,6 @@ namespace BAKKA_Editor
|
||||
measureNumeric.Value = info.Measure;
|
||||
beat1Numeric.Value = (int)((float)info.Beat / 1920.0f * (float)beat2Numeric.Value);
|
||||
circleView.CurrentMeasure = info.MeasureDecimal;
|
||||
|
||||
// TODO Fix hi-speed (it needs to be able to display multiple hi-speeds in the circle view at once)
|
||||
//// Change hi-speed, if applicable
|
||||
//var hispeed = chart.Gimmicks.Where(x => x.Measure <= info.Measure && x.GimmickType == GimmickType.HiSpeedChange).LastOrDefault();
|
||||
//if (hispeed != null && hispeed.HiSpeed != circleView.TotalMeasureShowNotes)
|
||||
//{
|
||||
// visualHispeedNumeric.Value = (decimal)hispeed.HiSpeed;
|
||||
//}
|
||||
}
|
||||
circlePanel.Invalidate();
|
||||
}
|
||||
@@ -1066,6 +1127,8 @@ namespace BAKKA_Editor
|
||||
return;
|
||||
}
|
||||
|
||||
int initialSize = (int)sizeNumeric.Value;
|
||||
|
||||
// X and Y are relative to the upper left of the panel
|
||||
float xCen = e.X - (circlePanel.Width / 2);
|
||||
float yCen = -(e.Y - (circlePanel.Height / 2));
|
||||
@@ -1075,31 +1138,35 @@ namespace BAKKA_Editor
|
||||
if (theta == circleView.mouseDownPos)
|
||||
{
|
||||
positionNumeric.Value = circleView.mouseDownPos;
|
||||
sizeNumeric.Value = 1;
|
||||
initialSize = 1;
|
||||
}
|
||||
else if ((theta > circleView.mouseDownPos || circleView.rolloverPos) && !circleView.rolloverNeg)
|
||||
{
|
||||
positionNumeric.Value = circleView.mouseDownPos;
|
||||
if (circleView.rolloverPos)
|
||||
sizeNumeric.Value = (int)Math.Min(theta + 60 - circleView.mouseDownPos + 1, 60);
|
||||
initialSize = (int)Math.Min(theta + 60 - circleView.mouseDownPos + 1, 60);
|
||||
else
|
||||
sizeNumeric.Value = theta - circleView.mouseDownPos + 1;
|
||||
initialSize = theta - circleView.mouseDownPos + 1;
|
||||
}
|
||||
else if (theta < circleView.mouseDownPos || circleView.rolloverNeg)
|
||||
{
|
||||
positionNumeric.Value = theta;
|
||||
if (circleView.rolloverNeg)
|
||||
sizeNumeric.Value = (int)Math.Min(circleView.mouseDownPos + 60 - theta + 1, 60);
|
||||
initialSize = (int)Math.Min(circleView.mouseDownPos + 60 - theta + 1, 60);
|
||||
else
|
||||
sizeNumeric.Value = circleView.mouseDownPos - theta + 1;
|
||||
initialSize = circleView.mouseDownPos - theta + 1;
|
||||
}
|
||||
|
||||
if (initialSize < sizeNumeric.Minimum) sizeNumeric.Value = sizeNumeric.Minimum;
|
||||
else if (initialSize > 60) sizeNumeric.Value = 60;
|
||||
else sizeNumeric.Value = initialSize;
|
||||
|
||||
circlePanel.Invalidate();
|
||||
}
|
||||
|
||||
private void visualHispeedNumeric_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
circleView.TotalMeasureShowNotes = (float)visualHispeedNumeric.Value;
|
||||
circleView.Hispeed = (float)visualHispeedNumeric.Value;
|
||||
circlePanel.Invalidate();
|
||||
}
|
||||
|
||||
@@ -1197,6 +1264,8 @@ namespace BAKKA_Editor
|
||||
|
||||
private void SetNonHoldButtonState(bool state)
|
||||
{
|
||||
isInsertingHold = !state;
|
||||
|
||||
tapButton.Enabled = state;
|
||||
orangeButton.Enabled = state;
|
||||
greenButton.Enabled = state;
|
||||
@@ -1363,6 +1432,11 @@ namespace BAKKA_Editor
|
||||
{
|
||||
circlePanel.Invalidate();
|
||||
}
|
||||
|
||||
private void showGimmicksInCircleViewToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
circlePanel.Invalidate();
|
||||
}
|
||||
|
||||
private void gimmickPrevButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -1390,6 +1464,29 @@ namespace BAKKA_Editor
|
||||
UpdateGimmickLabels();
|
||||
}
|
||||
|
||||
private void gimmickJumpToCurrTimeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (chart.Gimmicks.Count == 0)
|
||||
return;
|
||||
|
||||
float currentMeasure = circleView.CurrentMeasure;
|
||||
var gimmick = chart.Gimmicks.FirstOrDefault(x => x.BeatInfo.MeasureDecimal >= currentMeasure);
|
||||
if (gimmick != null)
|
||||
{
|
||||
selectedGimmickIndex = chart.Gimmicks.IndexOf(gimmick);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimmick = chart.Gimmicks.FirstOrDefault(x => x.BeatInfo.MeasureDecimal <= currentMeasure);
|
||||
if (gimmick != null)
|
||||
{
|
||||
selectedGimmickIndex = chart.Gimmicks.IndexOf(gimmick);
|
||||
}
|
||||
}
|
||||
circlePanel.Invalidate();
|
||||
UpdateGimmickLabels();
|
||||
}
|
||||
|
||||
private void gimmickEditButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (selectedGimmickIndex == -1)
|
||||
@@ -1527,7 +1624,7 @@ namespace BAKKA_Editor
|
||||
var gimmick = chart.Gimmicks[selectedGimmickIndex];
|
||||
|
||||
gimmickMeasureLabel.Text = gimmick.BeatInfo.Measure.ToString();
|
||||
var quant = Utils.GetQuantization(gimmick.BeatInfo.Beat, 16);
|
||||
var quant = Utils.GetQuantization(gimmick.BeatInfo.Beat, 12);
|
||||
gimmickBeatLabel.Text = $"{quant.Item1} / {quant.Item2}";
|
||||
gimmickTypeLabel.Text = gimmick.GimmickType.ToLabel();
|
||||
switch (gimmick.GimmickType)
|
||||
@@ -1582,7 +1679,7 @@ namespace BAKKA_Editor
|
||||
var note = chart.Notes[selectedNoteIndex];
|
||||
|
||||
noteMeasureLabel.Text = note.BeatInfo.Measure.ToString();
|
||||
var quant = Utils.GetQuantization(note.BeatInfo.Beat, 16);
|
||||
var quant = Utils.GetQuantization(note.BeatInfo.Beat, 12);
|
||||
noteBeatLabel.Text = $"{quant.Item1} / {quant.Item2}";
|
||||
noteTypeLabel.Text = note.NoteType.ToLabel();
|
||||
notePositionLabel.Text = note.Position.ToString();
|
||||
@@ -1644,43 +1741,20 @@ namespace BAKKA_Editor
|
||||
UpdateNoteLabels();
|
||||
}
|
||||
|
||||
private void notePrevMeasureButton_Click(object sender, EventArgs e)
|
||||
private void noteJumpToCurrTimeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (chart.Notes.Count == 0)
|
||||
return;
|
||||
|
||||
int lastMeasure = chart.Notes[selectedNoteIndex].BeatInfo.Measure;
|
||||
var note = chart.Notes.LastOrDefault(x => x.BeatInfo.Measure < lastMeasure);
|
||||
float currentMeasure = circleView.CurrentMeasure;
|
||||
var note = chart.Notes.FirstOrDefault(x => x.BeatInfo.MeasureDecimal >= currentMeasure);
|
||||
if (note != null)
|
||||
{
|
||||
selectedNoteIndex = chart.Notes.IndexOf(note);
|
||||
}
|
||||
else
|
||||
{
|
||||
note = chart.Notes.LastOrDefault(x => x.BeatInfo.Measure > lastMeasure);
|
||||
if (note != null)
|
||||
{
|
||||
selectedNoteIndex = chart.Notes.IndexOf(note);
|
||||
}
|
||||
}
|
||||
circlePanel.Invalidate();
|
||||
UpdateNoteLabels();
|
||||
}
|
||||
|
||||
private void noteNextMeasureButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (chart.Notes.Count == 0)
|
||||
return;
|
||||
|
||||
int lastMeasure = chart.Notes[selectedNoteIndex].BeatInfo.Measure;
|
||||
var note = chart.Notes.FirstOrDefault(x => x.BeatInfo.Measure > lastMeasure);
|
||||
if (note != null)
|
||||
{
|
||||
selectedNoteIndex = chart.Notes.IndexOf(note);
|
||||
}
|
||||
else
|
||||
{
|
||||
note = chart.Notes.FirstOrDefault(x => x.BeatInfo.Measure < lastMeasure);
|
||||
note = chart.Notes.FirstOrDefault(x => x.BeatInfo.MeasureDecimal <= currentMeasure);
|
||||
if (note != null)
|
||||
{
|
||||
selectedNoteIndex = chart.Notes.IndexOf(note);
|
||||
@@ -1717,7 +1791,26 @@ namespace BAKKA_Editor
|
||||
|
||||
int delIndex = selectedNoteIndex;
|
||||
NoteOperation op = chart.Notes[selectedNoteIndex].IsHold ? new RemoveHoldNote(chart, chart.Notes[selectedNoteIndex]) : new RemoveNote(chart, chart.Notes[selectedNoteIndex]);
|
||||
NoteOperation op2 = null;
|
||||
if (chart.Notes[selectedNoteIndex].NoteType == NoteType.HoldStartBonusFlair || chart.Notes[selectedNoteIndex].NoteType == NoteType.HoldStartNoBonus)
|
||||
{
|
||||
if(chart.Notes[selectedNoteIndex].NextNote.NoteType == NoteType.HoldEnd)
|
||||
{
|
||||
op2 = new RemoveHoldNote(chart, chart.Notes[selectedNoteIndex].NextNote);
|
||||
}
|
||||
}
|
||||
if (chart.Notes[selectedNoteIndex].NoteType == NoteType.HoldEnd)
|
||||
{
|
||||
if (chart.Notes[selectedNoteIndex].PrevNote.NoteType == NoteType.HoldStartBonusFlair || chart.Notes[selectedNoteIndex].PrevNote.NoteType == NoteType.HoldStartNoBonus)
|
||||
{
|
||||
op2 = new RemoveHoldNote(chart, chart.Notes[selectedNoteIndex].PrevNote);
|
||||
}
|
||||
}
|
||||
opManager.InvokeAndPush(op);
|
||||
if (op2 != null)
|
||||
{
|
||||
opManager.InvokeAndPush(op2);
|
||||
}
|
||||
UpdateControlsFromOperation(op, OperationDirection.Redo);
|
||||
if (selectedNoteIndex == delIndex)
|
||||
{
|
||||
@@ -1838,6 +1931,17 @@ namespace BAKKA_Editor
|
||||
if (op != null)
|
||||
{
|
||||
UpdateControlsFromOperation(op, OperationDirection.Undo);
|
||||
if (op.GetType() == typeof(RemoveHoldNote))
|
||||
{
|
||||
foreach (var note in chart.Notes)
|
||||
{
|
||||
if (note.IsHold && note.NextNote == null && note.PrevNote == null)
|
||||
{
|
||||
undoToolStripMenuItem_Click(sender, e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1873,6 +1977,11 @@ namespace BAKKA_Editor
|
||||
if (isRemoveHold)
|
||||
{
|
||||
if (note.NextNote == null)
|
||||
{
|
||||
SetNonHoldButtonState(false);
|
||||
SetSelectedObject(NoteType.HoldJoint);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetNonHoldButtonState(true);
|
||||
SetSelectedObject(note.NoteType);
|
||||
@@ -1883,6 +1992,7 @@ namespace BAKKA_Editor
|
||||
{
|
||||
if (isInsertHold)
|
||||
{
|
||||
SetSelectedObject(note.NoteType);
|
||||
lastNote = note.PrevNote;
|
||||
}
|
||||
}
|
||||
@@ -1891,14 +2001,14 @@ namespace BAKKA_Editor
|
||||
if (isInsertHold)
|
||||
{
|
||||
SetNonHoldButtonState(false);
|
||||
SetSelectedObject(note.NoteType);
|
||||
SetSelectedObject(NoteType.HoldJoint);
|
||||
lastNote = note.PrevNote;
|
||||
}
|
||||
}
|
||||
updateTime();
|
||||
}
|
||||
}
|
||||
else
|
||||
else //dir == OperationDirection.Redo
|
||||
{
|
||||
bool isInsertHold = op.GetType() == typeof(InsertHoldNote);
|
||||
bool isRemoveHold = op.GetType() == typeof(RemoveHoldNote);
|
||||
@@ -1909,7 +2019,7 @@ namespace BAKKA_Editor
|
||||
{
|
||||
if (isInsertHold)
|
||||
{
|
||||
SetNonHoldButtonState(true);
|
||||
SetNonHoldButtonState(false);
|
||||
SetSelectedObject(NoteType.HoldJoint);
|
||||
}
|
||||
if (isRemoveHold)
|
||||
@@ -1930,6 +2040,7 @@ namespace BAKKA_Editor
|
||||
if (isInsertHold)
|
||||
{
|
||||
SetNonHoldButtonState(true);
|
||||
endHoldCheck.Checked = false;
|
||||
SetSelectedObject(flairRadio.Checked ? NoteType.HoldStartBonusFlair : NoteType.HoldStartNoBonus);
|
||||
lastNote = note;
|
||||
}
|
||||
@@ -1980,8 +2091,11 @@ namespace BAKKA_Editor
|
||||
|
||||
if ((chart.Notes.Count > 0 || chart.Gimmicks.Count > 0) && !chart.IsSaved)
|
||||
{
|
||||
chart.WriteFile(tempFilePath, false);
|
||||
File.WriteAllLines(tempStatusPath, new string[] { "true", DateTime.Now.ToString("yyyy-MM-dd HH:mm") });
|
||||
if (!CurrentlyInsertingHold())
|
||||
{
|
||||
chart.WriteFile(tempFilePath, false);
|
||||
File.WriteAllLines(tempStatusPath, new string[] { "true", DateTime.Now.ToString("yyyy-MM-dd HH:mm") });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1989,6 +2103,15 @@ namespace BAKKA_Editor
|
||||
}
|
||||
}
|
||||
|
||||
bool CurrentlyInsertingHold()
|
||||
{
|
||||
if(currentNoteType == NoteType.HoldJoint || currentNoteType == NoteType.HoldEnd)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void DeleteAutosaves(string keep = "")
|
||||
{
|
||||
var oldAutosave = Directory.GetFiles(Path.GetTempPath(), "*.mer");
|
||||
|
||||
@@ -75,6 +75,9 @@
|
||||
<metadata name="autoSaveTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>651, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>60</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
||||
@@ -148,7 +148,8 @@ namespace BAKKA_Editor.Operations
|
||||
if (nextNote != null)
|
||||
{
|
||||
nextNote.PrevNote = null;
|
||||
nextNote.NoteType = Note.NoteType;
|
||||
if (nextNote.NoteType == NoteType.HoldJoint)
|
||||
nextNote.NoteType = Note.NoteType;
|
||||
}
|
||||
break;
|
||||
case NoteType.HoldJoint:
|
||||
@@ -157,8 +158,11 @@ namespace BAKKA_Editor.Operations
|
||||
nextNote.PrevNote = prevNote;
|
||||
break;
|
||||
case NoteType.HoldEnd:
|
||||
prevNote.NextNote = null;
|
||||
prevNote.NoteType = NoteType.HoldEnd;
|
||||
if (prevNote != null)
|
||||
{
|
||||
prevNote.NextNote = null;
|
||||
prevNote.NoteType = NoteType.HoldEnd;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -184,8 +188,11 @@ namespace BAKKA_Editor.Operations
|
||||
nextNote.PrevNote = Note;
|
||||
break;
|
||||
case NoteType.HoldEnd:
|
||||
prevNote.NextNote = Note;
|
||||
prevNote.NoteType = prevNoteType;
|
||||
if (prevNote != null)
|
||||
{
|
||||
prevNote.NextNote = Note;
|
||||
prevNote.NoteType = prevNoteType;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -19,6 +19,9 @@ namespace BAKKA_Editor
|
||||
public bool ShowCursorDuringPlayback { get; set; } = false;
|
||||
public bool HighlightViewedNote { get; set; } = true;
|
||||
public bool SelectLastInsertedNote { get; set; } = true;
|
||||
public bool ShowGimmicks { get; set; } = true;
|
||||
public float HispeedSetting { get; set; } = 1.5f;
|
||||
public int Volume { get; set; } = 100;
|
||||
}
|
||||
|
||||
internal class SaveSettings
|
||||
|
||||
+44
-3
@@ -60,6 +60,30 @@ namespace BAKKA_Editor
|
||||
}
|
||||
}
|
||||
|
||||
internal static Color GimmickTypeToColor(GimmickType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GimmickType.NoGimmick:
|
||||
return Color.Transparent;
|
||||
case GimmickType.BpmChange:
|
||||
return Color.FromArgb(200, 0, 255, 255);
|
||||
case GimmickType.TimeSignatureChange:
|
||||
return Color.FromArgb(200, 160, 255, 160);
|
||||
case GimmickType.HiSpeedChange:
|
||||
return Color.FromArgb(200, 0, 255, 0);
|
||||
case GimmickType.ReverseStart:
|
||||
case GimmickType.ReverseMiddle:
|
||||
case GimmickType.ReverseEnd:
|
||||
return Color.FromArgb(200, 255, 255, 0);
|
||||
case GimmickType.StopStart:
|
||||
case GimmickType.StopEnd:
|
||||
return Color.FromArgb(200, 255, 0, 0);
|
||||
default:
|
||||
return Color.Transparent;
|
||||
}
|
||||
}
|
||||
|
||||
internal static void InvokeIfRequired(this Control control, MethodInvoker action)
|
||||
{
|
||||
if (control.InvokeRequired)
|
||||
@@ -169,11 +193,28 @@ namespace BAKKA_Editor
|
||||
|
||||
internal static Tuple<int, int> GetQuantization(int val, int min)
|
||||
{
|
||||
while (!HasDecimal((double)(val * min) / 1920.0))
|
||||
int numerator = val;
|
||||
int denominator = 1920;
|
||||
|
||||
int gcd = GetGcd(numerator, denominator);
|
||||
|
||||
numerator /= gcd;
|
||||
denominator /= gcd;
|
||||
|
||||
while (denominator < min)
|
||||
{
|
||||
min *= 2;
|
||||
numerator *= 2;
|
||||
denominator *= 2;
|
||||
}
|
||||
return new Tuple<int, int>((int)(val * min / 1920.0), min);
|
||||
|
||||
return Tuple.Create(numerator, denominator);
|
||||
}
|
||||
|
||||
private static int GetGcd(int a, int b)
|
||||
{
|
||||
if (b == 0)
|
||||
return a;
|
||||
return GetGcd(b, (int)a % (int)b);
|
||||
}
|
||||
|
||||
internal static float GetDist(Point a, Point b)
|
||||
|
||||
Reference in New Issue
Block a user