• 0

    posted a message on kgPanels Offical Thread
    Quote from Kagaro »

    self.text:SetText('|cff000000This text is black,|r |cffff0000while this text will be red.|r')

    SetFormattedText is escaping you data (best guess)



    I copied your code exactly into my current panel, and it didn't work. I got "|cff000000This text is black,|r.." as the output instead of black and red text. Tried it on a new panel with the same results. I am not clear on why this could be happening with SetText and SetFormattedText :| any ideas offhand? or perhaps I should try a fresh install of the addon, though I don't relish replacing all the scripts written so far.
    Posted in: General AddOns
  • 0

    posted a message on kgPanels Offical Thread
    quick question. are kgpanels unable to use Fontstring:SetFormattedText in order to change text characteristics in a single line? I've tried having font colours change by using hex strings with "|cff" to no avail. Example:
    self.text:SetFormattedText("%s%s|r%s%s|r", "|cff9400ca", String1, "|cffffffff", String2)
    and the output i get is "|cff9400caString1|r|cffffffffString2|r"

    Anything I'm doing wrong?

    Thx in advance
    Posted in: General AddOns
  • 0

    posted a message on kgPanels Offical Thread
    Quote from Kagaro »

    self.text:SetText(dmg)




    Thanks :) worked perfectly
    Posted in: General AddOns
  • 0

    posted a message on kgPanels Offical Thread
    Hey there, I've been having trouble trying to set a panel's text to show the amount of spelldmg my warlock has.

    I've been using the following to get everything working except the text actually showing:

    On Load:
    self:RegisterEvent("PLAYER_AURAS_CHANGED")


    On Event:
    dmg = GetSpellBonusDamage(6);
    self.text = dmg


    I also tried "self.text = GetSpellBonusDamage(6);

    neither attempt worked. Instead I found that I could print self.text using "kgPanel:Print(self.text)" and it would show the correct value, but the panel itself showed nothing. I attempted setting a value in the Text section of the waterfall config for the panel, but after running the script any type of manual adjustment of the Text content, Font colour, or font type gave me an index error for "text" at line 658 of kgpanels.lua.

    Any suggestions or advice would be helpful
    Posted in: General AddOns
  • To post a comment, please or register a new account.