Thread Tools Display Modes
03-09-13, 06:31 AM   #1
Calissi
A Defias Bandit
Join Date: Mar 2013
Posts: 2
Post Updating string text

I have an update function that updates the text, but it places it on top of the existing text is there a way to modify it.
Because there is ModifyText command.

example of what i have

Code:
function Update()
local Title = f:CreateFontString(nil, "OVERLAY", "GameFontNormal")
Title:SetPoint("Center",0,166)
Title:SetText("Title")
end
  Reply With Quote
03-09-13, 07:01 AM   #2
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Lua Code:
  1. local Title = f:CreateFontString(nil, "OVERLAY", "GameFontNormal")
  2. Title:SetPoint("Center",0,166)
  3.  
  4. local function Update()
  5. Title:SetText("Title")
  6. end

Your function should be local. And you dont need to create a new fontstring on every update.
With settext you can modify it.
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
03-09-13, 07:23 AM   #3
Calissi
A Defias Bandit
Join Date: Mar 2013
Posts: 2
Ty this worked
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Updating string text

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