Quantcast
round Icons back to square - WoWInterface
Thread Tools Display Modes
08-03-21, 01:00 PM   #1
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 105
round Icons back to square

Hello,

aside from the player portraits there are a few round icons in the default UI which I want to change back to square,

but that cant be done by just replacing the Icon-Textures (Folder).

Basically I want to change them back to square so they match my frames.

(Left)Example with default shape (round)
(Left)Example with edited shape (square)

I was able to locate the GroupFinder Icons but for most other frames like the TalentFrame,

example: PlayerTalentFrameSpecializationSpellScrollFrameScrollChildAbility1Icon

I get a "a nil value" error.

Example Round-Icons TalentFrame

Code:
GroupFinderFrameGroupButton1Icon:SetTexCoord(0.85, 0.15, 0.15, 0.85)
GroupFinderFrameGroupButton1Icon:SetScale(0.70)
GroupFinderFrameGroupButton2Icon:SetTexCoord(0.85, 0.15, 0.15, 0.85)
GroupFinderFrameGroupButton2Icon:SetScale(0.70)
GroupFinderFrameGroupButton3Icon:SetTexCoord(0.85, 0.15, 0.15, 0.85)
GroupFinderFrameGroupButton3Icon:SetScale(0.70)
I never reshaped icons before and I am unsure if some of these textures are protected but maybe someone knows a better solution for this.

Last edited by rulezyx : 08-03-21 at 01:03 PM.
  Reply With Quote
08-04-21, 12:05 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,049
Blizzard_TalentUI creates PlayerTalentFrame, which it marked as LoD.

Blizzard_TalentUI.lua:248 calls SetPortraitToTexture(), which is the function that applies the circular mask. This line specifically sets the icons for the spec list on the left side. For the details pane, line 1156 sets the spec icon in the description and line 1267 sets the icons for the ability list.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 08-04-21 at 12:23 AM.
  Reply With Quote
08-04-21, 06:28 AM   #3
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 105
Ok ty, I forgot that SetPortraitToTexture exist.

I already changed the Classes-Circles texture to squares but it doesn't seem to affect the outcome.

At first I thought it will use the texture as a template to create the round shape.

Latest Blizzard-textures in my UI are custom made and I also tried to get most of my issues done by making matching textures for almost everything possible.

local _, class = UnitClass("player");
self:SetPortraitTextureRaw("Interface\\TargetingFrame\\UI-Classes-Circles");
self:SetPortraitTexCoord(unpack(CLASS_ICON_TCOORDS[strupper(class)]));
The last part seems to apply the metrics.

Basically I want to make all the round icons back to squares without affecting the portraits(avatar-prieview)frames which are supposed to be round like my targetframes.

There are quite a few frames:

Talentframe (Icons)
PvPQueue (Rewards, Icons)
ChallangesFrame (Affixes)
Encounterjournal (Suggesting-, Legendarypage)
Store (Icons)

Do you know any easy solution to achieve this?

Miiru did something similar with MiirGui but with changing Playerportraits too.

Last edited by rulezyx : 08-04-21 at 06:33 AM.
  Reply With Quote
08-04-21, 05:26 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,049
Looks like PlayerTalentFrame inherits PortraitFrameMixin. Neither PortraitFrameMixin:SetPortraitTextureRaw() nor PortraitFrameMixin:SetPortraitTexCoord() call SetPortraitToTexture() while PortraitFrameMixin:SetPortraitToAsset() does.

Digging through the art files reveals that the image itself was created with the circular mask, meaning you'll need to swap to a different image instead. You could probably swap the texture with "Interface\Glues\CharacterCreate\UI-CharacterCreate-Classes" using the same texcoords.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
08-04-21, 06:53 PM   #5
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 105
I replaced/edited almost all textures within the UI and replaced all round icon-textures with square ones including UI-Classes-Circles.

There are some exceptions like the old garrision spec/role ones or round faction icons but these are not affecting those frames.

Also replacing the files in the Masks-Folder did nothing.

I am unsure if this can be done by just replacing textures since I can't find anything else related but maybe I am missing something.
  Reply With Quote
08-05-21, 01:28 AM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,049
I don't think it's going to work purely from texture replacements, you're going to have to run some Lua code.
You'll need to run PortraitFrameMixin:SetPortraitTextureRaw() for every frame that calls PortraitFrameMixin:SetPortraitToAsset(). and pass it the same texture path.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
08-09-21, 12:16 AM   #7
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 105
Ok that makes sense but I still dont get the PortraitFrameMixin:SetPortraitToAsset() part.

I was doing a bit of research but couldn't find much about replacing/changing that for so many different parts.

I will probably just do the textcoords for possible icons and resizing the other ones because for lua its obv hard where to start and too much frames involved which is a bit to far for my bad knowledge.

Thank you for the links
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » round Icons back to square

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