private void _DrawJumpingNode(CBaseNote jumpNote) { _Text.Color = _ColorProcessed; int diff = jumpNote.Duration; if (diff <= 0) { diff = 1; } float p = 1f - (_CurrentBeat - jumpNote.StartBeat) / diff; if (p < 0.001) { _Text.Draw(); } else { float y = _Text.Y; _Text.Y -= _Text.Font.Height * 0.1f * p; _Text.Draw(); _Text.Y = y; } }
private void _DrawZoomedNote(CBaseNote zoomNote, int endBeat) { float diff = endBeat - zoomNote.StartBeat; if (diff <= 0f) { diff = 1f; } float p = 1f - (_CurrentBeat - zoomNote.StartBeat) / diff; if (p < 0) { p = 0; } float ty = _Text.Y; float th = _Text.Font.Height; float tz = _Text.Z; SRectF normalRect = _Text.Rect; _Text.Font.Height *= 1f + p * 0.4f; _Text.X -= (_Text.Rect.W - normalRect.W) / 2f; _Text.Y -= (_Text.Rect.H - normalRect.H) / 2f; _Text.Z -= 0.1f; _Text.Color = _ColorProcessed; _Text.Draw(); _Text.Y = ty; _Text.Font.Height = th; _Text.Z = tz; }
private SRectF _GetNoteRect(CBaseNote note) { float width = note.Duration * _NoteWidth; var noteRect = new SRectF( Rect.X + (note.StartBeat - CBase.Game.GetCurrentBeatF()) * _NoteWidth + _JudgementLine, Rect.Y + (_SemiToneRange - (note.Tone - _SongBaseLine)) * _SemiToneHeight - (_AddNoteHeight / 2), width, _ToneHeight + _AddNoteHeight, Rect.Z ); return(noteRect); }
private SRectF _GetNoteRect(CBaseNote note) { CSongLine line = _Lines[_CurrentLine]; float beats = line.LastNoteBeat - line.FirstNoteBeat + 1; float width = note.Duration * Rect.W / beats; var noteRect = new SRectF( Rect.X + (note.StartBeat - line.FirstNoteBeat) * Rect.W / beats, Rect.Y + (CBase.Settings.GetNumNoteLines() - 1 - (note.Tone - line.BaseLine) / 2f) * _NoteLineHeight - _AddNoteHeight / 2, width, _NoteLineHeight + _AddNoteHeight, Rect.Z ); return(noteRect); }