Skip to content
Snippets Groups Projects
Commit 9aef5d94 authored by Alex Ksandra's avatar Alex Ksandra
Browse files

Hopefully fixed Lore text getting cut off.

parent 79c34684
No related branches found
No related tags found
No related merge requests found
......@@ -58,9 +58,10 @@ function _M:init(l, w, force_height)
self.frame.overlays = ovs
end
local h = math.min(force_height and (force_height * game.h) or 999999999, self.font_h * #list)
local required_h = self.font:height() + self.font_h * (#list - 1)
local h = math.min(force_height and (force_height * game.h) or 999999999, required_h)
local c_text = require("engine.ui.Textzone").new{
width=w+10, height=h, scrollbar=(h < self.font_h * #list) and true or false, text=text, color=self.color,
width=w+10, height=h, scrollbar=(h < required_h) and true or false, text=text, color=self.color,
}
c_text:setTextShadow(false)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment