Static PopUp text help - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
03-12-15, 06:09 PM   #1
A Deviate Faerie Dragon
Kraiven's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2015
Posts: 10
Static PopUp text help

I'm using a static popup method to display a warning message to users about being in the wrong spec. I'd like to add some returned values from the api into the 'text =""' field, but every way I have tried doesn't seem to work. I know if I use message() to print I can do it, but I was wondering if there was a way to express this using the static popup dialog. I have searched high and low and can't find any examples or answers as to how or why I can't.

Example code: the yellow text is where I would like to put some values in, but can I only use text? Is there a better way to achieve this?
StaticPopupDialogs["WRONG_SPEC_WARNING"] = {
	text = "Role: " .. roleReturnValueHere, "SpecRole:" specReturnValueHere,
	button1 = "Change Talent Spec",
	button2 = "Not Right Now",
	OnAccept = function(self)
		local inLockdown = InCombatLockdown() -- Check if in combat 
		if inLockdown then
			message("|cffff0000WARNING!|r \n \n |cffffff00In combat and unable to switch specs at this time. \n Try again when combat has ended.|r")
			SetActiveSpecGroup(GetActiveSpecGroup()%2+1) -- Switches Talent Spec
	showAlert = true,  -- Alert Icon in PopUp
	timeout = 0,
	whileDead = false,
	hideOnEscape = true,
	preferredIndex = 3,
Obviously I would have the arguments called in locals. Thank you for any advice! Always appreciated.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Static PopUp text help

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off