From 6d09bb4870009ac2e11df80d65fe919cf2970520 Mon Sep 17 00:00:00 2001 From: Dugy Date: Tue, 14 May 2024 00:03:18 +0200 Subject: [PATCH] Concate statuses that don't fit into an ellipsis --- lua/main.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/main.lua b/lua/main.lua index 2cb26c05..502deac9 100644 --- a/lua/main.lua +++ b/lua/main.lua @@ -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