Request: Reading pause between title and text.
MrMartiniMo opened this issue ยท 2 comments
Hi,
currently there is no reading pause between the quest title and the quest text, for example. I have a relatively simple solution for this by simply writing a "." after the title. This creates a reading pause after the title. That sounds much more pleasant. :-)
function module.getText(source)
local toRet = ""
source = module.guessSource(source)
if source == "gossip" then
local npcName = UnitName("npc")
local gossip = CrossExp.getGossipText()
if Settings.readNpcName.get() then
toRet = toRet .. "\n" .. npcName .. ":"
end
toRet = toRet .. "\n" .. gossip .. "."
elseif source == "quest:focused" then
local title = CrossExp.getQuestLogTitle()
local description, objective = GetQuestLogQuestText()
if Settings.readTitle.get() then
toRet = toRet .. "\n" .. title .. "."
end
toRet = toRet .. "\n" .. description .. "."
if Settings.readObjective.get() then
toRet = toRet .. "\n" .. objective .. "."
end
elseif source == "quest:greeting" then
local npcName = UnitName("npc")
-- local title = GetTitleText()
local greeting = GetGreetingText()
if Settings.readNpcName.get() then
toRet = toRet .. "\n" .. npcName .. ":"
end
toRet = toRet .. "\n" .. greeting .. "."
elseif source == "quest:detail" then
local title = GetTitleText()
local description = GetQuestText()
local objective = GetObjectiveText()
if Settings.readTitle.get() then
toRet = toRet .. "\n" .. title .. "."
end
toRet = toRet .. "\n" .. description .. "."
if Settings.readObjective.get() then
toRet = toRet .. "\n" .. objective .. "."
end
elseif source == "quest:progress" then
-- local title = GetTitleText()
local progress = GetProgressText()
toRet = toRet .. "\n" .. progress .. "."
elseif source == "quest:reward" then
-- title = GetTitleText()
local reward = GetRewardText()
toRet = toRet .. "\n" .. reward .. "."
elseif source == "book:1" then
local title = ItemTextGetItem()
local description = ItemTextGetText()
if Settings.readTitle.get() then
toRet = toRet .. "\n" .. title .. "."
end
toRet = toRet .. "\n" .. description .. "."
elseif source and source:find("^book:") then
local description = ItemTextGetText()
toRet = toRet .. "\n" .. description .. "."
end
toRet = toRet:gsub("<", ""):gsub(">", "")
return toRet
end