WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   UI Screenshots, Feedback and Design Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=144)
-   -   PhotoShop (https://www.wowinterface.com/forums/showthread.php?t=59839)

Sharpedge 03-29-24 05:52 PM

PhotoShop
 
1 Attachment(s)
Is anyone here good with PhotoShop? I have made a so called Logo for my addon that I want to attach to the top of the GUI. Thats that the problem. The entire image is green. So it seems I'm not using the correct size. What size does the image need to be? My GUI frame code is here:

Code:

local IncCallout = CreateFrame("Frame", "IncCalloutMainFrame", UIParent, "BackdropTemplate")
IncCallout:SetSize(160, 255)
IncCallout:SetPoint("CENTER")
IncCallout:SetMovable(true)
IncCallout:EnableMouse(true)
IncCallout:RegisterForDrag("LeftButton")
IncCallout:SetScript("OnDragStart", IncCallout.StartMoving)
IncCallout:SetScript("OnDragStop", IncCallout.StopMovingOrSizing)

local fontSize = 14

-- Create a container frame for the Conquest Points label
local conquestContainer = CreateFrame("Frame", "ConquestContainerFrame", IncCallout, "BackdropTemplate")
conquestContainer:SetPoint("BOTTOMLEFT", IncCallout, "BOTTOMLEFT", 45, 15) -- Assuming xOffsetConquest and yOffsetConquest are defined
conquestContainer:SetSize(85, 40)
conquestContainer:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background"})
conquestContainer:SetBackdropColor(0, 0, 0, 0)

-- Create the Conquest Points label within its container
local conquestPointsLabel = conquestContainer:CreateFontString(nil, "OVERLAY", "GameFontNormal")
conquestPointsLabel:SetPoint("CENTER", conquestContainer, "CENTER", 0, 0)
conquestPointsLabel:SetFont("Fonts\\FRIZQT__.TTF", fontSize)
conquestPointsLabel:SetText("Conquest: 0")

-- Create a container frame for the Honor Points label
local honorContainer = CreateFrame("Frame", "HonorContainerFrame", IncCallout, "BackdropTemplate")
honorContainer:SetPoint("BOTTOMLEFT", IncCallout, "BOTTOMLEFT", 45, -5) -- Assuming xOffsetHonor and yOffsetHonor are defined
honorContainer:SetSize(85, 40)
honorContainer:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background"})
honorContainer:SetBackdropColor(0, 0, 0, 0)

-- Create the Honor Points label within its container
local honorPointsLabel = honorContainer:CreateFontString(nil, "OVERLAY", "GameFontNormal")
honorPointsLabel:SetPoint("CENTER", honorContainer, "CENTER", 0, 0)
honorPointsLabel:SetFont("Fonts\\FRIZQT__.TTF", fontSize)
honorPointsLabel:SetText("Honor: 0")

local bgTexture = IncCallout:CreateTexture(nil, "BACKGROUND")
bgTexture:SetColorTexture(0, 0, 0)
bgTexture:SetAllPoints(IncCallout)

IncCallout:SetScript("OnDragStart", function(self)
    if not IncDB.isLocked then
        self:StartMoving()
    end
end)

IncCallout:SetScript("OnDragStop", function(self)
    self:StopMovingOrSizing()
   
    if not IncDB.isLocked then
             
    end
end)

Attachment 9877



I have not added the title logo code to it again. I just need to know if I need a specific size to make the title logo. Can anyone help me with this, or point me in the right direction?

Fizzlemizz 03-29-24 07:13 PM

.tga, .png .blp (you will need to add the extension to the texture name in your code if it's .png otherwise the game will choose .blp if it exists then .tga)

The sides should be 4, 8, 16, 32, 64, 128, 256 etc. pixels (it doesn't have to be square but each side has to be one of those powers of 2 in length).

If you save to a .png you can use BLPNG Converter if you want to use .blp.

Sharpedge 03-29-24 07:19 PM

Thanks Fizzlemizz, I haven't added in the code yet again for the title logo. I had deleted it when I got frustrated.

Fizzlemizz 03-29-24 07:22 PM

Quote:

Originally Posted by Sharpedge (Post 343663)
Thanks Fizzlemizz, I haven't added in the code yet again for the title logo. I had deleted it when I got frustrated.

Saw that after I posted ;)

SDPhantom 03-29-24 08:28 PM

For future reference, the game turns texture objects solid green if there's a problem loading the image file. It's nothing wrong with your code, just the image you exported.

Fizzlemizz 03-29-24 09:01 PM

Quote:

Originally Posted by SDPhantom (Post 343665)
For future reference, the game turns texture objects solid green if there's a problem loading the image file. It's nothing wrong with your code, just the image you exported.

Not anymore (retail). It just renders the texture transparent. Not sure about the other clients. Maybe something to do with adding .png support.

Edit:
This caused me to do some testing. If the texture file doesn't exist it's rendered transparent otherwise if it's malformed it's green.

Sharpedge 03-29-24 09:58 PM

I got it pretty much. I just have to work on my PhotoShop skills lol.


All times are GMT -6. The time now is 01:19 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI