public void TestGetTimeTagDisplayRubyText(int indexOfTimeTag, string actual) { var lyric = new Lyric { Text = "カラオケ", TimeTags = TestCaseTagHelper.ParseTimeTags(new[] { "[0,start]:1000", "[0,start]:1000", "[0,end]:1000", "[1,start]:2000", "[1,start]:2000", "[1,end]:2000", "[2,start]:3000", "[2,start]:3000", "[3,start]:4000", "[3,end]:5000", }), RubyTags = TestCaseTagHelper.ParseRubyTags(new[] { "[0,1]:か", "[2,4]:おけ", }) }; var timeTag = lyric.TimeTags[indexOfTimeTag]; Assert.AreEqual(LyricUtils.GetTimeTagDisplayRubyText(lyric, timeTag), actual); }
private void load(TimeTagEditor timeline, OsuColour colours) { // todo : should be able to let user able to select show from ruby or main text. timeTagText.Text = LyricUtils.GetTimeTagDisplayRubyText(timeline.HitObject, Item); timeTagPiece.Colour = colours.BlueLight; timeTagWithNoTimePiece.Colour = colours.Red; startTime.BindValueChanged(e => { var hasValue = hasTime(); // update show time-tag style. switch (hasValue) { case true: timeTagPiece.Show(); timeTagWithNoTimePiece.Hide(); break; case false: timeTagPiece.Hide(); timeTagWithNoTimePiece.Show(); break; } Schedule(() => { // should wait until all time-tag time has been modified. X = (float)timeline.GetPreviewTime(Item); }); }, true); }