Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a0fdefcab | ||
|
|
aea6e7ff30 | ||
|
|
8ee60bee2a | ||
|
|
3a2854fafe | ||
|
|
bdc06d137d | ||
|
|
47b55a3774 | ||
|
|
063241068f | ||
|
|
837dc018bd | ||
|
|
1705898b5a | ||
|
|
704e205e94 | ||
|
|
772a79ffad | ||
|
|
27497c92ba | ||
|
|
076e86b643 | ||
|
|
d9a72132a0 | ||
|
|
23883e46b6 | ||
|
|
bfa9f8f791 | ||
|
|
e695203087 | ||
|
|
85d3f63c50 | ||
|
|
89db842aa2 | ||
|
|
679ca8c130 | ||
|
|
8f67e6498c | ||
|
|
51231b2e2e |
@@ -7,9 +7,9 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Version>$(VersionPrefix)2.0.0</Version>
|
<Version>$(VersionPrefix)2.1.8</Version>
|
||||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||||
<FileVersion>2.0.0</FileVersion>
|
<FileVersion>2.1.8</FileVersion>
|
||||||
<Company>Goatgarien</Company>
|
<Company>Goatgarien</Company>
|
||||||
<Copyright>2022</Copyright>
|
<Copyright>2022</Copyright>
|
||||||
<StartupObject>BAKKA_Editor.Program</StartupObject>
|
<StartupObject>BAKKA_Editor.Program</StartupObject>
|
||||||
|
|||||||
+28
-22
@@ -1,13 +1,16 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace BAKKA_Editor
|
namespace BAKKA_Editor
|
||||||
{
|
{
|
||||||
internal class Chart
|
internal class Chart
|
||||||
{
|
{
|
||||||
|
private static readonly CultureInfo _defaultParsingCulture = CultureInfo.InvariantCulture;
|
||||||
public List<Note> Notes { get; set; }
|
public List<Note> Notes { get; set; }
|
||||||
public List<Gimmick> Gimmicks { get; set; }
|
public List<Gimmick> Gimmicks { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -55,14 +58,13 @@ namespace BAKKA_Editor
|
|||||||
var path = Utils.GetTag(line, "#MUSIC_FILE_PATH ");
|
var path = Utils.GetTag(line, "#MUSIC_FILE_PATH ");
|
||||||
if (path != null)
|
if (path != null)
|
||||||
SongFileName = path;
|
SongFileName = path;
|
||||||
|
|
||||||
var offset = Utils.GetTag(line, "#OFFSET");
|
var offset = Utils.GetTag(line, "#OFFSET");
|
||||||
if (offset != null)
|
if (offset != null)
|
||||||
Offset = Convert.ToDouble(offset);
|
Offset = Convert.ToDouble(offset, _defaultParsingCulture);
|
||||||
|
|
||||||
offset = Utils.GetTag(line, "#MOVIEOFFSET");
|
offset = Utils.GetTag(line, "#MOVIEOFFSET");
|
||||||
if (offset != null)
|
if (offset != null)
|
||||||
MovieOffset = Convert.ToDouble(offset);
|
MovieOffset = Convert.ToDouble(offset, _defaultParsingCulture);
|
||||||
|
|
||||||
|
|
||||||
if (line.Contains("#BODY"))
|
if (line.Contains("#BODY"))
|
||||||
@@ -71,7 +73,7 @@ namespace BAKKA_Editor
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
} while(++index < file.Length);
|
} while (++index < file.Length);
|
||||||
|
|
||||||
int lineNum;
|
int lineNum;
|
||||||
Gimmick gimmickTemp;
|
Gimmick gimmickTemp;
|
||||||
@@ -83,46 +85,46 @@ namespace BAKKA_Editor
|
|||||||
if (String.IsNullOrWhiteSpace(file[i]))
|
if (String.IsNullOrWhiteSpace(file[i]))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var parsed = file[i].Split(new string[] {" "}, StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
|
var parsed = file[i].Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
|
||||||
NoteBase temp = new();
|
NoteBase temp = new();
|
||||||
temp.BeatInfo = new BeatInfo(Convert.ToInt32(parsed[0]), Convert.ToInt32(parsed[1]));
|
temp.BeatInfo = new BeatInfo(Convert.ToInt32(parsed[0], _defaultParsingCulture), Convert.ToInt32(parsed[1], _defaultParsingCulture));
|
||||||
temp.GimmickType = (GimmickType)Convert.ToInt32(parsed[2]);
|
temp.GimmickType = (GimmickType)Convert.ToInt32(parsed[2], _defaultParsingCulture);
|
||||||
|
|
||||||
switch (temp.GimmickType)
|
switch (temp.GimmickType)
|
||||||
{
|
{
|
||||||
case GimmickType.NoGimmick:
|
case GimmickType.NoGimmick:
|
||||||
noteTemp = new Note(temp.BeatInfo);
|
noteTemp = new Note(temp.BeatInfo);
|
||||||
noteTemp.NoteType = (NoteType)Convert.ToInt32(parsed[3]);
|
noteTemp.NoteType = (NoteType)Convert.ToInt32(parsed[3], _defaultParsingCulture);
|
||||||
lineNum = Convert.ToInt32(parsed[4]);
|
lineNum = Convert.ToInt32(parsed[4], _defaultParsingCulture);
|
||||||
noteTemp.Position = Convert.ToInt32(parsed[5]);
|
noteTemp.Position = Convert.ToInt32(parsed[5], _defaultParsingCulture);
|
||||||
noteTemp.Size = Convert.ToInt32(parsed[6]);
|
noteTemp.Size = Convert.ToInt32(parsed[6], _defaultParsingCulture);
|
||||||
noteTemp.HoldChange = Convert.ToBoolean(Convert.ToInt32(parsed[7]));
|
noteTemp.HoldChange = Convert.ToBoolean(Convert.ToInt32(parsed[7], _defaultParsingCulture));
|
||||||
if (noteTemp.NoteType == NoteType.MaskAdd || noteTemp.NoteType == NoteType.MaskRemove)
|
if (noteTemp.NoteType == NoteType.MaskAdd || noteTemp.NoteType == NoteType.MaskRemove)
|
||||||
{
|
{
|
||||||
noteTemp.MaskFill = (MaskType)Convert.ToInt32(parsed[8]);
|
noteTemp.MaskFill = (MaskType)Convert.ToInt32(parsed[8], _defaultParsingCulture);
|
||||||
}
|
}
|
||||||
else if (noteTemp.NoteType == NoteType.HoldStartNoBonus ||
|
else if (noteTemp.NoteType == NoteType.HoldStartNoBonus ||
|
||||||
noteTemp.NoteType == NoteType.HoldJoint ||
|
noteTemp.NoteType == NoteType.HoldJoint ||
|
||||||
noteTemp.NoteType == NoteType.HoldStartBonusFlair)
|
noteTemp.NoteType == NoteType.HoldStartBonusFlair)
|
||||||
{
|
{
|
||||||
refByLine[lineNum] = Convert.ToInt32(parsed[8]);
|
refByLine[lineNum] = Convert.ToInt32(parsed[8], _defaultParsingCulture);
|
||||||
}
|
}
|
||||||
Notes.Add(noteTemp);
|
Notes.Add(noteTemp);
|
||||||
notesByLine[lineNum] = Notes.Last();
|
notesByLine[lineNum] = Notes.Last();
|
||||||
break;
|
break;
|
||||||
case GimmickType.BpmChange:
|
case GimmickType.BpmChange:
|
||||||
gimmickTemp = new Gimmick(temp.BeatInfo, temp.GimmickType);
|
gimmickTemp = new Gimmick(temp.BeatInfo, temp.GimmickType);
|
||||||
gimmickTemp.BPM = Convert.ToDouble(parsed[3]);
|
gimmickTemp.BPM = Convert.ToDouble(parsed[3], _defaultParsingCulture);
|
||||||
Gimmicks.Add(gimmickTemp);
|
Gimmicks.Add(gimmickTemp);
|
||||||
break;
|
break;
|
||||||
case GimmickType.TimeSignatureChange:
|
case GimmickType.TimeSignatureChange:
|
||||||
gimmickTemp = new Gimmick(temp.BeatInfo, temp.GimmickType);
|
gimmickTemp = new Gimmick(temp.BeatInfo, temp.GimmickType);
|
||||||
gimmickTemp.TimeSig = new TimeSignature() { Upper = Convert.ToInt32(parsed[3]), Lower = parsed.Length == 5 ? Convert.ToInt32(parsed[4]) : 4 };
|
gimmickTemp.TimeSig = new TimeSignature() { Upper = Convert.ToInt32(parsed[3], _defaultParsingCulture), Lower = parsed.Length == 5 ? Convert.ToInt32(parsed[4], _defaultParsingCulture) : 4 };
|
||||||
Gimmicks.Add(gimmickTemp);
|
Gimmicks.Add(gimmickTemp);
|
||||||
break;
|
break;
|
||||||
case GimmickType.HiSpeedChange:
|
case GimmickType.HiSpeedChange:
|
||||||
gimmickTemp = new Gimmick(temp.BeatInfo, temp.GimmickType);
|
gimmickTemp = new Gimmick(temp.BeatInfo, temp.GimmickType);
|
||||||
gimmickTemp.HiSpeed = Convert.ToDouble(parsed[3]);
|
gimmickTemp.HiSpeed = Convert.ToDouble(parsed[3], _defaultParsingCulture);
|
||||||
Gimmicks.Add(gimmickTemp);
|
Gimmicks.Add(gimmickTemp);
|
||||||
break;
|
break;
|
||||||
case GimmickType.ReverseStart:
|
case GimmickType.ReverseStart:
|
||||||
@@ -191,7 +193,7 @@ namespace BAKKA_Editor
|
|||||||
foreach (var note in Notes)
|
foreach (var note in Notes)
|
||||||
{
|
{
|
||||||
sw.Write($"{note.BeatInfo.Measure,4:F0}{note.BeatInfo.Beat,5:F0}{((int)note.GimmickType),5:F0}{(int)note.NoteType,5:F0}");
|
sw.Write($"{note.BeatInfo.Measure,4:F0}{note.BeatInfo.Beat,5:F0}{((int)note.GimmickType),5:F0}{(int)note.NoteType,5:F0}");
|
||||||
sw.Write($"{Notes.IndexOf(note),5:F0}{note.Position,5:F0}{note.Size,5:F0}{Convert.ToInt32(note.HoldChange),5:F0}");
|
sw.Write($"{Notes.IndexOf(note),5:F0}{note.Position,5:F0}{note.Size,5:F0}{Convert.ToInt32(note.HoldChange, _defaultParsingCulture),5:F0}");
|
||||||
if (note.IsMask)
|
if (note.IsMask)
|
||||||
sw.Write($"{(int)note.MaskFill,5:F0}");
|
sw.Write($"{(int)note.MaskFill,5:F0}");
|
||||||
if (note.NextNote != null)
|
if (note.NextNote != null)
|
||||||
@@ -257,9 +259,13 @@ namespace BAKKA_Editor
|
|||||||
TimeEvents[0].StartTime = Offset * 1000.0;
|
TimeEvents[0].StartTime = Offset * 1000.0;
|
||||||
for (int i = 1; i < TimeEvents.Count; i++)
|
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>
|
/// <summary>
|
||||||
/// Translate clock time to beats
|
/// Translate clock time to beats
|
||||||
@@ -274,7 +280,7 @@ namespace BAKKA_Editor
|
|||||||
var evt = TimeEvents.Where(x => time >= x.StartTime).LastOrDefault();
|
var evt = TimeEvents.Where(x => time >= x.StartTime).LastOrDefault();
|
||||||
if (evt == null)
|
if (evt == null)
|
||||||
evt = TimeEvents[0];
|
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>
|
/// <summary>
|
||||||
@@ -290,7 +296,7 @@ namespace BAKKA_Editor
|
|||||||
var evt = TimeEvents.Where(x => beat.MeasureDecimal >= x.Measure).LastOrDefault();
|
var evt = TimeEvents.Where(x => beat.MeasureDecimal >= x.Measure).LastOrDefault();
|
||||||
if (evt == null)
|
if (evt == null)
|
||||||
evt = TimeEvents[0];
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+126
-28
@@ -4,6 +4,8 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock;
|
||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace BAKKA_Editor
|
namespace BAKKA_Editor
|
||||||
{
|
{
|
||||||
@@ -15,10 +17,8 @@ namespace BAKKA_Editor
|
|||||||
public PointF CenterPoint { get; private set; }
|
public PointF CenterPoint { get; private set; }
|
||||||
public float Radius { get; private set; }
|
public float Radius { get; private set; }
|
||||||
public float CurrentMeasure { get; set; }
|
public float CurrentMeasure { get; set; }
|
||||||
/// <summary>
|
public float Hispeed { get; set; } = 1.5f;
|
||||||
/// Number of measures in the future that are visible
|
public bool showHispeed { get; set; } = true;
|
||||||
/// </summary>
|
|
||||||
public float TotalMeasureShowNotes { get; set; } = 0.5f;
|
|
||||||
|
|
||||||
// Pens and Brushes
|
// Pens and Brushes
|
||||||
public Pen BasePen { get; set; }
|
public Pen BasePen { get; set; }
|
||||||
@@ -74,11 +74,109 @@ namespace BAKKA_Editor
|
|||||||
FlairPen = new Pen(Color.FromArgb(FlairTransparency, Color.Yellow), PanelSize.Width * 8.0f / 600.0f);
|
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);
|
||||||
|
float tempTotalTime = ((displayFrames / 60.0f) * 1000.0f);
|
||||||
|
float currentTime = chart.GetTime(new BeatInfo(CurrentMeasure));
|
||||||
|
float tempEndTime = currentTime + tempTotalTime;
|
||||||
|
if (showHispeed)
|
||||||
|
{
|
||||||
|
//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);
|
||||||
|
//Random todos that im too lazy to put in applicable locations
|
||||||
|
//TODO: add "time" to notes so we can compare against it every time instead of always calculating what time a note is at
|
||||||
|
//TODO: add function to reevaluate the time of every note when bpm or TS is added/removed.
|
||||||
|
|
||||||
|
//add all hispeed changes to list that happen within the current total time to show notes
|
||||||
|
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 = chart.GetTime(HispeedChanges[i].BeatInfo);
|
||||||
|
float modifiedTime;
|
||||||
|
if (itemTime <= (tempTotalTime + currentTime))
|
||||||
|
{
|
||||||
|
if (i == 0)
|
||||||
|
itemTime = currentTime;
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
tempEndTime = currentTime + tempTotalTime;
|
||||||
|
}
|
||||||
|
//convert total time to total measure
|
||||||
|
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();
|
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 scaledRectSize = DrawRect.Width * info.NoteScale;
|
||||||
float scaledRadius = scaledRectSize / 2.0f;
|
float scaledRadius = scaledRectSize / 2.0f;
|
||||||
info.Rect = new RectangleF(
|
info.Rect = new RectangleF(
|
||||||
@@ -89,9 +187,9 @@ namespace BAKKA_Editor
|
|||||||
return info;
|
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.StartAngle = -note.Position * 6;
|
||||||
info.ArcLength = -note.Size * 6;
|
info.ArcLength = -note.Size * 6;
|
||||||
if(info.ArcLength != -360)
|
if(info.ArcLength != -360)
|
||||||
@@ -191,15 +289,15 @@ namespace BAKKA_Editor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DrawCircle()
|
public void DrawCircle(Chart chart)
|
||||||
{
|
{
|
||||||
// Switch drawing modes
|
// Switch drawing modes
|
||||||
bufGraphics.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
bufGraphics.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
||||||
|
|
||||||
// Draw measure circle
|
// 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)
|
if (info.Rect.Width >= 1)
|
||||||
{
|
{
|
||||||
bufGraphics.Graphics.DrawEllipse(BeatPen, info.Rect);
|
bufGraphics.Graphics.DrawEllipse(BeatPen, info.Rect);
|
||||||
@@ -248,11 +346,11 @@ namespace BAKKA_Editor
|
|||||||
{
|
{
|
||||||
List<Gimmick> drawGimmicks = chart.Gimmicks.Where(
|
List<Gimmick> drawGimmicks = chart.Gimmicks.Where(
|
||||||
x => x.Measure >= CurrentMeasure
|
x => x.Measure >= CurrentMeasure
|
||||||
&& x.Measure <= (CurrentMeasure + TotalMeasureShowNotes)).ToList();
|
&& x.Measure <= (CurrentMeasure + GetTotalMeasureShowNotes(chart))).ToList();
|
||||||
|
|
||||||
foreach (var gimmick in drawGimmicks)
|
foreach (var gimmick in drawGimmicks)
|
||||||
{
|
{
|
||||||
var info = GetScaledRect(gimmick.Measure);
|
var info = GetScaledRect(chart, gimmick.Measure);
|
||||||
|
|
||||||
if (info.Rect.Width >= 1)
|
if (info.Rect.Width >= 1)
|
||||||
{
|
{
|
||||||
@@ -264,19 +362,19 @@ namespace BAKKA_Editor
|
|||||||
|
|
||||||
public void DrawHolds(Chart chart, bool highlightSelectedNote, int selectedNoteIndex)
|
public void DrawHolds(Chart chart, bool highlightSelectedNote, int selectedNoteIndex)
|
||||||
{
|
{
|
||||||
ArcInfo currentInfo = GetScaledRect(CurrentMeasure);
|
ArcInfo currentInfo = GetScaledRect(chart, CurrentMeasure);
|
||||||
ArcInfo endInfo = GetScaledRect(CurrentMeasure + TotalMeasureShowNotes);
|
ArcInfo endInfo = GetScaledRect(chart, CurrentMeasure + GetTotalMeasureShowNotes(chart));
|
||||||
|
|
||||||
// First, draw holes that start before the viewpoint and have nodes that end after
|
// First, draw holes that start before the viewpoint and have nodes that end after
|
||||||
List<Note> holdNotes = chart.Notes.Where(
|
List<Note> holdNotes = chart.Notes.Where(
|
||||||
x => x.Measure < CurrentMeasure
|
x => x.Measure < CurrentMeasure
|
||||||
&& x.NextNote != null
|
&& x.NextNote != null
|
||||||
&& x.NextNote.Measure > (CurrentMeasure + TotalMeasureShowNotes)
|
&& x.NextNote.Measure > (CurrentMeasure + GetTotalMeasureShowNotes(chart))
|
||||||
&& x.IsHold).ToList();
|
&& x.IsHold).ToList();
|
||||||
foreach (var note in holdNotes)
|
foreach (var note in holdNotes)
|
||||||
{
|
{
|
||||||
ArcInfo info = GetArcInfo(note);
|
ArcInfo info = GetArcInfo(chart, note);
|
||||||
ArcInfo nextInfo = GetArcInfo((Note)note.NextNote);
|
ArcInfo nextInfo = GetArcInfo(chart, (Note)note.NextNote);
|
||||||
//GraphicsPath path = new GraphicsPath();
|
//GraphicsPath path = new GraphicsPath();
|
||||||
//path.AddArc(endInfo.Rect, info.StartAngle, info.ArcLength);
|
//path.AddArc(endInfo.Rect, info.StartAngle, info.ArcLength);
|
||||||
//path.AddArc(currentInfo.Rect, info.StartAngle + info.ArcLength, -info.ArcLength);
|
//path.AddArc(currentInfo.Rect, info.StartAngle + info.ArcLength, -info.ArcLength);
|
||||||
@@ -323,16 +421,16 @@ namespace BAKKA_Editor
|
|||||||
// Second, draw all the notes on-screen
|
// Second, draw all the notes on-screen
|
||||||
holdNotes = chart.Notes.Where(
|
holdNotes = chart.Notes.Where(
|
||||||
x => x.Measure >= CurrentMeasure
|
x => x.Measure >= CurrentMeasure
|
||||||
&& x.Measure <= (CurrentMeasure + TotalMeasureShowNotes)
|
&& x.Measure <= (CurrentMeasure + GetTotalMeasureShowNotes(chart))
|
||||||
&& x.IsHold).ToList();
|
&& x.IsHold).ToList();
|
||||||
foreach (var note in holdNotes)
|
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 the previous note is off-screen, this case handles that
|
||||||
if (note.PrevNote != null && note.PrevNote.Measure < CurrentMeasure)
|
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 ratio = (currentInfo.Rect.Width - info.Rect.Width) / (prevInfo.Rect.Width - info.Rect.Width);
|
||||||
float startNoteAngle = info.StartAngle;
|
float startNoteAngle = info.StartAngle;
|
||||||
float endNoteAngle = prevInfo.StartAngle;
|
float endNoteAngle = prevInfo.StartAngle;
|
||||||
@@ -356,9 +454,9 @@ namespace BAKKA_Editor
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If the next note is on-screen, this case handles that
|
// 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();
|
GraphicsPath path = new GraphicsPath();
|
||||||
path.AddArc(info.Rect, info.StartAngle, info.ArcLength);
|
path.AddArc(info.Rect, info.StartAngle, info.ArcLength);
|
||||||
path.AddArc(nextInfo.Rect, nextInfo.StartAngle + nextInfo.ArcLength, -nextInfo.ArcLength);
|
path.AddArc(nextInfo.Rect, nextInfo.StartAngle + nextInfo.ArcLength, -nextInfo.ArcLength);
|
||||||
@@ -366,9 +464,9 @@ namespace BAKKA_Editor
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If the next note is off-screen, this case handles that
|
// 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 ratio = (endInfo.Rect.Width - nextInfo.Rect.Width) / (info.Rect.Width - nextInfo.Rect.Width);
|
||||||
float startNoteAngle = nextInfo.StartAngle;
|
float startNoteAngle = nextInfo.StartAngle;
|
||||||
float endNoteAngle = info.StartAngle;
|
float endNoteAngle = info.StartAngle;
|
||||||
@@ -416,11 +514,11 @@ namespace BAKKA_Editor
|
|||||||
{
|
{
|
||||||
List<Note> drawNotes = chart.Notes.Where(
|
List<Note> drawNotes = chart.Notes.Where(
|
||||||
x => x.Measure >= CurrentMeasure
|
x => x.Measure >= CurrentMeasure
|
||||||
&& x.Measure <= (CurrentMeasure + TotalMeasureShowNotes)
|
&& x.Measure <= (CurrentMeasure + GetTotalMeasureShowNotes(chart))
|
||||||
&& !x.IsHold && !x.IsMask).ToList();
|
&& !x.IsHold && !x.IsMask).ToList();
|
||||||
foreach (var note in drawNotes)
|
foreach (var note in drawNotes)
|
||||||
{
|
{
|
||||||
ArcInfo info = GetArcInfo(note);
|
ArcInfo info = GetArcInfo(chart, note);
|
||||||
|
|
||||||
if (info.Rect.Width >= 1)
|
if (info.Rect.Width >= 1)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -52,8 +52,8 @@ namespace BAKKA_Editor
|
|||||||
|
|
||||||
internal enum MaskType
|
internal enum MaskType
|
||||||
{
|
{
|
||||||
Clockwise = 0,
|
CounterClockwise = 0,
|
||||||
CounterClockwise = 1,
|
Clockwise = 1,
|
||||||
Center = 2
|
Center = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+27
-27
@@ -36,7 +36,7 @@ namespace BAKKA_Editor
|
|||||||
internal DialogResult Show(
|
internal DialogResult Show(
|
||||||
Gimmick baseGimmick, FormReason reason, Gimmick? gim1 = null, Gimmick? gim2 = null)
|
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 = new Gimmick();
|
||||||
gimmick.BeatInfo = new BeatInfo(baseGimmick.BeatInfo);
|
gimmick.BeatInfo = new BeatInfo(baseGimmick.BeatInfo);
|
||||||
@@ -46,15 +46,15 @@ namespace BAKKA_Editor
|
|||||||
{
|
{
|
||||||
case GimmickType.BpmChange:
|
case GimmickType.BpmChange:
|
||||||
startMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
startMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
||||||
startBeat1Numeric.Value = quant.Item1;
|
|
||||||
startBeat2Numeric.Value = quant.Item2;
|
startBeat2Numeric.Value = quant.Item2;
|
||||||
|
startBeat1Numeric.Value = quant.Item1;
|
||||||
if (reason == FormReason.Edit)
|
if (reason == FormReason.Edit)
|
||||||
gimmickBpmNumeric.Value = (decimal)baseGimmick.BPM;
|
gimmickBpmNumeric.Value = (decimal)baseGimmick.BPM;
|
||||||
break;
|
break;
|
||||||
case GimmickType.TimeSignatureChange:
|
case GimmickType.TimeSignatureChange:
|
||||||
startMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
startMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
||||||
startBeat1Numeric.Value = quant.Item1;
|
|
||||||
startBeat2Numeric.Value = quant.Item2;
|
startBeat2Numeric.Value = quant.Item2;
|
||||||
|
startBeat1Numeric.Value = quant.Item1;
|
||||||
if (reason == FormReason.Edit)
|
if (reason == FormReason.Edit)
|
||||||
{
|
{
|
||||||
timeSig1Numeric.Value = baseGimmick.TimeSig.Upper;
|
timeSig1Numeric.Value = baseGimmick.TimeSig.Upper;
|
||||||
@@ -63,73 +63,73 @@ namespace BAKKA_Editor
|
|||||||
break;
|
break;
|
||||||
case GimmickType.HiSpeedChange:
|
case GimmickType.HiSpeedChange:
|
||||||
startMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
startMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
||||||
startBeat1Numeric.Value = quant.Item1;
|
|
||||||
startBeat2Numeric.Value = quant.Item2;
|
startBeat2Numeric.Value = quant.Item2;
|
||||||
|
startBeat1Numeric.Value = quant.Item1;
|
||||||
if (reason == FormReason.Edit)
|
if (reason == FormReason.Edit)
|
||||||
hiSpeedNumeric.Value = (decimal)baseGimmick.HiSpeed;
|
hiSpeedNumeric.Value = (decimal)baseGimmick.HiSpeed;
|
||||||
break;
|
break;
|
||||||
case GimmickType.ReverseStart:
|
case GimmickType.ReverseStart:
|
||||||
startMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
startMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
||||||
startBeat1Numeric.Value = quant.Item1;
|
|
||||||
startBeat2Numeric.Value = quant.Item2;
|
startBeat2Numeric.Value = quant.Item2;
|
||||||
|
startBeat1Numeric.Value = quant.Item1;
|
||||||
if (reason == FormReason.Edit && gim1 != null && gim2 != null)
|
if (reason == FormReason.Edit && gim1 != null && gim2 != null)
|
||||||
{
|
{
|
||||||
var quantMid1 = Utils.GetQuantization(gim1.BeatInfo.Beat, 16);
|
var quantMid1 = Utils.GetQuantization(gim1.BeatInfo.Beat, 12);
|
||||||
var quantEnd1 = Utils.GetQuantization(gim2.BeatInfo.Beat, 16);
|
var quantEnd1 = Utils.GetQuantization(gim2.BeatInfo.Beat, 12);
|
||||||
revEnd1MeasureNumeric.Value = gim1.BeatInfo.Measure;
|
revEnd1MeasureNumeric.Value = gim1.BeatInfo.Measure;
|
||||||
revEnd1Beat1Numeric.Value = quantMid1.Item1;
|
|
||||||
revEnd1Beat2Numeric.Value = quantMid1.Item2;
|
revEnd1Beat2Numeric.Value = quantMid1.Item2;
|
||||||
|
revEnd1Beat1Numeric.Value = quantMid1.Item1;
|
||||||
revEnd2MeasureNumeric.Value = gim2.BeatInfo.Measure;
|
revEnd2MeasureNumeric.Value = gim2.BeatInfo.Measure;
|
||||||
revEnd2Beat1Numeric.Value = quantEnd1.Item1;
|
|
||||||
revEnd2Beat2Numeric.Value = quantEnd1.Item2;
|
revEnd2Beat2Numeric.Value = quantEnd1.Item2;
|
||||||
|
revEnd2Beat1Numeric.Value = quantEnd1.Item1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GimmickType.ReverseMiddle:
|
case GimmickType.ReverseMiddle:
|
||||||
var quantStart2 = Utils.GetQuantization(gim1.BeatInfo.Beat, 16);
|
var quantStart2 = Utils.GetQuantization(gim1.BeatInfo.Beat, 12);
|
||||||
var quantEnd2 = Utils.GetQuantization(gim2.BeatInfo.Beat, 16);
|
var quantEnd2 = Utils.GetQuantization(gim2.BeatInfo.Beat, 12);
|
||||||
startMeasureNumeric.Value = gim1.BeatInfo.Measure;
|
startMeasureNumeric.Value = gim1.BeatInfo.Measure;
|
||||||
startBeat1Numeric.Value = quantStart2.Item1;
|
|
||||||
startBeat2Numeric.Value = quantStart2.Item2;
|
startBeat2Numeric.Value = quantStart2.Item2;
|
||||||
|
startBeat1Numeric.Value = quantStart2.Item1;
|
||||||
revEnd1MeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
revEnd1MeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
||||||
revEnd1Beat1Numeric.Value = quant.Item1;
|
|
||||||
revEnd1Beat2Numeric.Value = quant.Item2;
|
revEnd1Beat2Numeric.Value = quant.Item2;
|
||||||
|
revEnd1Beat1Numeric.Value = quant.Item1;
|
||||||
revEnd2MeasureNumeric.Value = gim2.BeatInfo.Measure;
|
revEnd2MeasureNumeric.Value = gim2.BeatInfo.Measure;
|
||||||
revEnd2Beat1Numeric.Value = quantEnd2.Item1;
|
|
||||||
revEnd2Beat2Numeric.Value = quantEnd2.Item2;
|
revEnd2Beat2Numeric.Value = quantEnd2.Item2;
|
||||||
|
revEnd2Beat1Numeric.Value = quantEnd2.Item1;
|
||||||
break;
|
break;
|
||||||
case GimmickType.ReverseEnd:
|
case GimmickType.ReverseEnd:
|
||||||
var quantStart3 = Utils.GetQuantization(gim1.BeatInfo.Beat, 16);
|
var quantStart3 = Utils.GetQuantization(gim1.BeatInfo.Beat, 12);
|
||||||
var quantMid3 = Utils.GetQuantization(gim2.BeatInfo.Beat, 16);
|
var quantMid3 = Utils.GetQuantization(gim2.BeatInfo.Beat, 12);
|
||||||
startMeasureNumeric.Value = gim1.BeatInfo.Measure;
|
startMeasureNumeric.Value = gim1.BeatInfo.Measure;
|
||||||
startBeat1Numeric.Value = quantStart3.Item1;
|
|
||||||
startBeat2Numeric.Value = quantStart3.Item2;
|
startBeat2Numeric.Value = quantStart3.Item2;
|
||||||
revEnd1MeasureNumeric.Value = gim2.BeatInfo.Measure;
|
startBeat1Numeric.Value = quantStart3.Item1;
|
||||||
revEnd1Beat1Numeric.Value = quantMid3.Item1;
|
revEnd1MeasureNumeric.Value = gim2.BeatInfo.Measure;
|
||||||
revEnd1Beat2Numeric.Value = quantMid3.Item2;
|
revEnd1Beat2Numeric.Value = quantMid3.Item2;
|
||||||
|
revEnd1Beat1Numeric.Value = quantMid3.Item1;
|
||||||
revEnd2MeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
revEnd2MeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
||||||
revEnd2Beat1Numeric.Value = quant.Item1;
|
|
||||||
revEnd2Beat2Numeric.Value = quant.Item2;
|
revEnd2Beat2Numeric.Value = quant.Item2;
|
||||||
|
revEnd2Beat1Numeric.Value = quant.Item1;
|
||||||
break;
|
break;
|
||||||
case GimmickType.StopStart:
|
case GimmickType.StopStart:
|
||||||
startMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
startMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
||||||
startBeat1Numeric.Value = quant.Item1;
|
|
||||||
startBeat2Numeric.Value = quant.Item2;
|
startBeat2Numeric.Value = quant.Item2;
|
||||||
|
startBeat1Numeric.Value = quant.Item1;
|
||||||
if (reason == FormReason.Edit)
|
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;
|
stopEndMeasureNumeric.Value = gim1.BeatInfo.Measure;
|
||||||
stopEndBeat1Numeric.Value = stopEnd.Item1;
|
|
||||||
stopEndBeat2Numeric.Value = stopEnd.Item2;
|
stopEndBeat2Numeric.Value = stopEnd.Item2;
|
||||||
|
stopEndBeat1Numeric.Value = stopEnd.Item1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GimmickType.StopEnd:
|
case GimmickType.StopEnd:
|
||||||
var stopStart = Utils.GetQuantization(gim1.BeatInfo.Beat, 16);
|
var stopStart = Utils.GetQuantization(gim1.BeatInfo.Beat, 12);
|
||||||
startMeasureNumeric.Value = gim1.BeatInfo.Measure;
|
startMeasureNumeric.Value = gim1.BeatInfo.Measure;
|
||||||
startBeat1Numeric.Value = stopStart.Item1;
|
|
||||||
startBeat2Numeric.Value = stopStart.Item2;
|
startBeat2Numeric.Value = stopStart.Item2;
|
||||||
|
startBeat1Numeric.Value = stopStart.Item1;
|
||||||
stopEndMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
stopEndMeasureNumeric.Value = gimmick.BeatInfo.Measure;
|
||||||
stopEndBeat1Numeric.Value = quant.Item1;
|
|
||||||
stopEndBeat2Numeric.Value = quant.Item2;
|
stopEndBeat2Numeric.Value = quant.Item2;
|
||||||
|
stopEndBeat1Numeric.Value = quant.Item1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
+5
@@ -96,6 +96,11 @@
|
|||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
|
this.initOffsetNumeric.Minimum = new decimal(new int[] {
|
||||||
|
9999,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
-2147483648});
|
||||||
this.initOffsetNumeric.Name = "initOffsetNumeric";
|
this.initOffsetNumeric.Name = "initOffsetNumeric";
|
||||||
this.initOffsetNumeric.Size = new System.Drawing.Size(100, 23);
|
this.initOffsetNumeric.Size = new System.Drawing.Size(100, 23);
|
||||||
this.initOffsetNumeric.TabIndex = 26;
|
this.initOffsetNumeric.TabIndex = 26;
|
||||||
|
|||||||
Generated
+39
-26
@@ -100,6 +100,8 @@
|
|||||||
this.showCursorDuringPlaybackToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.showCursorDuringPlaybackToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.highlightViewedNoteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.highlightViewedNoteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.selectLastInsertedNoteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.selectLastInsertedNoteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.showGimmicksInCircleViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.showGimmicksDuringPlaybackToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.chartToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.chartToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.initialChartSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.initialChartSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
@@ -140,7 +142,6 @@
|
|||||||
this.noteNextButton = new System.Windows.Forms.Button();
|
this.noteNextButton = new System.Windows.Forms.Button();
|
||||||
this.notePrevButton = new System.Windows.Forms.Button();
|
this.notePrevButton = new System.Windows.Forms.Button();
|
||||||
this.autoSaveTimer = new System.Windows.Forms.Timer(this.components);
|
this.autoSaveTimer = new System.Windows.Forms.Timer(this.components);
|
||||||
this.showGimmicksInCircleViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.groupBox1.SuspendLayout();
|
this.groupBox1.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.beat2Numeric)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.beat2Numeric)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.beat1Numeric)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.beat1Numeric)).BeginInit();
|
||||||
@@ -290,12 +291,12 @@
|
|||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.sizeTrackBar.Location = new System.Drawing.Point(50, 81);
|
this.sizeTrackBar.Location = new System.Drawing.Point(50, 81);
|
||||||
this.sizeTrackBar.Maximum = 60;
|
this.sizeTrackBar.Maximum = 60;
|
||||||
this.sizeTrackBar.Minimum = 1;
|
this.sizeTrackBar.Minimum = 4;
|
||||||
this.sizeTrackBar.Name = "sizeTrackBar";
|
this.sizeTrackBar.Name = "sizeTrackBar";
|
||||||
this.sizeTrackBar.Size = new System.Drawing.Size(183, 45);
|
this.sizeTrackBar.Size = new System.Drawing.Size(183, 45);
|
||||||
this.sizeTrackBar.TabIndex = 5;
|
this.sizeTrackBar.TabIndex = 5;
|
||||||
this.sizeTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
|
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);
|
this.sizeTrackBar.ValueChanged += new System.EventHandler(this.sizeTrackBar_ValueChanged);
|
||||||
//
|
//
|
||||||
// sizeNumeric
|
// sizeNumeric
|
||||||
@@ -307,7 +308,7 @@
|
|||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.sizeNumeric.Minimum = new decimal(new int[] {
|
this.sizeNumeric.Minimum = new decimal(new int[] {
|
||||||
1,
|
4,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
@@ -315,7 +316,7 @@
|
|||||||
this.sizeNumeric.Size = new System.Drawing.Size(38, 23);
|
this.sizeNumeric.Size = new System.Drawing.Size(38, 23);
|
||||||
this.sizeNumeric.TabIndex = 4;
|
this.sizeNumeric.TabIndex = 4;
|
||||||
this.sizeNumeric.Value = new decimal(new int[] {
|
this.sizeNumeric.Value = new decimal(new int[] {
|
||||||
1,
|
4,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
@@ -846,12 +847,13 @@
|
|||||||
//
|
//
|
||||||
this.visualHispeedNumeric.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.visualHispeedNumeric.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| 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[] {
|
this.visualHispeedNumeric.Increment = new decimal(new int[] {
|
||||||
5,
|
1,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
131072});
|
65536});
|
||||||
this.visualHispeedNumeric.Location = new System.Drawing.Point(6, 37);
|
this.visualHispeedNumeric.Location = new System.Drawing.Point(6, 37);
|
||||||
this.visualHispeedNumeric.Maximum = new decimal(new int[] {
|
this.visualHispeedNumeric.Maximum = new decimal(new int[] {
|
||||||
500,
|
500,
|
||||||
@@ -862,12 +864,13 @@
|
|||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
196608});
|
65536});
|
||||||
this.visualHispeedNumeric.Name = "visualHispeedNumeric";
|
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.TabIndex = 11;
|
||||||
|
this.visualHispeedNumeric.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
this.visualHispeedNumeric.Value = new decimal(new int[] {
|
this.visualHispeedNumeric.Value = new decimal(new int[] {
|
||||||
5,
|
15,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
65536});
|
65536});
|
||||||
@@ -943,7 +946,8 @@
|
|||||||
this.showCursorDuringPlaybackToolStripMenuItem,
|
this.showCursorDuringPlaybackToolStripMenuItem,
|
||||||
this.highlightViewedNoteToolStripMenuItem,
|
this.highlightViewedNoteToolStripMenuItem,
|
||||||
this.selectLastInsertedNoteToolStripMenuItem,
|
this.selectLastInsertedNoteToolStripMenuItem,
|
||||||
this.showGimmicksInCircleViewToolStripMenuItem});
|
this.showGimmicksInCircleViewToolStripMenuItem,
|
||||||
|
this.showGimmicksDuringPlaybackToolStripMenuItem});
|
||||||
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
|
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
|
||||||
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||||
this.viewToolStripMenuItem.Text = "View";
|
this.viewToolStripMenuItem.Text = "View";
|
||||||
@@ -954,14 +958,14 @@
|
|||||||
this.showCursorToolStripMenuItem.CheckOnClick = true;
|
this.showCursorToolStripMenuItem.CheckOnClick = true;
|
||||||
this.showCursorToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
this.showCursorToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.showCursorToolStripMenuItem.Name = "showCursorToolStripMenuItem";
|
this.showCursorToolStripMenuItem.Name = "showCursorToolStripMenuItem";
|
||||||
this.showCursorToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
this.showCursorToolStripMenuItem.Size = new System.Drawing.Size(248, 22);
|
||||||
this.showCursorToolStripMenuItem.Text = "Show Cursor";
|
this.showCursorToolStripMenuItem.Text = "Show Cursor";
|
||||||
this.showCursorToolStripMenuItem.Click += new System.EventHandler(this.showCursorToolStripMenuItem_Click);
|
this.showCursorToolStripMenuItem.Click += new System.EventHandler(this.showCursorToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// showCursorDuringPlaybackToolStripMenuItem
|
// showCursorDuringPlaybackToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.showCursorDuringPlaybackToolStripMenuItem.Name = "showCursorDuringPlaybackToolStripMenuItem";
|
this.showCursorDuringPlaybackToolStripMenuItem.Name = "showCursorDuringPlaybackToolStripMenuItem";
|
||||||
this.showCursorDuringPlaybackToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
this.showCursorDuringPlaybackToolStripMenuItem.Size = new System.Drawing.Size(248, 22);
|
||||||
this.showCursorDuringPlaybackToolStripMenuItem.Text = "Show Cursor During Playback";
|
this.showCursorDuringPlaybackToolStripMenuItem.Text = "Show Cursor During Playback";
|
||||||
//
|
//
|
||||||
// highlightViewedNoteToolStripMenuItem
|
// highlightViewedNoteToolStripMenuItem
|
||||||
@@ -970,7 +974,7 @@
|
|||||||
this.highlightViewedNoteToolStripMenuItem.CheckOnClick = true;
|
this.highlightViewedNoteToolStripMenuItem.CheckOnClick = true;
|
||||||
this.highlightViewedNoteToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
this.highlightViewedNoteToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.highlightViewedNoteToolStripMenuItem.Name = "highlightViewedNoteToolStripMenuItem";
|
this.highlightViewedNoteToolStripMenuItem.Name = "highlightViewedNoteToolStripMenuItem";
|
||||||
this.highlightViewedNoteToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
this.highlightViewedNoteToolStripMenuItem.Size = new System.Drawing.Size(248, 22);
|
||||||
this.highlightViewedNoteToolStripMenuItem.Text = "Highlight Viewed Note";
|
this.highlightViewedNoteToolStripMenuItem.Text = "Highlight Viewed Note";
|
||||||
//
|
//
|
||||||
// selectLastInsertedNoteToolStripMenuItem
|
// selectLastInsertedNoteToolStripMenuItem
|
||||||
@@ -979,9 +983,27 @@
|
|||||||
this.selectLastInsertedNoteToolStripMenuItem.CheckOnClick = true;
|
this.selectLastInsertedNoteToolStripMenuItem.CheckOnClick = true;
|
||||||
this.selectLastInsertedNoteToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
this.selectLastInsertedNoteToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.selectLastInsertedNoteToolStripMenuItem.Name = "selectLastInsertedNoteToolStripMenuItem";
|
this.selectLastInsertedNoteToolStripMenuItem.Name = "selectLastInsertedNoteToolStripMenuItem";
|
||||||
this.selectLastInsertedNoteToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
this.selectLastInsertedNoteToolStripMenuItem.Size = new System.Drawing.Size(248, 22);
|
||||||
this.selectLastInsertedNoteToolStripMenuItem.Text = "Select Last Inserted Note";
|
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(248, 22);
|
||||||
|
this.showGimmicksInCircleViewToolStripMenuItem.Text = "Show Gimmicks In Circle View";
|
||||||
|
this.showGimmicksInCircleViewToolStripMenuItem.Click += new System.EventHandler(this.showGimmicksInCircleViewToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// showGimmicksDuringPlaybackToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.showGimmicksDuringPlaybackToolStripMenuItem.CheckOnClick = true;
|
||||||
|
this.showGimmicksDuringPlaybackToolStripMenuItem.Name = "showGimmicksDuringPlaybackToolStripMenuItem";
|
||||||
|
this.showGimmicksDuringPlaybackToolStripMenuItem.Size = new System.Drawing.Size(248, 22);
|
||||||
|
this.showGimmicksDuringPlaybackToolStripMenuItem.Text = "Show Gimmicks During Playback";
|
||||||
|
this.showGimmicksDuringPlaybackToolStripMenuItem.Click += new System.EventHandler(this.showGimmicksDuringPlaybackToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// chartToolStripMenuItem
|
// chartToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.chartToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.chartToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
@@ -1392,16 +1414,6 @@
|
|||||||
//
|
//
|
||||||
this.autoSaveTimer.Tick += new System.EventHandler(this.autoSaveTimer_Tick);
|
this.autoSaveTimer.Tick += new System.EventHandler(this.autoSaveTimer_Tick);
|
||||||
//
|
//
|
||||||
// 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);
|
|
||||||
//
|
|
||||||
// MainForm
|
// MainForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
@@ -1575,5 +1587,6 @@
|
|||||||
private TrackBar trackBarSpeed;
|
private TrackBar trackBarSpeed;
|
||||||
private Button gimmickJumpToCurrTimeButton;
|
private Button gimmickJumpToCurrTimeButton;
|
||||||
private ToolStripMenuItem showGimmicksInCircleViewToolStripMenuItem;
|
private ToolStripMenuItem showGimmicksInCircleViewToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem showGimmicksDuringPlaybackToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+128
-33
@@ -128,7 +128,10 @@ namespace BAKKA_Editor
|
|||||||
showCursorDuringPlaybackToolStripMenuItem.Checked = userSettings.ViewSettings.ShowCursorDuringPlayback;
|
showCursorDuringPlaybackToolStripMenuItem.Checked = userSettings.ViewSettings.ShowCursorDuringPlayback;
|
||||||
highlightViewedNoteToolStripMenuItem.Checked = userSettings.ViewSettings.HighlightViewedNote;
|
highlightViewedNoteToolStripMenuItem.Checked = userSettings.ViewSettings.HighlightViewedNote;
|
||||||
showGimmicksInCircleViewToolStripMenuItem.Checked = userSettings.ViewSettings.ShowGimmicks;
|
showGimmicksInCircleViewToolStripMenuItem.Checked = userSettings.ViewSettings.ShowGimmicks;
|
||||||
|
showGimmicksDuringPlaybackToolStripMenuItem.Checked = userSettings.ViewSettings.ShowGimmicksDuringPlayback;
|
||||||
selectLastInsertedNoteToolStripMenuItem.Checked = userSettings.ViewSettings.SelectLastInsertedNote;
|
selectLastInsertedNoteToolStripMenuItem.Checked = userSettings.ViewSettings.SelectLastInsertedNote;
|
||||||
|
visualHispeedNumeric.Value = (decimal)userSettings.ViewSettings.HispeedSetting;
|
||||||
|
trackBarVolume.Value = userSettings.ViewSettings.Volume;
|
||||||
autoSaveTimer.Interval = userSettings.SaveSettings.AutoSaveInterval * 60000;
|
autoSaveTimer.Interval = userSettings.SaveSettings.AutoSaveInterval * 60000;
|
||||||
autoSaveTimer.Enabled = true;
|
autoSaveTimer.Enabled = true;
|
||||||
// Update hotkey labels
|
// Update hotkey labels
|
||||||
@@ -347,12 +350,15 @@ namespace BAKKA_Editor
|
|||||||
if (tempFilePath != "")
|
if (tempFilePath != "")
|
||||||
File.Delete(tempFilePath);
|
File.Delete(tempFilePath);
|
||||||
// Apply settings
|
// Apply settings
|
||||||
userSettings.ViewSettings.ShowCursor = showCursorToolStripMenuItem.Checked;
|
userSettings.ViewSettings.ShowCursor = showCursorToolStripMenuItem.Checked;
|
||||||
userSettings.ViewSettings.ShowCursorDuringPlayback = showCursorDuringPlaybackToolStripMenuItem.Checked;
|
userSettings.ViewSettings.ShowCursorDuringPlayback = showCursorDuringPlaybackToolStripMenuItem.Checked;
|
||||||
userSettings.ViewSettings.HighlightViewedNote = highlightViewedNoteToolStripMenuItem.Checked;
|
userSettings.ViewSettings.HighlightViewedNote = highlightViewedNoteToolStripMenuItem.Checked;
|
||||||
userSettings.ViewSettings.ShowGimmicks = showGimmicksInCircleViewToolStripMenuItem.Checked;
|
userSettings.ViewSettings.ShowGimmicks = showGimmicksInCircleViewToolStripMenuItem.Checked;
|
||||||
userSettings.ViewSettings.SelectLastInsertedNote = selectLastInsertedNoteToolStripMenuItem.Checked;
|
userSettings.ViewSettings.ShowGimmicksDuringPlayback = showGimmicksDuringPlaybackToolStripMenuItem.Checked;
|
||||||
userSettings.SaveSettings.AutoSaveInterval = autoSaveTimer.Interval / 60000;
|
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
|
//Update user settings.toml
|
||||||
if (File.Exists("settings.toml"))
|
if (File.Exists("settings.toml"))
|
||||||
File.WriteAllText("settings.toml", Toml.FromModel(userSettings));
|
File.WriteAllText("settings.toml", Toml.FromModel(userSettings));
|
||||||
@@ -361,43 +367,57 @@ namespace BAKKA_Editor
|
|||||||
private void SetSelectedObject(NoteType type)
|
private void SetSelectedObject(NoteType type)
|
||||||
{
|
{
|
||||||
currentNoteType = type;
|
currentNoteType = type;
|
||||||
|
int minSize = 1;
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case NoteType.TouchNoBonus:
|
case NoteType.TouchNoBonus:
|
||||||
updateLabel("Touch");
|
updateLabel("Touch");
|
||||||
|
minSize = 4;
|
||||||
break;
|
break;
|
||||||
case NoteType.TouchBonus:
|
case NoteType.TouchBonus:
|
||||||
updateLabel("Touch [Bonus]");
|
updateLabel("Touch [Bonus]");
|
||||||
|
minSize = 5;
|
||||||
break;
|
break;
|
||||||
case NoteType.SnapRedNoBonus:
|
case NoteType.SnapRedNoBonus:
|
||||||
updateLabel("Snap (R)");
|
updateLabel("Snap (R)");
|
||||||
|
minSize = 6;
|
||||||
break;
|
break;
|
||||||
case NoteType.SnapBlueNoBonus:
|
case NoteType.SnapBlueNoBonus:
|
||||||
updateLabel("Snap (B)");
|
updateLabel("Snap (B)");
|
||||||
|
minSize = 6;
|
||||||
break;
|
break;
|
||||||
case NoteType.SlideOrangeNoBonus:
|
case NoteType.SlideOrangeNoBonus:
|
||||||
updateLabel("Slide (O)");
|
updateLabel("Slide (O)");
|
||||||
|
minSize = 5;
|
||||||
break;
|
break;
|
||||||
case NoteType.SlideOrangeBonus:
|
case NoteType.SlideOrangeBonus:
|
||||||
updateLabel("Slide (O) [Bonus]");
|
updateLabel("Slide (O) [Bonus]");
|
||||||
|
minSize = 7;
|
||||||
break;
|
break;
|
||||||
case NoteType.SlideGreenNoBonus:
|
case NoteType.SlideGreenNoBonus:
|
||||||
updateLabel("Slide (G)");
|
updateLabel("Slide (G)");
|
||||||
|
minSize = 5;
|
||||||
break;
|
break;
|
||||||
case NoteType.SlideGreenBonus:
|
case NoteType.SlideGreenBonus:
|
||||||
updateLabel("Slide (G) [Bonus]");
|
updateLabel("Slide (G) [Bonus]");
|
||||||
|
minSize = 7;
|
||||||
break;
|
break;
|
||||||
case NoteType.HoldStartNoBonus:
|
case NoteType.HoldStartNoBonus:
|
||||||
updateLabel("Hold Start");
|
updateLabel("Hold Start");
|
||||||
|
minSize = 2;
|
||||||
break;
|
break;
|
||||||
case NoteType.HoldJoint:
|
case NoteType.HoldJoint:
|
||||||
if (endHoldCheck.Checked)
|
if (endHoldCheck.Checked)
|
||||||
{
|
{
|
||||||
updateLabel("Hold End");
|
updateLabel("Hold End");
|
||||||
currentNoteType = NoteType.HoldEnd;
|
currentNoteType = NoteType.HoldEnd;
|
||||||
|
minSize = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
updateLabel("Hold Middle");
|
updateLabel("Hold Middle");
|
||||||
|
minSize = 0;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case NoteType.HoldEnd:
|
case NoteType.HoldEnd:
|
||||||
endHoldCheck.Checked = true;
|
endHoldCheck.Checked = true;
|
||||||
@@ -410,6 +430,7 @@ namespace BAKKA_Editor
|
|||||||
updateLabel("Mask Add (Counter-Clockwise)");
|
updateLabel("Mask Add (Counter-Clockwise)");
|
||||||
else
|
else
|
||||||
updateLabel("Mask Add (From Center)");
|
updateLabel("Mask Add (From Center)");
|
||||||
|
minSize = 1;
|
||||||
break;
|
break;
|
||||||
case NoteType.MaskRemove:
|
case NoteType.MaskRemove:
|
||||||
if (clockwiseMaskRadio.Checked)
|
if (clockwiseMaskRadio.Checked)
|
||||||
@@ -418,38 +439,53 @@ namespace BAKKA_Editor
|
|||||||
updateLabel("Mask Remove (Counter-Clockwise)");
|
updateLabel("Mask Remove (Counter-Clockwise)");
|
||||||
else
|
else
|
||||||
updateLabel("Mask Remove (From Center)");
|
updateLabel("Mask Remove (From Center)");
|
||||||
|
minSize = 1;
|
||||||
break;
|
break;
|
||||||
case NoteType.EndOfChart:
|
case NoteType.EndOfChart:
|
||||||
updateLabel("End of Chart");
|
updateLabel("End of Chart");
|
||||||
|
minSize = 60;
|
||||||
break;
|
break;
|
||||||
case NoteType.Chain:
|
case NoteType.Chain:
|
||||||
updateLabel("Chain");
|
updateLabel("Chain");
|
||||||
|
minSize = 4;
|
||||||
break;
|
break;
|
||||||
case NoteType.TouchBonusFlair:
|
case NoteType.TouchBonusFlair:
|
||||||
updateLabel("Touch [R Note]");
|
updateLabel("Touch [R Note]");
|
||||||
|
minSize = 6;
|
||||||
break;
|
break;
|
||||||
case NoteType.SnapRedBonusFlair:
|
case NoteType.SnapRedBonusFlair:
|
||||||
updateLabel("Snap (R) [R Note]");
|
updateLabel("Snap (R) [R Note]");
|
||||||
|
minSize = 8;
|
||||||
break;
|
break;
|
||||||
case NoteType.SnapBlueBonusFlair:
|
case NoteType.SnapBlueBonusFlair:
|
||||||
updateLabel("Snap (B) [R Note]");
|
updateLabel("Snap (B) [R Note]");
|
||||||
|
minSize = 8;
|
||||||
break;
|
break;
|
||||||
case NoteType.SlideOrangeBonusFlair:
|
case NoteType.SlideOrangeBonusFlair:
|
||||||
updateLabel("Slide (O) [R Note]");
|
updateLabel("Slide (O) [R Note]");
|
||||||
|
minSize = 10;
|
||||||
break;
|
break;
|
||||||
case NoteType.SlideGreenBonusFlair:
|
case NoteType.SlideGreenBonusFlair:
|
||||||
updateLabel("Slide (G) [R Note]");
|
updateLabel("Slide (G) [R Note]");
|
||||||
|
minSize = 10;
|
||||||
break;
|
break;
|
||||||
case NoteType.HoldStartBonusFlair:
|
case NoteType.HoldStartBonusFlair:
|
||||||
updateLabel("Hold Start [R Note]");
|
updateLabel("Hold Start [R Note]");
|
||||||
|
minSize = 8;
|
||||||
break;
|
break;
|
||||||
case NoteType.ChainBonusFlair:
|
case NoteType.ChainBonusFlair:
|
||||||
updateLabel("Chain [R Note]");
|
updateLabel("Chain [R Note]");
|
||||||
|
minSize = 10;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
updateLabel("None Selected");
|
updateLabel("None Selected");
|
||||||
|
minSize = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (sizeNumeric.Value < minSize) sizeNumeric.Value = minSize;
|
||||||
|
if (sizeTrackBar.Value < minSize) sizeTrackBar.Value = minSize;
|
||||||
|
sizeNumeric.Minimum = minSize;
|
||||||
|
sizeTrackBar.Minimum = minSize;
|
||||||
circlePanel.Invalidate();
|
circlePanel.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -540,7 +576,7 @@ namespace BAKKA_Editor
|
|||||||
circleView.DrawMasks(chart);
|
circleView.DrawMasks(chart);
|
||||||
|
|
||||||
// Draw base and measure circle.
|
// Draw base and measure circle.
|
||||||
circleView.DrawCircle();
|
circleView.DrawCircle(chart);
|
||||||
|
|
||||||
// Draw degree lines
|
// Draw degree lines
|
||||||
circleView.DrawDegreeLines();
|
circleView.DrawDegreeLines();
|
||||||
@@ -597,7 +633,13 @@ namespace BAKKA_Editor
|
|||||||
}
|
}
|
||||||
updateTime();
|
updateTime();
|
||||||
if (currentSong != null && !IsSongPlaying() && valueTriggerEvent != EventSource.TrackBar)
|
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;
|
valueTriggerEvent = EventSource.None;
|
||||||
}
|
}
|
||||||
@@ -975,6 +1017,8 @@ namespace BAKKA_Editor
|
|||||||
songTrackBar.Value = 0;
|
songTrackBar.Value = 0;
|
||||||
songTrackBar.Maximum = (int)currentSong.PlayLength;
|
songTrackBar.Maximum = (int)currentSong.PlayLength;
|
||||||
playButton.Enabled = true;
|
playButton.Enabled = true;
|
||||||
|
measureNumeric.Value = 0;
|
||||||
|
beat1Numeric.Value = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1019,17 +1063,10 @@ namespace BAKKA_Editor
|
|||||||
var info = chart.GetBeat(currentSong.PlayPosition);
|
var info = chart.GetBeat(currentSong.PlayPosition);
|
||||||
if (info != null && info.Measure != -1)
|
if (info != null && info.Measure != -1)
|
||||||
{
|
{
|
||||||
measureNumeric.Value = info.Measure;
|
if (info.Measure < 0) measureNumeric.Value = 0;
|
||||||
|
else measureNumeric.Value = info.Measure;
|
||||||
beat1Numeric.Value = (int)((float)info.Beat / 1920.0f * (float)beat2Numeric.Value);
|
beat1Numeric.Value = (int)((float)info.Beat / 1920.0f * (float)beat2Numeric.Value);
|
||||||
circleView.CurrentMeasure = info.MeasureDecimal;
|
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();
|
circlePanel.Invalidate();
|
||||||
}
|
}
|
||||||
@@ -1046,7 +1083,8 @@ namespace BAKKA_Editor
|
|||||||
if (info != null && info.Measure != -1 && valueTriggerEvent != EventSource.MouseWheel)
|
if (info != null && info.Measure != -1 && valueTriggerEvent != EventSource.MouseWheel)
|
||||||
{
|
{
|
||||||
valueTriggerEvent = EventSource.TrackBar;
|
valueTriggerEvent = EventSource.TrackBar;
|
||||||
measureNumeric.Value = info.Measure;
|
if (info.Measure < 0) measureNumeric.Value = 0;
|
||||||
|
else measureNumeric.Value = info.Measure;
|
||||||
beat1Numeric.Value = (int)((float)info.Beat / 1920.0f * (float)beat2Numeric.Value);
|
beat1Numeric.Value = (int)((float)info.Beat / 1920.0f * (float)beat2Numeric.Value);
|
||||||
circleView.CurrentMeasure = info.MeasureDecimal;
|
circleView.CurrentMeasure = info.MeasureDecimal;
|
||||||
}
|
}
|
||||||
@@ -1093,6 +1131,8 @@ namespace BAKKA_Editor
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int initialSize = (int)sizeNumeric.Value;
|
||||||
|
|
||||||
// X and Y are relative to the upper left of the panel
|
// X and Y are relative to the upper left of the panel
|
||||||
float xCen = e.X - (circlePanel.Width / 2);
|
float xCen = e.X - (circlePanel.Width / 2);
|
||||||
float yCen = -(e.Y - (circlePanel.Height / 2));
|
float yCen = -(e.Y - (circlePanel.Height / 2));
|
||||||
@@ -1102,31 +1142,35 @@ namespace BAKKA_Editor
|
|||||||
if (theta == circleView.mouseDownPos)
|
if (theta == circleView.mouseDownPos)
|
||||||
{
|
{
|
||||||
positionNumeric.Value = circleView.mouseDownPos;
|
positionNumeric.Value = circleView.mouseDownPos;
|
||||||
sizeNumeric.Value = 1;
|
initialSize = 1;
|
||||||
}
|
}
|
||||||
else if ((theta > circleView.mouseDownPos || circleView.rolloverPos) && !circleView.rolloverNeg)
|
else if ((theta > circleView.mouseDownPos || circleView.rolloverPos) && !circleView.rolloverNeg)
|
||||||
{
|
{
|
||||||
positionNumeric.Value = circleView.mouseDownPos;
|
positionNumeric.Value = circleView.mouseDownPos;
|
||||||
if (circleView.rolloverPos)
|
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
|
else
|
||||||
sizeNumeric.Value = theta - circleView.mouseDownPos + 1;
|
initialSize = theta - circleView.mouseDownPos + 1;
|
||||||
}
|
}
|
||||||
else if (theta < circleView.mouseDownPos || circleView.rolloverNeg)
|
else if (theta < circleView.mouseDownPos || circleView.rolloverNeg)
|
||||||
{
|
{
|
||||||
positionNumeric.Value = theta;
|
positionNumeric.Value = theta;
|
||||||
if (circleView.rolloverNeg)
|
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
|
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();
|
circlePanel.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void visualHispeedNumeric_ValueChanged(object sender, EventArgs e)
|
private void visualHispeedNumeric_ValueChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
circleView.TotalMeasureShowNotes = (float)visualHispeedNumeric.Value;
|
circleView.Hispeed = (float)visualHispeedNumeric.Value;
|
||||||
circlePanel.Invalidate();
|
circlePanel.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1584,7 +1628,7 @@ namespace BAKKA_Editor
|
|||||||
var gimmick = chart.Gimmicks[selectedGimmickIndex];
|
var gimmick = chart.Gimmicks[selectedGimmickIndex];
|
||||||
|
|
||||||
gimmickMeasureLabel.Text = gimmick.BeatInfo.Measure.ToString();
|
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}";
|
gimmickBeatLabel.Text = $"{quant.Item1} / {quant.Item2}";
|
||||||
gimmickTypeLabel.Text = gimmick.GimmickType.ToLabel();
|
gimmickTypeLabel.Text = gimmick.GimmickType.ToLabel();
|
||||||
switch (gimmick.GimmickType)
|
switch (gimmick.GimmickType)
|
||||||
@@ -1639,7 +1683,7 @@ namespace BAKKA_Editor
|
|||||||
var note = chart.Notes[selectedNoteIndex];
|
var note = chart.Notes[selectedNoteIndex];
|
||||||
|
|
||||||
noteMeasureLabel.Text = note.BeatInfo.Measure.ToString();
|
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}";
|
noteBeatLabel.Text = $"{quant.Item1} / {quant.Item2}";
|
||||||
noteTypeLabel.Text = note.NoteType.ToLabel();
|
noteTypeLabel.Text = note.NoteType.ToLabel();
|
||||||
notePositionLabel.Text = note.Position.ToString();
|
notePositionLabel.Text = note.Position.ToString();
|
||||||
@@ -1668,8 +1712,8 @@ namespace BAKKA_Editor
|
|||||||
private void ResetChartTime()
|
private void ResetChartTime()
|
||||||
{
|
{
|
||||||
measureNumeric.Value = beat1Numeric.Value = 0;
|
measureNumeric.Value = beat1Numeric.Value = 0;
|
||||||
positionNumeric.Value = 0;
|
positionNumeric.Value = positionNumeric.Minimum;
|
||||||
sizeNumeric.Value = 1;
|
sizeNumeric.Value = sizeNumeric.Minimum;
|
||||||
updateTime();
|
updateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1754,16 +1798,22 @@ namespace BAKKA_Editor
|
|||||||
NoteOperation op2 = null;
|
NoteOperation op2 = null;
|
||||||
if (chart.Notes[selectedNoteIndex].NoteType == NoteType.HoldStartBonusFlair || chart.Notes[selectedNoteIndex].NoteType == NoteType.HoldStartNoBonus)
|
if (chart.Notes[selectedNoteIndex].NoteType == NoteType.HoldStartBonusFlair || chart.Notes[selectedNoteIndex].NoteType == NoteType.HoldStartNoBonus)
|
||||||
{
|
{
|
||||||
if(chart.Notes[selectedNoteIndex].NextNote.NoteType == NoteType.HoldEnd)
|
if(chart.Notes[selectedNoteIndex].NextNote != null)
|
||||||
{
|
{
|
||||||
op2 = new RemoveHoldNote(chart, chart.Notes[selectedNoteIndex].NextNote);
|
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].NoteType == NoteType.HoldEnd)
|
||||||
{
|
{
|
||||||
if (chart.Notes[selectedNoteIndex].PrevNote.NoteType == NoteType.HoldStartBonusFlair || chart.Notes[selectedNoteIndex].PrevNote.NoteType == NoteType.HoldStartNoBonus)
|
if(chart.Notes[selectedNoteIndex].PrevNote != null)
|
||||||
{
|
{
|
||||||
op2 = new RemoveHoldNote(chart, chart.Notes[selectedNoteIndex].PrevNote);
|
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);
|
opManager.InvokeAndPush(op);
|
||||||
@@ -1891,19 +1941,33 @@ namespace BAKKA_Editor
|
|||||||
if (op != null)
|
if (op != null)
|
||||||
{
|
{
|
||||||
UpdateControlsFromOperation(op, OperationDirection.Undo);
|
UpdateControlsFromOperation(op, OperationDirection.Undo);
|
||||||
|
//check for if it's a segment hold, if so treat them as 1 object by doing everything twice
|
||||||
if (op.GetType() == typeof(RemoveHoldNote))
|
if (op.GetType() == typeof(RemoveHoldNote))
|
||||||
{
|
{
|
||||||
foreach (var note in chart.Notes)
|
foreach (var note in chart.Notes)
|
||||||
{
|
{
|
||||||
if (note.IsHold && note.NextNote == null && note.PrevNote == null)
|
if (note.IsHold && note.NextNote == null && note.PrevNote == null)
|
||||||
{
|
{
|
||||||
undoToolStripMenuItem_Click(sender, e);
|
if (opManager.CanUndo)
|
||||||
|
{
|
||||||
|
var op2 = opManager.Undo();
|
||||||
|
if (op2 != null)
|
||||||
|
{
|
||||||
|
UpdateControlsFromOperation(op2, OperationDirection.Undo);
|
||||||
|
//check for the edge case of someone placing a hold start then deleting it
|
||||||
|
if (op2.GetType() == typeof(InsertHoldNote))
|
||||||
|
{
|
||||||
|
redoToolStripMenuItem_Click(sender, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void redoToolStripMenuItem_Click(object sender, EventArgs e)
|
private void redoToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
@@ -1914,8 +1978,33 @@ namespace BAKKA_Editor
|
|||||||
if (op != null)
|
if (op != null)
|
||||||
{
|
{
|
||||||
UpdateControlsFromOperation(op, OperationDirection.Redo);
|
UpdateControlsFromOperation(op, OperationDirection.Redo);
|
||||||
|
//check for if it's a segment hold, if so treat them as 1 object by doing everything twice
|
||||||
|
if (op.GetType() == typeof(RemoveHoldNote))
|
||||||
|
{
|
||||||
|
foreach (var note in chart.Notes)
|
||||||
|
{
|
||||||
|
if (note.IsHold && note.NextNote == null && note.PrevNote == null)
|
||||||
|
{
|
||||||
|
if (opManager.CanRedo)
|
||||||
|
{
|
||||||
|
var op2 = opManager.Redo();
|
||||||
|
if (op2 != null)
|
||||||
|
{
|
||||||
|
UpdateControlsFromOperation(op2, OperationDirection.Redo);
|
||||||
|
//check for the edge case of someone placing a hold start then deleting it
|
||||||
|
if (op2.GetType() == typeof(InsertHoldNote))
|
||||||
|
{
|
||||||
|
undoToolStripMenuItem_Click(sender, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateControlsFromOperation(IOperation op, OperationDirection dir)
|
private void UpdateControlsFromOperation(IOperation op, OperationDirection dir)
|
||||||
@@ -2106,5 +2195,11 @@ namespace BAKKA_Editor
|
|||||||
currentSong.PlaybackSpeed = (trackBarSpeed.Value / (float)trackBarSpeed.Maximum);
|
currentSong.PlaybackSpeed = (trackBarSpeed.Value / (float)trackBarSpeed.Maximum);
|
||||||
labelSpeed.Text = $"Speed (x{currentSong.PlaybackSpeed:0.00})";
|
labelSpeed.Text = $"Speed (x{currentSong.PlaybackSpeed:0.00})";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showGimmicksDuringPlaybackToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
circleView.showHispeed = showGimmicksDuringPlaybackToolStripMenuItem.Checked;
|
||||||
|
circlePanel.Invalidate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace BAKKA_Editor
|
namespace BAKKA_Editor
|
||||||
{
|
{
|
||||||
|
|
||||||
internal class UserSettings
|
internal class UserSettings
|
||||||
{
|
{
|
||||||
public ViewSettings ViewSettings { get; set; } = new();
|
public ViewSettings ViewSettings { get; set; } = new();
|
||||||
@@ -20,6 +22,9 @@ namespace BAKKA_Editor
|
|||||||
public bool HighlightViewedNote { get; set; } = true;
|
public bool HighlightViewedNote { get; set; } = true;
|
||||||
public bool SelectLastInsertedNote { get; set; } = true;
|
public bool SelectLastInsertedNote { get; set; } = true;
|
||||||
public bool ShowGimmicks { get; set; } = true;
|
public bool ShowGimmicks { get; set; } = true;
|
||||||
|
public bool ShowGimmicksDuringPlayback { get; set; } = true;
|
||||||
|
public float HispeedSetting { get; set; } = 1.5f;
|
||||||
|
public int Volume { get; set; } = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class SaveSettings
|
internal class SaveSettings
|
||||||
@@ -32,13 +37,14 @@ namespace BAKKA_Editor
|
|||||||
|
|
||||||
internal class HotkeySettings
|
internal class HotkeySettings
|
||||||
{
|
{
|
||||||
public int TouchHotkey { get; set; } = Convert.ToInt32(Keys.D1);
|
private static readonly CultureInfo _defaultParsingCulture = CultureInfo.InvariantCulture;
|
||||||
public int SlideLeftHotkey { get; set; } = Convert.ToInt32(Keys.D2);
|
public int TouchHotkey { get; set; } = Convert.ToInt32(Keys.D1, _defaultParsingCulture);
|
||||||
public int SlideRightHotkey { get; set; } = Convert.ToInt32(Keys.D3);
|
public int SlideLeftHotkey { get; set; } = Convert.ToInt32(Keys.D2, _defaultParsingCulture);
|
||||||
public int SnapUpHotkey { get; set; } = Convert.ToInt32(Keys.D4);
|
public int SlideRightHotkey { get; set; } = Convert.ToInt32(Keys.D3, _defaultParsingCulture);
|
||||||
public int SnapDownHotkey { get; set; } = Convert.ToInt32(Keys.D5);
|
public int SnapUpHotkey { get; set; } = Convert.ToInt32(Keys.D4, _defaultParsingCulture);
|
||||||
public int ChainHotkey { get; set; } = Convert.ToInt32(Keys.D6);
|
public int SnapDownHotkey { get; set; } = Convert.ToInt32(Keys.D5, _defaultParsingCulture);
|
||||||
public int HoldHotkey { get; set; } = Convert.ToInt32(Keys.D7);
|
public int ChainHotkey { get; set; } = Convert.ToInt32(Keys.D6, _defaultParsingCulture);
|
||||||
public int PlayHotkey { get; set; } = Convert.ToInt32(Keys.Space);
|
public int HoldHotkey { get; set; } = Convert.ToInt32(Keys.D7, _defaultParsingCulture);
|
||||||
|
public int PlayHotkey { get; set; } = Convert.ToInt32(Keys.Space, _defaultParsingCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-3
@@ -193,11 +193,28 @@ namespace BAKKA_Editor
|
|||||||
|
|
||||||
internal static Tuple<int, int> GetQuantization(int val, int min)
|
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)
|
internal static float GetDist(Point a, Point b)
|
||||||
|
|||||||
Reference in New Issue
Block a user