优化“物品收藏”中(头部)等部位对于已获得和未获得的状态,

已获得的以绿色边框、绿色高光、绿色选中颜色显示
未获得的以红色边框、红色高光、红色选中颜色显示
This commit is contained in:
尚美 2025-06-16 02:37:01 +08:00
parent 98579cd41a
commit 7d57073759
2 changed files with 297 additions and 136 deletions

View File

@ -99,21 +99,30 @@ end
-- 清除所有模型选中状态
function SM_ItemCollectionUI:ClearModelSelection()
if self.currentSelectedModel and self.currentSelectedModel.TransmogStateTexture then
self.currentSelectedModel.TransmogStateTexture:Hide()
if self.selectedModel and self.selectedModel.TransmogStateTexture then
self.selectedModel.TransmogStateTexture:Hide()
end
self.currentSelectedModel = nil
self.selectedModel = nil
end
-- 设置模型选中状态
function SM_ItemCollectionUI:SelectModel(model)
-- 先清除当前选中的模型
-- 清除之前的选中状态
self:ClearModelSelection()
-- 设置新的选中模型
if model and model.TransmogStateTexture then
model.TransmogStateTexture:Show()
self.currentSelectedModel = model
-- 设置当前模型为选中状态
if model then
if model.TransmogStateTexture then
model.TransmogStateTexture:Show()
-- 根据物品是否已获得设置选中纹理颜色
if model.itemData and model.itemData.obtained then
model.TransmogStateTexture:SetVertexColor(0, 1, 0, 0.7) -- 绿色选中纹理
else
model.TransmogStateTexture:SetVertexColor(1, 0, 0, 0.7) -- 红色选中纹理
end
end
self.selectedModel = model
end
end
@ -404,14 +413,14 @@ function SM_ItemCollectionUI:ShowItemPreview(slot, panel)
local col = pageIndex % 6
local model = CreateFrame("Frame", nil, previewFrame, "SM_CollectionSystemWardrobeItemsModelTemplate")
model:SetSize(78, 104)
model:SetPoint("TOPLEFT", 24 + col * 92, -38 - row * 120)
model:SetPoint("TOPLEFT", 24 + col * 92, -10 - row * 120)
if model.Model then model.Model:Hide() end
local icon = model:CreateTexture(nil, "ARTWORK")
icon:SetSize(50, 50)
icon:SetPoint("CENTER", 0, 10)
icon:SetTexture(GetItemIcon(itemID))
icon:SetTexCoord(0.07, 0.93, 0.07, 0.93)
-- 检查物品是否已获得,设置灰度效果
local itemData = nil
if SM_CollectionsDB and SM_CollectionsDB.itemCache and SM_CollectionsDB.itemCache.items then
@ -422,14 +431,33 @@ function SM_ItemCollectionUI:ShowItemPreview(slot, panel)
end
end
end
-- 如果物品未获得,设置灰度效果
if not (itemData and itemData.obtained) then
icon:SetDesaturated(true)
icon:SetVertexColor(0.5, 0.5, 0.5)
end
model.IconTexture = icon
-- 设置边框颜色
if model.Border then
if itemData and itemData.obtained then
model.Border:SetVertexColor(0, 1, 0, 1) -- 绿色边框
else
model.Border:SetVertexColor(1, 0, 0, 1) -- 红色边框
end
end
-- 设置高光颜色
local highlightTextures = { model:GetRegions() }
for _, region in ipairs(highlightTextures) do
if region:GetDrawLayer() == "HIGHLIGHT" then
if itemData and itemData.obtained then
region:SetVertexColor(0, 1, 0, 0.7) -- 绿色高光
else
region:SetVertexColor(1, 0, 0, 0.7) -- 红色高光
end
end
end
model.itemData = itemData -- 保存物品数据以便后续使用
if model.TransmogStateTexture then model.TransmogStateTexture:Hide() end
table.insert(modelFrames, model)
@ -444,7 +472,6 @@ function SM_ItemCollectionUI:ShowItemPreview(slot, panel)
local currentItemID = itemID
local currentModel = model
model:SetScript("OnMouseDown", function(self)
SM_ItemCollectionUI:SelectModel(currentModel)
if SM_Collections.MainFrame and SM_Collections.MainFrame.RightSidePanel then
local itemName = GetItemInfo(currentItemID)
@ -452,7 +479,8 @@ function SM_ItemCollectionUI:ShowItemPreview(slot, panel)
SM_Collections.MainFrame.RightSidePanel.MountNama:SetText(itemName or "")
end
if SM_Collections.MainFrame.RightSidePanel.introText then
SM_Collections.MainFrame.RightSidePanel.introText:SetText("物品ID: " .. currentItemID .. "\n类型: " .. slot.name)
SM_Collections.MainFrame.RightSidePanel.introText:SetText("物品ID: " ..
currentItemID .. "\n类型: " .. slot.name)
end
SM_ItemCollectionUI:UpdateAttributes(currentItemID, slot.invType)
end
@ -464,7 +492,7 @@ function SM_ItemCollectionUI:ShowItemPreview(slot, panel)
local itemID = slot.items[startIdx]
local itemName = GetItemInfo(itemID)
if SM_Collections.MainFrame and SM_Collections.MainFrame.RightSidePanel then
if SM_Collections.MainFrame.RightSidePanel.MountNama then
@ -489,6 +517,41 @@ function SM_ItemCollectionUI:ShowItemPreview(slot, panel)
model:SetSize(78, 104)
model:SetPoint("TOPLEFT", 24 + col * 92, -10 - row * 120)
if model.TransmogStateTexture then model.TransmogStateTexture:Hide() end
-- 检查物品是否已获得,设置灰度效果
local itemData = nil
if SM_CollectionsDB and SM_CollectionsDB.itemCache and SM_CollectionsDB.itemCache.items then
for _, item in ipairs(SM_CollectionsDB.itemCache.items) do
if tonumber(item.id) == tonumber(itemID) then
itemData = item
break
end
end
end
-- 设置边框颜色
if model.Border then
if itemData and itemData.obtained then
model.Border:SetVertexColor(0, 1, 0, 1) -- 绿色边框
else
model.Border:SetVertexColor(1, 0, 0, 1) -- 红色边框
end
end
-- 设置高光颜色
local highlightTextures = { model:GetRegions() }
for _, region in ipairs(highlightTextures) do
if region:GetDrawLayer() == "HIGHLIGHT" then
if itemData and itemData.obtained then
region:SetVertexColor(0, 1, 0, 0.7) -- 绿色高光
else
region:SetVertexColor(1, 0, 0, 0.7) -- 红色高光
end
end
end
model.itemData = itemData -- 保存物品数据以便后续使用
table.insert(modelFrames, model)
model:Show()
model:EnableMouse(true)
@ -508,7 +571,8 @@ function SM_ItemCollectionUI:ShowItemPreview(slot, panel)
SM_Collections.MainFrame.RightSidePanel.MountNama:SetText(itemName or "")
end
if SM_Collections.MainFrame.RightSidePanel.introText then
SM_Collections.MainFrame.RightSidePanel.introText:SetText("物品ID: " .. currentItemID .. "\n类型: " .. slot.name)
SM_Collections.MainFrame.RightSidePanel.introText:SetText("物品ID: " ..
currentItemID .. "\n类型: " .. slot.name)
-- 获取物品的 obtained 状态
local itemData = nil
for _, item in ipairs(SM_CollectionsDB.itemCache and SM_CollectionsDB.itemCache.items or {}) do
@ -517,12 +581,15 @@ function SM_ItemCollectionUI:ShowItemPreview(slot, panel)
break
end
end
-- 添加状态文本
if not SM_Collections.MainFrame.RightSidePanel.statusText then
SM_Collections.MainFrame.RightSidePanel.statusText = SM_Collections.MainFrame.RightSidePanel:CreateFontString(nil, "OVERLAY")
SM_Collections.MainFrame.RightSidePanel.statusText:SetFont("Fonts\\ZYKai_T.ttf", 14, "OUTLINE")
SM_Collections.MainFrame.RightSidePanel.statusText:SetPoint("TOP", SM_Collections.MainFrame.RightSidePanel.introText, "BOTTOM", 0, -10)
SM_Collections.MainFrame.RightSidePanel.statusText = SM_Collections.MainFrame.RightSidePanel
:CreateFontString(nil, "OVERLAY")
SM_Collections.MainFrame.RightSidePanel.statusText:SetFont("Fonts\\ZYKai_T.ttf", 14,
"OUTLINE")
SM_Collections.MainFrame.RightSidePanel.statusText:SetPoint("TOP",
SM_Collections.MainFrame.RightSidePanel.introText, "BOTTOM", 0, -10)
end
local statusText = itemData and itemData.obtained and "|cFF00FF00已获得|r" or "|cFFFF0000未获得|r"
SM_Collections.MainFrame.RightSidePanel.statusText:SetText(statusText)
@ -634,7 +701,7 @@ function SM_ItemCollectionUI:ShowItemPreview(slot, panel)
end
end
self:CreatePageButtons(panel, slot)
-- 在切换部位时更新物品状态显示
if #slot.items > 0 then
local startIdx = (self.currentPage - 1) * self.itemsPerPage + 1
@ -650,13 +717,15 @@ function SM_ItemCollectionUI:ShowItemPreview(slot, panel)
end
end
end
-- 添加或更新状态文本
if SM_Collections.MainFrame and SM_Collections.MainFrame.RightSidePanel then
if not SM_Collections.MainFrame.RightSidePanel.statusText then
SM_Collections.MainFrame.RightSidePanel.statusText = SM_Collections.MainFrame.RightSidePanel:CreateFontString(nil, "OVERLAY")
SM_Collections.MainFrame.RightSidePanel.statusText = SM_Collections.MainFrame.RightSidePanel
:CreateFontString(nil, "OVERLAY")
SM_Collections.MainFrame.RightSidePanel.statusText:SetFont("Fonts\\ZYKai_T.ttf", 14, "OUTLINE")
SM_Collections.MainFrame.RightSidePanel.statusText:SetPoint("TOP", SM_Collections.MainFrame.RightSidePanel.introText, "BOTTOM", 0, -10)
SM_Collections.MainFrame.RightSidePanel.statusText:SetPoint("TOP",
SM_Collections.MainFrame.RightSidePanel.introText, "BOTTOM", 0, -10)
end
local statusText = itemData and itemData.obtained and "|cFF00FF00已获得|r" or "|cFFFF0000未获得|r"
SM_Collections.MainFrame.RightSidePanel.statusText:SetText(statusText)
@ -983,7 +1052,7 @@ function SM_ItemCollectionUI:ShowItemCollectionUI(parent)
end
local slotTypeMap = {}
for _, slot in ipairs(self.ALL_SLOTS) do
slotTypeMap[slot.name] = slot.invType
slotTypeMap[slot.invType] = slot
end
function self:GetItemEquipLocFromServerData(serverItemType, nini)
if slotTypeMap[serverItemType] then

View File

@ -1,53 +1,66 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Button name="SM_CollectionSystemWardrobeSlotButtonTemplate" parentArray="Buttons" virtual="true">
<Button name="SM_CollectionSystemWardrobeSlotButtonTemplate" parentArray="Buttons"
virtual="true">
<KeyValues>
<KeyValue key="transmogType" value="LE_TRANSMOG_TYPE_ILLUSION" type="global"/>
<KeyValue key="transmogType" value="LE_TRANSMOG_TYPE_ILLUSION" type="global" />
</KeyValues>
<Size x="25" y="25"/>
<NormalTexture parentKey="NormalTexture" file="Interface\AddOns\SM_CollectionSystem\Interface\Transmogrify\Transmogrify" atlas="transmog-nav-slot-enchant" useAtlasSize="true">
<Size x="29" y="29"/>
<TexCoords left="0.4140625" right="0.470703125" top="0.248046875" bottom="0.3046875"/>
<Size x="25" y="25" />
<NormalTexture parentKey="NormalTexture"
file="Interface\AddOns\SM_CollectionSystem\Interface\Transmogrify\Transmogrify"
atlas="transmog-nav-slot-enchant" useAtlasSize="true">
<Size x="29" y="29" />
<TexCoords left="0.4140625" right="0.470703125" top="0.248046875" bottom="0.3046875" />
<Anchors>
<Anchor point="CENTER"/>
<Anchor point="CENTER" />
</Anchors>
</NormalTexture>
<HighlightTexture parentKey="Highlight" file="Interface\AddOns\SM_CollectionSystem\Interface\ContainerFrame\Bags" atlas="bags-roundhighlight" alphaMode="ADD" hidden="true">
<Size x="21" y="21"/>
<TexCoords left="0.1640625" right="0.3046875" top="0.6875" bottom="0.828125"/>
<HighlightTexture parentKey="Highlight"
file="Interface\AddOns\SM_CollectionSystem\Interface\ContainerFrame\Bags"
atlas="bags-roundhighlight" alphaMode="ADD" hidden="true">
<Size x="21" y="21" />
<TexCoords left="0.1640625" right="0.3046875" top="0.6875" bottom="0.828125" />
<Anchors>
<Anchor point="CENTER" x="0" y="2"/>
<Anchor point="CENTER" x="0" y="2" />
</Anchors>
</HighlightTexture>
<Layers>
<Layer level="OVERLAY">
<Texture parentKey="SelectedTexture" file="Interface\AddOns\SM_CollectionSystem\Interface\Transmogrify\Transmogrify" atlas="transmog-nav-slot-selected-small" useAtlasSize="true" hidden="true">
<Size x="37" y="37"/>
<TexCoords left="0.734375" right="0.802734375" top="0.171875" bottom="0.244140625"/>
<Texture parentKey="SelectedTexture"
file="Interface\AddOns\SM_CollectionSystem\Interface\Transmogrify\Transmogrify"
atlas="transmog-nav-slot-selected-small" useAtlasSize="true" hidden="true">
<Size x="37" y="37" />
<TexCoords left="0.734375" right="0.802734375" top="0.171875"
bottom="0.244140625" />
<Anchors>
<Anchor point="CENTER"/>
<Anchor point="CENTER" />
</Anchors>
</Texture>
</Layer>
</Layers>
</Button>
<DressUpModel name="SM_CollectionSystemWardrobeItemsModelTemplate" mixin="WardrobeItemsModelMixin" virtual="true">
<Size x="78" y="104"/>
<DressUpModel name="SM_CollectionSystemWardrobeItemsModelTemplate"
mixin="WardrobeItemsModelMixin" virtual="true">
<Size x="78" y="104" />
<Layers>
<Layer level="BACKGROUND">
<Texture parentKey="SolidBackground" setAllPoints="true">
<Color r="0" g="0" b="0"/>
<Color r="0" g="0" b="0" />
</Texture>
<Texture parentKey="StoreUnderlay" file="Interface\AddOns\SM_CollectionSystem\Textures\SubscriptionOverlay" hidden="true">
<Texture parentKey="StoreUnderlay"
file="Interface\AddOns\SM_CollectionSystem\Textures\SubscriptionOverlay"
hidden="true">
<Size x="82" y="108" />
<Anchors>
<Anchor point="CENTER" />
</Anchors>
<TexCoords left="0.32421875" right="0.64453125" top="0" bottom="0.84375" />
</Texture>
<Texture parentKey="SubscriptionUnderlay" file="Interface\AddOns\SM_CollectionSystem\Textures\SubscriptionOverlay" hidden="true">
<Texture parentKey="SubscriptionUnderlay"
file="Interface\AddOns\SM_CollectionSystem\Textures\SubscriptionOverlay"
hidden="true">
<Size x="82" y="108" />
<Anchors>
<Anchor point="CENTER" />
@ -56,60 +69,78 @@
</Texture>
</Layer>
<Layer level="OVERLAY" textureSubLevel="-1">
<Texture parentKey="Border" file="Interface\AddOns\SM_CollectionSystem\Interface\Transmogrify\Transmogrify" atlas="transmog-wardrobe-border-collected" useAtlasSize="true">
<Size x="96" y="122"/>
<TexCoords left="0.001953125" right="0.189453125" top="0.255859375" bottom="0.494140625"/>
<Texture parentKey="Border"
file="Interface\AddOns\SM_CollectionSystem\Interface\Transmogrify\Transmogrify"
atlas="transmog-wardrobe-border-collected" useAtlasSize="true">
<Size x="96" y="122" />
<TexCoords left="0.001953125" right="0.189453125" top="0.255859375"
bottom="0.494140625" />
<Anchors>
<Anchor point="CENTER" x="0" y="-3"/>
<Anchor point="CENTER" x="0" y="-3" />
</Anchors>
</Texture>
</Layer>
<Layer level="OVERLAY">
<Texture parentKey="TransmogStateTexture" file="Interface\AddOns\SM_CollectionSystem\Interface\Transmogrify\Transmogrify" atlas="transmog-wardrobe-border-selected" useAtlasSize="true" alphaMode="ADD" hidden="true">
<Size x="102" y="128"/>
<TexCoords left="0.001953125" right="0.201171875" top="0.001953125" bottom="0.251953125"/>
<Texture parentKey="TransmogStateTexture"
file="Interface\AddOns\SM_CollectionSystem\Interface\Transmogrify\Transmogrify"
atlas="transmog-wardrobe-border-selected" useAtlasSize="true" alphaMode="ADD"
hidden="true">
<Size x="102" y="128" />
<TexCoords left="0.001953125" right="0.201171875" top="0.001953125"
bottom="0.251953125" />
<Anchors>
<Anchor point="CENTER"/>
<Anchor point="CENTER" />
</Anchors>
</Texture>
</Layer>
<Layer level="OVERLAY" textureSubLevel="1">
<FontString name="$parentNewString" parentKey="NewString" inherits="GameFontHighlight" maxLines="1" justifyH="CENTER" text="NEW_CAPS" hidden="true">
<FontString name="$parentNewString" parentKey="NewString"
inherits="GameFontHighlight" maxLines="1" justifyH="CENTER" text="NEW_CAPS"
hidden="true">
<Shadow>
<Color r="0.32" g="0.5" b="1.0"/>
<Color r="0.32" g="0.5" b="1.0" />
</Shadow>
<Anchors>
<Anchor point="TOP" x="0" y="8"/>
<Anchor point="TOP" x="0" y="8" />
</Anchors>
</FontString>
<Texture parentKey="NewGlow" file="Interface\AddOns\SM_CollectionSystem\Interface\Collections\Collections" atlas="collections-newglow" hidden="true">
<Size x="59" y="37"/>
<TexCoords left="0.51171875" right="0.626953125" top="0.013671875" bottom="0.0859375"/>
<Texture parentKey="NewGlow"
file="Interface\AddOns\SM_CollectionSystem\Interface\Collections\Collections"
atlas="collections-newglow" hidden="true">
<Size x="59" y="37" />
<TexCoords left="0.51171875" right="0.626953125" top="0.013671875"
bottom="0.0859375" />
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentNewString" x="-20" y="10"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentNewString" x="20" y="-10"/>
<Anchor point="TOPLEFT" relativeTo="$parentNewString" x="-20" y="10" />
<Anchor point="BOTTOMRIGHT" relativeTo="$parentNewString" x="20" y="-10" />
</Anchors>
</Texture>
</Layer>
<Layer level="HIGHLIGHT">
<Texture file="Interface\AddOns\SM_CollectionSystem\Interface\Transmogrify\Transmogrify" atlas="transmog-wardrobe-border-highlighted" alphaMode="ADD" useAtlasSize="true">
<Size x="84" y="110"/>
<TexCoords left="0.205078125" right="0.369140625" top="0.439453125" bottom="0.654296875"/>
<Texture
file="Interface\AddOns\SM_CollectionSystem\Interface\Transmogrify\Transmogrify"
atlas="transmog-wardrobe-border-highlighted" alphaMode="ADD" useAtlasSize="true">
<Size x="84" y="110" />
<TexCoords left="0.205078125" right="0.369140625" top="0.439453125"
bottom="0.654296875" />
<Anchors>
<Anchor point="CENTER" x="0" y="0"/>
<Anchor point="CENTER" x="0" y="0" />
</Anchors>
</Texture>
</Texture>
</Layer>
</Layers>
<Frames>
<Frame parentKey="Favorite" setAllPoints="true">
<Layers>
<Layer level="ARTWORK">
<Texture parentKey="Icon" file="Interface\AddOns\SM_CollectionSystem\Interface\Collections\Collections" atlas="collections-icon-favorites" useAtlasSize="true" hidden="true">
<Size x="31" y="33"/>
<TexCoords left="0.181640625" right="0.2421875" top="0.013671875" bottom="0.078125"/>
<Texture parentKey="Icon"
file="Interface\AddOns\SM_CollectionSystem\Interface\Collections\Collections"
atlas="collections-icon-favorites" useAtlasSize="true" hidden="true">
<Size x="31" y="33" />
<TexCoords left="0.181640625" right="0.2421875" top="0.013671875"
bottom="0.078125" />
<Anchors>
<Anchor point="TOPLEFT" x="-12" y="13" relativePoint="TOPLEFT"/>
<Anchor point="TOPLEFT" x="-12" y="13" relativePoint="TOPLEFT" />
</Anchors>
</Texture>
</Layer>
@ -118,24 +149,28 @@
<Frame parentKey="HideVisual" setAllPoints="true">
<Layers>
<Layer level="ARTWORK">
<Texture parentKey="Icon" file="Interface\AddOns\SM_CollectionSystem\Interface\Transmogrify\Transmogrify" atlas="transmog-icon-hidden" useAtlasSize="true" hidden="true">
<Size x="35" y="30"/>
<TexCoords left="0.806640625" right="0.875" top="0.171875" bottom="0.23046875"/>
<Texture parentKey="Icon"
file="Interface\AddOns\SM_CollectionSystem\Interface\Transmogrify\Transmogrify"
atlas="transmog-icon-hidden" useAtlasSize="true" hidden="true">
<Size x="35" y="30" />
<TexCoords left="0.806640625" right="0.875" top="0.171875"
bottom="0.23046875" />
<Anchors>
<Anchor point="TOPLEFT" x="-12" y="13" relativePoint="TOPLEFT"/>
<Anchor point="TOPLEFT" x="-12" y="13" relativePoint="TOPLEFT" />
</Anchors>
</Texture>
</Layer>
</Layers>
</Frame>
<Button parentKey="ClaimQuest" hidden="true">
<Size x="21" y="21"/>
<Size x="21" y="21" />
<Anchors>
<Anchor point="BOTTOM" y="-12" />
</Anchors>
<Layers>
<Layer level="OVERLAY">
<Texture file="Interface\AddOns\SM_CollectionSystem\Textures\ClaimQuest" alphaMode="ADD">
<Texture file="Interface\AddOns\SM_CollectionSystem\Textures\ClaimQuest"
alphaMode="ADD">
<Size x="106" y="46" />
<Anchors>
<Anchor point="BOTTOM" y="-6" />
@ -158,7 +193,8 @@
</Anchors>
<TexCoords left="0.234375" right="0.46875" top="0" bottom="0.46875" />
</PushedTexture>
<HighlightTexture file="Interface\AddOns\SM_CollectionSystem\Textures\ClaimQuest" alphaMode="ADD" alpha="0.75">
<HighlightTexture file="Interface\AddOns\SM_CollectionSystem\Textures\ClaimQuest"
alphaMode="ADD" alpha="0.75">
<Size x="30" y="30" />
<Anchors>
<Anchor point="CENTER" />
@ -172,21 +208,25 @@
</OnClick>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(ezCollections.L["ClaimQuest.Tooltip.Header"], NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1);
GameTooltip:AddLine(ezCollections.L["ClaimQuest.Tooltip.Text"], HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1, 1);
GameTooltip:SetText(ezCollections.L["ClaimQuest.Tooltip.Header"],
NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1);
GameTooltip:AddLine(ezCollections.L["ClaimQuest.Tooltip.Text"],
HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1,
1);
GameTooltip:Show();
</OnEnter>
<OnLeave function="GameTooltip_Hide" />
</Scripts>
</Button>
<Button parentKey="StoreButton" hidden="true">
<Size x="21" y="21"/>
<Size x="21" y="21" />
<Anchors>
<Anchor point="BOTTOM" y="-12" />
</Anchors>
<Layers>
<Layer level="OVERLAY">
<Texture file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay" alphaMode="ADD">
<Texture file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay"
alphaMode="ADD">
<Size x="106" y="46" />
<Anchors>
<Anchor point="BOTTOM" y="-6" />
@ -209,7 +249,8 @@
</Anchors>
<TexCoords left="0.234375" right="0.46875" top="0" bottom="0.234375" />
</PushedTexture>
<HighlightTexture file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay" alphaMode="ADD" alpha="0.75">
<HighlightTexture file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay"
alphaMode="ADD" alpha="0.75">
<Size x="30" y="30" />
<Anchors>
<Anchor point="CENTER" />
@ -219,25 +260,30 @@
<Scripts>
<OnClick>
PlaySound("igMainMenuOptionCheckBoxOn");
StaticPopup_Show("EZCOLLECTIONS_STORE_URL", nil, nil, format(ezCollections.StoreURLSkinFormat, self:GetParent().visualInfo.visualID));
StaticPopup_Show("EZCOLLECTIONS_STORE_URL", nil, nil,
format(ezCollections.StoreURLSkinFormat,
self:GetParent().visualInfo.visualID));
</OnClick>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(ezCollections.L["Tooltip.Store.Header"], 0, 0.75, 1, 1);
GameTooltip:AddLine(ezCollections.L["Tooltip.Store.Text"], HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1, 1);
GameTooltip:AddLine(ezCollections.L["Tooltip.Store.Text"],
HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1,
1);
GameTooltip:Show();
</OnEnter>
<OnLeave function="GameTooltip_Hide" />
</Scripts>
</Button>
<Button parentKey="SubscriptionButton" hidden="true">
<Size x="21" y="21"/>
<Size x="21" y="21" />
<Anchors>
<Anchor point="BOTTOM" y="-12" />
</Anchors>
<Layers>
<Layer level="OVERLAY">
<Texture file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay" alphaMode="ADD">
<Texture file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay"
alphaMode="ADD">
<Size x="106" y="46" />
<Anchors>
<Anchor point="BOTTOM" y="-6" />
@ -260,7 +306,8 @@
</Anchors>
<TexCoords left="0.234375" right="0.46875" top="0.5" bottom="0.734375" />
</PushedTexture>
<HighlightTexture file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay" alphaMode="ADD" alpha="0.75">
<HighlightTexture file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay"
alphaMode="ADD" alpha="0.75">
<Size x="30" y="30" />
<Anchors>
<Anchor point="CENTER" />
@ -270,18 +317,27 @@
<Scripts>
<OnClick>
PlaySound("igMainMenuOptionCheckBoxOn");
local subscription = ezCollections:GetSubscriptionForSkin(self:GetParent().visualInfo.visualID);
StaticPopup_Show("EZCOLLECTIONS_STORE_URL", nil, nil, subscription and subscription.URL or "");
local subscription =
ezCollections:GetSubscriptionForSkin(self:GetParent().visualInfo.visualID);
StaticPopup_Show("EZCOLLECTIONS_STORE_URL", nil, nil, subscription and
subscription.URL or "");
</OnClick>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
local subscription = ezCollections:GetSubscriptionForSkin(self:GetParent().visualInfo.visualID);
local subscription =
ezCollections:GetSubscriptionForSkin(self:GetParent().visualInfo.visualID);
if subscription then
GameTooltip:SetText(ezCollections.L["Tooltip.Subscription.Header"], 0, 0.75, 1, 1);
GameTooltip:AddLine(subscription.Name, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1, 1);
GameTooltip:AddLine(subscription.Description, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1, 1);
GameTooltip:AddLine(" ", HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1, 1);
GameTooltip:AddLine(ezCollections.L["Tooltip.Subscription.Text"], HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1, 1);
GameTooltip:SetText(ezCollections.L["Tooltip.Subscription.Header"], 0, 0.75,
1, 1);
GameTooltip:AddLine(subscription.Name, NORMAL_FONT_COLOR.r,
NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1, 1);
GameTooltip:AddLine(subscription.Description, HIGHLIGHT_FONT_COLOR.r,
HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1, 1);
GameTooltip:AddLine(" ", HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g,
HIGHLIGHT_FONT_COLOR.b, 1, 1);
GameTooltip:AddLine(ezCollections.L["Tooltip.Subscription.Text"],
HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1,
1);
end
GameTooltip:Show();
</OnEnter>
@ -289,7 +345,7 @@
</Scripts>
</Button>
<Button parentKey="StoreSubscriptionButton" hidden="true">
<Size x="21" y="21"/>
<Size x="21" y="21" />
<Anchors>
<Anchor point="BOTTOM" y="-12" x="-16" />
</Anchors>
@ -307,7 +363,8 @@
</Anchors>
<TexCoords left="0.234375" right="0.46875" top="0" bottom="0.234375" />
</PushedTexture>
<HighlightTexture file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay" alphaMode="ADD" alpha="0.75">
<HighlightTexture file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay"
alphaMode="ADD" alpha="0.75">
<Size x="30" y="30" />
<Anchors>
<Anchor point="CENTER" />
@ -317,48 +374,59 @@
<Scripts>
<OnClick>
PlaySound("igMainMenuOptionCheckBoxOn");
StaticPopup_Show("EZCOLLECTIONS_STORE_URL", nil, nil, format(ezCollections.StoreURLSkinFormat, self:GetParent().visualInfo.visualID));
StaticPopup_Show("EZCOLLECTIONS_STORE_URL", nil, nil,
format(ezCollections.StoreURLSkinFormat,
self:GetParent().visualInfo.visualID));
</OnClick>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(ezCollections.L["Tooltip.Store.Header"], 0, 0.75, 1, 1);
GameTooltip:AddLine(ezCollections.L["Tooltip.Store.Text"], HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1, 1);
GameTooltip:AddLine(ezCollections.L["Tooltip.Store.Text"],
HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1,
1);
GameTooltip:Show();
</OnEnter>
<OnLeave function="GameTooltip_Hide" />
</Scripts>
<Frames>
<Button>
<Size x="21" y="21"/>
<Size x="21" y="21" />
<Anchors>
<Anchor point="CENTER" x="32" />
</Anchors>
<Layers>
<Layer level="OVERLAY">
<Texture file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay" alphaMode="ADD">
<Texture
file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay"
alphaMode="ADD">
<Size x="106" y="46" />
<Anchors>
<Anchor point="BOTTOM" y="-6" x="-16" />
</Anchors>
<TexCoords left="0" right="0.4140625" top="0.734375" bottom="0.9140625" />
<TexCoords left="0" right="0.4140625" top="0.734375"
bottom="0.9140625" />
</Texture>
</Layer>
</Layers>
<NormalTexture file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay">
<NormalTexture
file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay">
<Size x="30" y="30" />
<Anchors>
<Anchor point="CENTER" />
</Anchors>
<TexCoords left="0" right="0.234375" top="0.5" bottom="0.734375" />
</NormalTexture>
<PushedTexture file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay">
<PushedTexture
file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay">
<Size x="30" y="30" />
<Anchors>
<Anchor point="CENTER" />
</Anchors>
<TexCoords left="0.234375" right="0.46875" top="0.5" bottom="0.734375" />
</PushedTexture>
<HighlightTexture file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay" alphaMode="ADD" alpha="0.75">
<HighlightTexture
file="Interface\AddOns\SM_CollectionSystem\Textures\StoreOverlay"
alphaMode="ADD" alpha="0.75">
<Size x="30" y="30" />
<Anchors>
<Anchor point="CENTER" />
@ -368,18 +436,28 @@
<Scripts>
<OnClick>
PlaySound("igMainMenuOptionCheckBoxOn");
local subscription = ezCollections:GetSubscriptionForSkin(self:GetParent():GetParent().visualInfo.visualID);
StaticPopup_Show("EZCOLLECTIONS_STORE_URL", nil, nil, subscription and subscription.URL or "");
local subscription =
ezCollections:GetSubscriptionForSkin(self:GetParent():GetParent().visualInfo.visualID);
StaticPopup_Show("EZCOLLECTIONS_STORE_URL", nil, nil, subscription
and subscription.URL or "");
</OnClick>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
local subscription = ezCollections:GetSubscriptionForSkin(self:GetParent():GetParent().visualInfo.visualID);
local subscription =
ezCollections:GetSubscriptionForSkin(self:GetParent():GetParent().visualInfo.visualID);
if subscription then
GameTooltip:SetText(ezCollections.L["Tooltip.Subscription.Header"], 0, 0.75, 1, 1);
GameTooltip:AddLine(subscription.Name, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1, 1);
GameTooltip:AddLine(subscription.Description, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1, 1);
GameTooltip:AddLine(" ", HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1, 1);
GameTooltip:AddLine(ezCollections.L["Tooltip.Subscription.Text"], HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1, 1);
GameTooltip:SetText(ezCollections.L["Tooltip.Subscription.Header"],
0, 0.75, 1, 1);
GameTooltip:AddLine(subscription.Name, NORMAL_FONT_COLOR.r,
NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1, 1);
GameTooltip:AddLine(subscription.Description,
HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g,
HIGHLIGHT_FONT_COLOR.b, 1, 1);
GameTooltip:AddLine(" ", HIGHLIGHT_FONT_COLOR.r,
HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1, 1);
GameTooltip:AddLine(ezCollections.L["Tooltip.Subscription.Text"],
HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g,
HIGHLIGHT_FONT_COLOR.b, 1, 1);
end
GameTooltip:Show();
</OnEnter>
@ -393,15 +471,23 @@
<Anchors>
<Anchor point="TOPRIGHT" x="10" y="10" />
</Anchors>
<NormalTexture file="Interface\AddOns\SM_CollectionSystem\Textures\SubscriptionOverlay" setAllPoints="true">
<TexCoords left="0.00390625" right="0.06640625" top="0.8515625" bottom="0.9765625" />
<NormalTexture
file="Interface\AddOns\SM_CollectionSystem\Textures\SubscriptionOverlay"
setAllPoints="true">
<TexCoords left="0.00390625" right="0.06640625" top="0.8515625"
bottom="0.9765625" />
</NormalTexture>
<HighlightTexture file="Interface\AddOns\SM_CollectionSystem\Textures\SubscriptionOverlay" setAllPoints="true" alphaMode="ADD" alpha="0.4">
<TexCoords left="0.07421875" right="0.13671875" top="0.8515625" bottom="0.9765625" />
<HighlightTexture
file="Interface\AddOns\SM_CollectionSystem\Textures\SubscriptionOverlay"
setAllPoints="true" alphaMode="ADD" alpha="0.4">
<TexCoords left="0.07421875" right="0.13671875" top="0.8515625"
bottom="0.9765625" />
</HighlightTexture>
<Layers>
<Layer level="BACKGROUND">
<Texture file="Interface\AddOns\SM_CollectionSystem\Textures\SubscriptionOverlay" alphaMode="ADD">
<Texture
file="Interface\AddOns\SM_CollectionSystem\Textures\SubscriptionOverlay"
alphaMode="ADD">
<Size x="90" y="90" />
<Anchors>
<Anchor point="TOPRIGHT" x="10" y="10" />
@ -413,18 +499,24 @@
<Scripts>
<OnLoad>
function self:UpdateTooltip()
local subscription = ezCollections:GetActiveSubscriptionForSkin(self:GetParent().visualInfo.visualID);
if subscription then
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(ezCollections.L["Tooltip.Subscription.Header"], 0, 0.75, 1, 1);
GameTooltip:AddLine(subscription.Name, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1, 1);
GameTooltip:AddLine(subscription.Description, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1, 1);
local remaining = ezCollections:FormatRemainingTime(subscription.EndTime - time());
if remaining then
GameTooltip:AddLine(remaining, GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b, 1, 1);
end
GameTooltip:Show();
end
local subscription =
ezCollections:GetActiveSubscriptionForSkin(self:GetParent().visualInfo.visualID);
if subscription then
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(ezCollections.L["Tooltip.Subscription.Header"], 0, 0.75,
1, 1);
GameTooltip:AddLine(subscription.Name, NORMAL_FONT_COLOR.r,
NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1, 1);
GameTooltip:AddLine(subscription.Description, HIGHLIGHT_FONT_COLOR.r,
HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, 1, 1);
local remaining = ezCollections:FormatRemainingTime(subscription.EndTime -
time());
if remaining then
GameTooltip:AddLine(remaining, GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g,
GRAY_FONT_COLOR.b, 1, 1);
end
GameTooltip:Show();
end
end
</OnLoad>
<OnEnter>
@ -439,7 +531,7 @@
</Anchors>
</Frame>
</Frames>
</DressUpModel>
</Ui>
</Ui>