make holdnote longs as wide as end-capped notes
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Microsoft.VisualBasic.CompilerServices;
|
||||
using Godot;
|
||||
using WacK.Data.Chart;
|
||||
|
||||
@@ -24,32 +25,11 @@ namespace WacK.Things.TunnelObjects
|
||||
|
||||
public void SetPosSize(int pos, int size)
|
||||
{
|
||||
float pxPerMinute = Constants.BASE_2D_RESOLUTION / 60;
|
||||
var (posPx, sizePx) = Util.PixelizeNote(pos, size);
|
||||
|
||||
float posPx = 0;
|
||||
float sizePx = 0;
|
||||
|
||||
if (size <= 59)
|
||||
{
|
||||
if (size >= 3)
|
||||
{
|
||||
posPx = (pos + 1) * pxPerMinute;
|
||||
sizePx = (size - 2) * pxPerMinute;
|
||||
}
|
||||
else // 2 or smaller
|
||||
{
|
||||
posPx = pos * pxPerMinute;
|
||||
sizePx = size * pxPerMinute;
|
||||
}
|
||||
// end-caps
|
||||
posPx -= 12;
|
||||
sizePx += 24;
|
||||
}
|
||||
else // size is 60 or greater
|
||||
if (size >= 60)
|
||||
{
|
||||
size = 60;
|
||||
sizePx = Constants.BASE_2D_RESOLUTION;
|
||||
// remove end-caps
|
||||
noteBase.RegionRect = new Rect2(12, 0, new Vector2(488, 36));
|
||||
noteBase.PatchMarginLeft = 0;
|
||||
noteBase.PatchMarginRight = 0;
|
||||
|
||||
Reference in New Issue
Block a user