View Single Post
02-10-10, 12:11 PM   #8
Sythalin
Curse staff
 
Sythalin's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 680
Thanks, I realized the fix last night already, but good to see it verified (and it works btw).

One thing though that I've run into that maybe someone can help me with. I have ZERO understanding of string manipulation and it has me painted into a corner atm.

Code:
cityList = {
	[3] = "ThunderBluff",
}

b = CreateFrame("BUTTON", "MageTaxi_Port"..i, f, "SecureActionButtonTemplate")
	b:SetPoint("RIGHT", "MageTaxi_City"..i, "LEFT", 0, 0)
	b:SetHeight(18)
	b:SetWidth(18)
	b.texture = b:CreateTexture("MageTaxi_Spell"..i)
	b.texture:SetAllPoints(b)
	b.texture:SetTexture("Interface\\Icons\\Spell_Arcane_Portal".. cityList[i])
	b:SetAttribute("type", "spell")
	b:SetAttribute("spell", "Portal: ".. cityList[i])
fs = b:CreateFontString("MageTaxi_Text"..i)
	fs:SetFontObject("GameFontGreenSmall")
	fs:SetJustifyH("LEFT")
	s:SetText(cityList[i])
	fs:SetPoint("LEFT", "MageTaxi_City"..i, "RIGHT", 0,0)
Only things that really matter are the orange spots. The issue is with Thunder Bluff. The icon name puts it as "ThunderBluff" (no space), but I still want it to appear as "Thunder Bluff" in the font string. Is there a way to do this without having to assign a temp var for difference?
  Reply With Quote