Example #1
0
        private void _DrawNormalNote(CSongNote note, SColorF color)
        {
            SRectF rect = _GetNoteRect(note);

            _DrawNoteBG(rect, color);
            _DrawNoteBase(rect, new SColorF(_NoteBaseColor, _NoteBaseColor.A * Alpha), 1f);
        }
Example #2
0
        private void _DrawGoldenNote(CSongNote note, SColorF color)
        {
            SRectF  rect       = _GetNoteRect(note);
            SColorF goldColor  = new SColorF(1, 0.84f, 0, color.A);
            SColorF whiteColor = new SColorF(1, 1, 1, color.A);

            _DrawNoteBG(rect, whiteColor);
            _DrawNoteBase(rect, new SColorF(goldColor, _NoteBaseColor.A * Alpha), 1f);
        }
Example #3
0
        private void _DrawFreeStyleNote(CSongNote note, SColorF color)
        {
            SRectF noteRect         = _GetNoteRect(note);
            SRectF noteBoundaryRect = _GetNoteBoundary(note);

            noteRect.H = noteBoundaryRect.H = Rect.H;
            noteRect.Y = noteBoundaryRect.Y = Rect.Y;
            CTextureRef noteTexture = CBase.Themes.GetSkinTexture(_Theme.SkinFreeStyle, _PartyModeID);

            CBase.Drawing.DrawTexture(noteTexture, noteRect, color, noteBoundaryRect, false, false);
        }
Example #4
0
        private SRectF _GetNoteBoundary(CSongNote note)
        {
            SRectF noteBoundary = _GetNoteRect(note);

            if (noteBoundary.X < Rect.X)
            {
                noteBoundary.X  = Rect.X;
                noteBoundary.W -= Rect.X - noteBoundary.X;
            }
            if (noteBoundary.Right > Rect.Right)
            {
                noteBoundary.W -= noteBoundary.Right - Rect.Right;
            }
            return(noteBoundary);
        }
Example #5
0
 /// <summary>
 ///     Constructor for a sung note that hit the given note
 /// </summary>
 /// <param name="startBeat"></param>
 /// <param name="duration"></param>
 /// <param name="tone"></param>
 /// <param name="hitNote"></param>
 /// <param name="points"></param>
 public CSungNote(int startBeat, int duration, int tone, CSongNote hitNote, double points) : this(startBeat, duration, tone)
 {
     HitNote = hitNote;
     Points  = points;
 }
Example #6
0
        private void _DrawZoomOrJump()
        {
            float x = X - _Width / 2; // most left position

            int       lastNote      = _Line.FindPreviousNote((int)_CurrentBeat);
            CSongNote highlightNote = null;
            int       hEndBeat      = 0;
            float     hX            = 0;

            for (int note = 0; note < _Line.Notes.Length; note++)
            {
                _Text.X = x;
                CSongNote curNote = _Line.Notes[note];
                _SetText(curNote);

                if (_CurrentBeat >= curNote.StartBeat)
                {
                    int curEndBeat = curNote.EndBeat;
                    if (note < _Line.Notes.Length - 1)
                    {
                        curEndBeat = _Line.Notes[note + 1].StartBeat - 1;
                    }

                    if (_CurrentBeat <= curEndBeat)
                    {
                        highlightNote = curNote;
                        hEndBeat      = curEndBeat;
                        hX            = x;
                    }
                    else
                    {
                        // already passed
                        _Text.Color = lastNote == note ? _ColorProcessed : _Color;
                        _Text.Draw();
                    }
                }
                else
                {
                    // not passed
                    _Text.Color = _Color;
                    _Text.Draw();
                }

                x += _Text.Rect.W;
            }

            // Draw the highlighted note after all others because we want it to be above those! (transparency won't work well otherwhise)
            if (highlightNote == null)
            {
                return;
            }
            _SetText(highlightNote);
            _Text.X = hX;
            if (LyricStyle == ELyricStyle.TR_CONFIG_LYRICSTYLE_JUMP)
            {
                _DrawJumpingNode(highlightNote);
            }
            else
            {
                _DrawZoomedNote(highlightNote, hEndBeat);
            }
        }
Example #7
0
 private void _SetText(CSongNote note)
 {
     _Text.Text       = note.Text;
     _Text.Font.Style = (note.Type == ENoteType.Freestyle) ? EStyle.BoldItalic : EStyle.Bold;
 }
Example #8
0
 public CSongNote(CSongNote note) : base(note)
 {
     Type = note.Type;
     Text = note.Text;
 }