Thread Tools Display Modes
07-26-18, 09:35 AM   #1
numberzero2
A Murloc Raider
Join Date: Jul 2018
Posts: 9
VertexColor

Hello!

I'm having problems to set a vertex color to some Blizzard frames. For the majority of frames this code work, but some doesn't, Idk if this is a blizzard problem or I'm doing something wrong to those frames, maybe I don't have permission to change them?

Example of a code that doesn't change the vertex color:
Lua Code:
  1. for i, v in pairs({ CollectionsJounalTopBorder, CollectionsJounalRightBorder,
  2.     CollectionsJounalLeftBorder, CollectionsJounalBottomBorder }) do
  3.     v:SetVertexColor("some random color preset you choose")
  4. end

Someone can help me if this? Thanks in advance.
  Reply With Quote
07-26-18, 09:50 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
There's an r in Journal.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
07-26-18, 10:38 AM   #3
numberzero2
A Murloc Raider
Join Date: Jul 2018
Posts: 9
Originally Posted by Fizzlemizz View Post
There's an r in Journal.
Ops bad example my bad. This one doesn't work too:
Lua Code:
  1. for i, v in pairs({ PlayerTalentFrameTopBorder, PlayerTalentFrameRightBorder,
  2.     PlayerTalentFrameLeftBorder, PlayerTalentFrameBottomBorder }) do
  3.     v:SetVertexColor("some random color preset you choose")
  4. end
  Reply With Quote
07-26-18, 10:49 AM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
Works for me:
The frame also has
PlayerTalentFrameBtnCornerLeft and PlayerTalentFrameBtnCornerRight plus others inherited from other templates.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
07-26-18, 11:02 AM   #5
numberzero2
A Murloc Raider
Join Date: Jul 2018
Posts: 9
Originally Posted by Fizzlemizz View Post
Works for me:
The frame also has
PlayerTalentFrameBtnCornerLeft and PlayerTalentFrameBtnCornerRight plus others inherited from other templates.
It work, but don't change the color. Try to change to (.1, .1, .1)
  Reply With Quote
07-26-18, 11:10 AM   #6
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
Try to change to (1, 0, 0),

.1, .1, .1 makes them pretty much black
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
07-26-18, 11:21 AM   #7
numberzero2
A Murloc Raider
Join Date: Jul 2018
Posts: 9
Originally Posted by Fizzlemizz View Post
Try to change to (1, 0, 0),

.1, .1, .1 makes them pretty much black
Worked for you? for me the color doesn't change (stay the blizzard gray dafault). Man this make me sad. Thanks for the help. I will see if I can make it work here too.
  Reply With Quote
07-26-18, 11:59 AM   #8
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
Code:
/run for i, v in pairs({ PlayerTalentFrameTopBorder, PlayerTalentFrameRightBorder,PlayerTalentFrameLeftBorder,PlayerTalentFrameBottomBorder,PlayerTalentFrameBtnCornerLeft,PlayerTalentFrameBtnCornerRight }) do v:SetVertexColor(1, 0, 0) end
Maybe you're setting the colour too early and it's being changed back.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
07-26-18, 12:15 PM   #9
numberzero2
A Murloc Raider
Join Date: Jul 2018
Posts: 9
Weird, by using a run command it work, but when I put this in a Lua code doesn't. Any idea why this is happening?
I will try to set a timer to this one and see if it change. (Edit: Didn't work)

Last edited by numberzero2 : 07-26-18 at 12:22 PM.
  Reply With Quote
07-26-18, 12:33 PM   #10
numberzero2
A Murloc Raider
Join Date: Jul 2018
Posts: 9
Originally Posted by numberzero2 View Post
Weird, by using a run command it work, but when I put this in a Lua code doesn't. Any idea why this is happening?
I will try to set a timer to this one and see if it change. (Edit: Didn't work)
Looks like it need to be open/load first (the frame), so you can change the color. I opened that frame and put a 15sec timer to run the command in lua, it worked. Any solution?
  Reply With Quote
07-26-18, 12:42 PM   #11
numberzero2
A Murloc Raider
Join Date: Jul 2018
Posts: 9
Originally Posted by Fizzlemizz View Post
Code:
/run for i, v in pairs({ PlayerTalentFrameTopBorder, PlayerTalentFrameRightBorder,PlayerTalentFrameLeftBorder,PlayerTalentFrameBottomBorder,PlayerTalentFrameBtnCornerLeft,PlayerTalentFrameBtnCornerRight }) do v:SetVertexColor(1, 0, 0) end
Maybe you're setting the colour too early and it's being changed back.
This seems to work, but have to be a better option.
Lua Code:
  1. C_Timer.After(1, function()
  2. TalentMicroButton:Click()
  3. end)
  4. C_Timer.After(1.5, function()
  5.     for i, v in pairs({ PlayerTalentFrameTopBorder, PlayerTalentFrameRightBorder,
  6.         PlayerTalentFrameLeftBorder, PlayerTalentFrameBottomBorder,
  7.         PlayerTalentFramePortraitFrame, PlayerTalentFrameTopRightCorner,
  8.         PlayerTalentFrameBtnCornerLeft,  }) do
  9.             v:SetVertexColor(.1, .1, .1)
  10.              PlayerTalentFrameCloseButton:Click()
  11.     end
  12. end)
  Reply With Quote
07-26-18, 12:54 PM   #12
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
The TalentUI is Load On Demand (the frames and code don't get loaded until you press N or click the talent menu)

Lua Code:
  1. local f = CreateFrame("Frame")
  2. f:RegisterEvent("ADDON_LOADED")
  3. f:SetScript("OnEvent", function(self, event, name)
  4.     if name == "Blizzard_TalentUI" then
  5.         for i, v in pairs({ PlayerTalentFrameTopBorder, PlayerTalentFrameRightBorder, PlayerTalentFrameLeftBorder, PlayerTalentFrameBottomBorder, PlayerTalentFrameBtnCornerLeft, PlayerTalentFrameBtnCornerRight }) do
  6.             v:SetVertexColor(.1, .1, .1)
  7.         end
  8.     end
  9. end)
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 07-26-18 at 12:56 PM.
  Reply With Quote
07-26-18, 01:18 PM   #13
numberzero2
A Murloc Raider
Join Date: Jul 2018
Posts: 9
Thank you, now it's working the way I wanted.

One last question, how can I find those events for others frames? Like the collection one.

Again thank you for the help.
  Reply With Quote
07-26-18, 01:22 PM   #14
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
The event will remain the same, the name will change.

https://wow.gamepedia.com/Viewing_Bl...interface_code

Once you've exported the code section there will be an addons folder that contains all the Bizzard_xxx addons. You can check their .toc files to see if they are marked

## LoadOnDemand: 1
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
07-26-18, 01:54 PM   #15
numberzero2
A Murloc Raider
Join Date: Jul 2018
Posts: 9
Originally Posted by Fizzlemizz View Post
The event will remain the same, the name will change.

https://wow.gamepedia.com/Viewing_Bl...interface_code

Once you've exported the code section there will be an addons folder that contains all the Bizzard_xxx addons. You can check their .toc files to see if they are marked

## LoadOnDemand: 1
Ok Thank you.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » VertexColor

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