Skip to content

Commit

Permalink
Concate statuses that don't fit into an ellipsis
Browse files Browse the repository at this point in the history
  • Loading branch information
Dugy committed May 13, 2024
1 parent e26a24c commit 6d09bb4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lua/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ function wesnoth.interface.game_display.unit_status()
tooltip = _"unplagueable: This unit will not return as undead when killed by a plague weapon special."
} })
end
if #s > 2 then -- Too long to fit the line
local entire_string = s[2][2].tooltip
for i = 3,#s do
entire_string = entire_string .. "\n ----------\n\n" .. s[i][2].tooltip
end
local old_statuses = s
s = {old_statuses[1], {"element", { image = "misc/icon-ellipsis.png", tooltip = entire_string }}}
end
return s
end

Expand Down

0 comments on commit 6d09bb4

Please sign in to comment.