Skip to content

Commit

Permalink
🗯️ Improve tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
tomrijnbeek committed Oct 1, 2023
1 parent 2893c41 commit f5250fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion entities/item/CombatUse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ sealed class CompositeCombatUse : ICombatUse
{
private readonly ICombatUse[] uses;

public string Description => string.Concat("; ", uses.Select(u => u.Description));
public string Description => string.Join("\n", uses.Select(u => u.Description));

public CompositeCombatUse(ICombatUse[] uses)
{
Expand Down
3 changes: 2 additions & 1 deletion scenes/main/BottomHud.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ public void SetItem(ItemLibrary.ItemType item)

var name = item.ToString();
var desc = item.Description();
var useDesc = item.CombatUse() is { } use ? $"\n{use.Description}" : "";

label.BbcodeText = $"[color=yellow]{name}[/color] {desc}";
label.BbcodeText = $"{name}\n[color=silver]{desc}[/color][color=teal]{useDesc}[/color]";
frame.RectMinSize = new Vector2(0, label.RectSize.y + 3);
Visible = true;
}
Expand Down

0 comments on commit f5250fc

Please sign in to comment.