From 7ea1453e08241ff07d3020c742061fdb39a4ecc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Jaro=C5=A1?= Date: Sat, 8 Mar 2025 22:44:13 +0100 Subject: [PATCH] Add test message button and fix speech frame positioning --- Addon/Code/Options.lua | 4 ++++ Addon/Code/Speech.lua | 1 + Addon/Code/SpeechFrame.lua | 1 + 3 files changed, 6 insertions(+) diff --git a/Addon/Code/Options.lua b/Addon/Code/Options.lua index 380e313..2319706 100644 --- a/Addon/Code/Options.lua +++ b/Addon/Code/Options.lua @@ -110,6 +110,10 @@ local function InitSpeeches() addon.SpeechFrame:UpdateSettings() end) + CreateButton('Zobrazit testovaci zpravu', "Zobrazit", function() + addon.API.AddSpeechMessage("Test", "Text message") + end) + end local function InitOthers() diff --git a/Addon/Code/Speech.lua b/Addon/Code/Speech.lua index befbaa6..dd432e0 100755 --- a/Addon/Code/Speech.lua +++ b/Addon/Code/Speech.lua @@ -73,6 +73,7 @@ local function AddMessage(sender, message) RemoveMessage(MessageFrame) end) end +addon.API.AddSpeechMessage = AddMessage local function ShowSpeechTranslation(sender, message) local text = CzechQuestsAddon:GetData("speech", message) diff --git a/Addon/Code/SpeechFrame.lua b/Addon/Code/SpeechFrame.lua index 432bcd0..7bd4888 100755 --- a/Addon/Code/SpeechFrame.lua +++ b/Addon/Code/SpeechFrame.lua @@ -28,6 +28,7 @@ function SpeechFrame:UpdateSettings() self:SetWidth(CzechQuestsAddon_Store.config.SPEECH_FRAME_WIDTH) -- Set position + self:ClearAllPoints() self:SetPoint( "BOTTOMLEFT", UIParent, "BOTTOMLEFT", CzechQuestsAddon_Store.config.SPEECH_FRAME_POSITION_X,