From f8067ade7cf1235a35f86c9e9ae510a69d1c1ba9 Mon Sep 17 00:00:00 2001 From: Scott Sibley Date: Thu, 20 Jan 2011 02:24:32 +0000 Subject: [PATCH] Add option to word wrap long lines. Note that this only applies if you exclude the right fontstring of the line. --- Modules/UnitTooltip/UnitTooltip.lua | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/Modules/UnitTooltip/UnitTooltip.lua b/Modules/UnitTooltip/UnitTooltip.lua index 48267fd..9a325bf 100644 --- a/Modules/UnitTooltip/UnitTooltip.lua +++ b/Modules/UnitTooltip/UnitTooltip.lua @@ -817,7 +817,7 @@ function mod:CreateLines() v.leftObj.fontString = mod.leftLines[lineNum] v.rightObj.fontString = mod.rightLines[lineNum] else - GameTooltip:AddLine(' ', mod.db.profile.color.r, mod.db.profile.color.g, mod.db.profile.color.b) + GameTooltip:AddLine(' ', mod.db.profile.color.r, mod.db.profile.color.g, mod.db.profile.color.b, v.wordwrap) v.leftObj.fontString = mod.leftLines[lineNum] end if v.rightObj then @@ -1082,6 +1082,18 @@ function mod:RebuildOpts() end, order = 9 }, + wordwrap = { + name = "Word Wrap", + desc = "Whether this line should word wrap lengthy text", + type = "toggle", + get = function() + return v.wordwrap + end, + set = function(info, val) + v.wordwrap = val + end, + order = 10 + }, delete = { name = "Delete", desc = "Delete this line", @@ -1105,12 +1117,12 @@ function mod:RebuildOpts() self:ClearLines() self:CreateLines() end, - order = 10 + order = 11 }, linesHeader = { name = "Lines", type = "header", - order = 11 + order = 12 }, left = { name = "Left", @@ -1128,7 +1140,7 @@ function mod:RebuildOpts() end,]] multiline = true, width = "full", - order = 12 + order = 13 }, right = { name = "Right", @@ -1143,7 +1155,7 @@ function mod:RebuildOpts() end, multiline = true, width = "full", - order = 13 + order = 14 }, marquee = { name = "Enhanced Settings", -- 1.7.9.5