From de5e62f73194433a89f4538ed27851733a1ac010 Mon Sep 17 00:00:00 2001 From: shagu Date: Sat, 31 Dec 2016 17:34:57 +0100 Subject: [PATCH] firstrun: change text --- modules/chat.lua | 8 ++++++-- pfUI.lua | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/modules/chat.lua b/modules/chat.lua index 7f3140c0..75a0a60b 100644 --- a/modules/chat.lua +++ b/modules/chat.lua @@ -1,7 +1,11 @@ pfUI:RegisterModule("chat", function () - pfUI.firstrun:AddStep("chat_position", function() pfUI.chat.SetupPositions() end, nil, "Your chat window layout will now be aligned by |cff33ffccpf|cffffffffUI.\nPress \"Cancel\" to skip this step.") - pfUI.firstrun:AddStep("chat_channels", function() pfUI.chat.SetupChannels() end, nil, "Your chat channels will now be set up by |cff33ffccpf|cffffffffUI.\nPress \"Cancel\" to skip this step.") + pfUI.firstrun:AddStep("chat_position", function() pfUI.chat.SetupPositions() end, nil, "Chat Layout\n\n" .. + "To use a recommended layout of chat windows that fits best into pfUI,\n" .. + "your chat layout will now be automatically aligned.") + pfUI.firstrun:AddStep("chat_channels", function() pfUI.chat.SetupChannels() end, nil, "Chat Channels\n\n".. + "To get a default pfUI experience, your chat windows are going to be set up now\n".. + "to display the recommended channels, such as Loot and World.") local default_border = pfUI_config.appearance.border.default if pfUI_config.appearance.border.chat ~= "-1" then diff --git a/pfUI.lua b/pfUI.lua index 03cb01f7..94bc1a79 100644 --- a/pfUI.lua +++ b/pfUI.lua @@ -120,6 +120,27 @@ function pfUI.firstrun:AddStep(name, yfunc, nfunc, descr, cmpnt) end function pfUI.firstrun:NextStep() + if next(pfUI_init) == nil then + local yes = function() + this:GetParent():Hide() + pfUI_init["welcome"] = true + pfUI.firstrun:NextStep() + end + + local no = function() + this:GetParent():Hide() + end + + pfUI.api:CreateQuestionDialog("Welcome to |cff33ffccpf|cffffffffUI|r!\n\n".. + "I'm the first run wizzard that will guide you through some basic configuration.\n".. + "You'll now be prompted for several questions. To get a default installation,\n".. + "you might want to click \"Okay\" everywhere. A few settings are client settings\n".. + "(e.g chat questions) so if you don't want to lose your chat configurations, you\n".. + "should be careful with your choices.\n\n".. + "Visit |cff33ffcchttp://shagu.org|r to check for the latest version.", yes, no) + return + end + for name, step in pairs(pfUI.firstrun.steps) do if not pfUI_init[name] then local function yes()