fix(ui): refresh live skill rows
This commit is contained in:
parent
461a1fb7b4
commit
1d8371dbe5
3 changed files with 55 additions and 4 deletions
|
|
@ -1476,6 +1476,35 @@ public class CharacterStatControllerTests
|
|||
Assert.Equal((" (+50)", buff), (runs[2].Text, runs[2].Color));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SkillRow_ValueAndColorFollowLiveSheetWithoutTabRebuild()
|
||||
{
|
||||
var list = new UiPanel { Width = 300 };
|
||||
var layout = Fake((CharacterStatController.ListBoxId, list));
|
||||
CharacterSheet sheet = VitaeSkillSheet(
|
||||
currentLevel: 300,
|
||||
baseLevel: 300,
|
||||
vitaeModifier: 0);
|
||||
|
||||
CharacterStatController.Bind(
|
||||
layout,
|
||||
() => sheet,
|
||||
spriteResolve: id => (id, 16, 16));
|
||||
ClickTab(layout, left: 92f);
|
||||
|
||||
UiText value = SkillRows(list)[0].Children.OfType<UiText>().ToList()[2];
|
||||
Assert.Equal("300", value.LinesProvider()[0].Text);
|
||||
Assert.Equal(Vector4.One, value.LinesProvider()[0].Color);
|
||||
|
||||
sheet = VitaeSkillSheet(
|
||||
currentLevel: 350,
|
||||
baseLevel: 300,
|
||||
vitaeModifier: 0);
|
||||
|
||||
Assert.Equal("350", value.LinesProvider()[0].Text);
|
||||
Assert.Equal(new Vector4(0f, 1f, 0f, 1f), value.LinesProvider()[0].Color);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SkillClick_ZeroDelta_NoParentheticals()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue