mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-11-18 17:17:31 +00:00
Handle newline characters in UI messages
This commit is contained in:
parent
5d7f258973
commit
6a016ed0b9
@ -85,11 +85,13 @@ function UI:_DrawMessages(messages)
|
|||||||
else
|
else
|
||||||
GuiImage(gui, self:_GenID(), 0, 0, "mods/noita-mapcap/files/ui-gfx/hint-16x16.png", 1, 1, 0, 0, 0, "")
|
GuiImage(gui, self:_GenID(), 0, 0, "mods/noita-mapcap/files/ui-gfx/hint-16x16.png", 1, 1, 0, 0, 0, "")
|
||||||
end
|
end
|
||||||
|
|
||||||
GuiLayoutBeginVertical(gui, 0, 0, false, 0, 0)
|
GuiLayoutBeginVertical(gui, 0, 0, false, 0, 0)
|
||||||
if type(message.Lines) == "table" then
|
if type(message.Lines) == "table" then
|
||||||
for _, line in ipairs(message.Lines) do
|
for _, line in ipairs(message.Lines) do
|
||||||
GuiText(gui, 0, 0, tostring(line)) posY = posY + 11
|
for splitLine in tostring(line):gmatch("[^\n]+") do
|
||||||
|
GuiText(gui, 0, 0, splitLine) posY = posY + 11
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if type(message.Actions) == "table" then
|
if type(message.Actions) == "table" then
|
||||||
|
Loading…
Reference in New Issue
Block a user