This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
It's a small issue, but due to using a UI package my toast is black and since the text for attempts is also black it doesn't show up at all. Would it be possible to add an option for changing font color? I've tried looking in the code but can't seem to find where to do it myself.
All layout-related stuff should be in Rarity/Core/GUI.lua, but adding an option (and more importantly, the UI to change it) would probably be far more work than just tweaking it locally for this specific case.
I can look into it, but I'm very busy, so I can't make any promises. Status: https://github.com/SacredDuckwhale/Rarity/issues/181
Oh, totally understood.
I'm still having the issue, even though I've scoured the file and changed what I thought I had to on line 2579:
AchievementShield_SetPoints(0, shieldPoints, GameFontWhite, GameFontWhiteSmall)
I'll keep digging, but any help is appreciated. Here's a magnified screenshot of how it looks in-game, you can see the top text is extremely hard to see:
I also dinked around further and changed lines 2525 down to this:
if attempts == 1 then unlocked:setTextColor(1, 1, 1) unlocked:SetText(L["Obtained On Your First Attempt"]) else unlocked:setTextColor(1, 1, 1) unlocked:SetText(format(L["Obtained After %d Attempts"], attempts)) end
So we'll see if that works.
I also misspoke in my original ticket: it's not the toast, it's the fake achievement popup that's the issue.
Receiving this error, so any guidance would be super helpful:
2x Rarity\Core\GUI.lua:2526: attempt to call method 'setTextColor' (a nil value) [string "@Rarity\Core\GUI.lua"]:2526: in function `setUpFunction' [string "@FrameXML\AlertFrames.lua"]:177: in function `ShowAlert' [string "@FrameXML\AlertFrames.lua"]:113: in function `AddAlert' [string "@Rarity\Core\GUI.lua"]:2603: in function `ShowFoundAlert' [string "@Rarity\Core\EventHandlers.lua"]:725: in function `OnItemFound' [string "@Rarity\Core\EventHandlers.lua"]:1372: in function `?' [string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:119: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:119> [string "=[C]"]: ? [string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:29: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:25> [string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:64: in function `Fire' [string "@Ace3\AceEvent-3.0\AceEvent-3.0-4.lua"]:120: in function <Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>
You're no longer dealing with Rarity after the ShowFoundAlert call, and might want to look at Blizzard's UI: https://www.townlong-yak.com/framexml/live/AlertFrames.lua
I really have no idea what they're doing in there, and I think the original author simply copy/pasted from their code. Rarity registers the achievement popup with Blizzard's UI and lets it handle the rest.
However, if you're manually trying to set the text color on a FontString object, you need to use the correct spelling (case sensitive): https://wow.gamepedia.com/API_FontString_SetText
Oh my lord how did I miss something as silly as a lowercase S. Thanks! Hoping it works now.
Well, if you do figure it out feel free to post the changes (either here or as a pull request on GitHub). I'll be happy to add a setting for this, I just don't have time to look into it myself :)
I actually forgot about being able to set text colour using a hex code (I've done it elsewhere, just completely spaced on it) so I just did that instead of my previous method:
Change lines 2525 - 2529 to
unlocked:SetText(L["|cffFFFFFF First Attempt!|r"]) else unlocked:SetText(format(L["|cffFFFFFF %d Attempts!|r"], attempts)) end
for white text on the header. I also changed the display text because it was, for some reason, slightly too long and truncated in the window. Tested it and it works, but gives this error (I assume because of the text change):
1x AceLocale-3.0-6: Rarity: Missing entry for ' First Attempt!' [string "@Rarity\Core\GUI.lua"]:2526: in function `setUpFunction' [string "@FrameXML\AlertFrames.lua"]:177: in function `ShowAlert' [string "@FrameXML\AlertFrames.lua"]:113: in function `AddAlert' [string "@Rarity\Core\GUI.lua"]:2601: in function `ShowFoundAlert' [string "Rarity:ShowFoundAlert(32458, 1)"]:1: in main chunk [string "=[C]"]: in function `RunScript' [string "@FrameXML\ChatFrame.lua"]:2177: in function `?' [string "@FrameXML\ChatFrame.lua"]:4859: in function `ChatEdit_ParseText' [string "@FrameXML\ChatFrame.lua"]:4523: in function `ChatEdit_SendText' [string "@FrameXML\ChatFrame.lua"]:4559: in function `ChatEdit_OnEnterPressed' [string "*:OnEnterPressed"]:1: in function <[string "*:OnEnterPressed"]:1>
I went into the locales and replaced every instance of the old messages with the new, but that didn't do anything.
To post a comment, please login or register a new account.