Add test message button and fix speech frame positioning
All checks were successful
forgejo/Czech Quests/addon/pipeline/head This commit looks good
All checks were successful
forgejo/Czech Quests/addon/pipeline/head This commit looks good
This commit is contained in:
parent
4e736a4e4b
commit
7ea1453e08
3 changed files with 6 additions and 0 deletions
|
@ -110,6 +110,10 @@ local function InitSpeeches()
|
||||||
addon.SpeechFrame:UpdateSettings()
|
addon.SpeechFrame:UpdateSettings()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
CreateButton('Zobrazit testovaci zpravu', "Zobrazit", function()
|
||||||
|
addon.API.AddSpeechMessage("Test", "Text message")
|
||||||
|
end)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function InitOthers()
|
local function InitOthers()
|
||||||
|
|
|
@ -73,6 +73,7 @@ local function AddMessage(sender, message)
|
||||||
RemoveMessage(MessageFrame)
|
RemoveMessage(MessageFrame)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
addon.API.AddSpeechMessage = AddMessage
|
||||||
|
|
||||||
local function ShowSpeechTranslation(sender, message)
|
local function ShowSpeechTranslation(sender, message)
|
||||||
local text = CzechQuestsAddon:GetData("speech", message)
|
local text = CzechQuestsAddon:GetData("speech", message)
|
||||||
|
|
|
@ -28,6 +28,7 @@ function SpeechFrame:UpdateSettings()
|
||||||
self:SetWidth(CzechQuestsAddon_Store.config.SPEECH_FRAME_WIDTH)
|
self:SetWidth(CzechQuestsAddon_Store.config.SPEECH_FRAME_WIDTH)
|
||||||
|
|
||||||
-- Set position
|
-- Set position
|
||||||
|
self:ClearAllPoints()
|
||||||
self:SetPoint(
|
self:SetPoint(
|
||||||
"BOTTOMLEFT", UIParent, "BOTTOMLEFT",
|
"BOTTOMLEFT", UIParent, "BOTTOMLEFT",
|
||||||
CzechQuestsAddon_Store.config.SPEECH_FRAME_POSITION_X,
|
CzechQuestsAddon_Store.config.SPEECH_FRAME_POSITION_X,
|
||||||
|
|
Loading…
Add table
Reference in a new issue