Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Simpy
BlizzardInterfaceCode
Commits
91a27271
Commit
91a27271
authored
Aug 08, 2019
by
TOM_RUS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WOW-31401patch8.2.5_PTR
parent
d101b780
Changes
40
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
1164 additions
and
475 deletions
+1164
-475
Interface/AddOns/Blizzard_APIDocumentation/ClubFinderDocumentation.lua
...Ons/Blizzard_APIDocumentation/ClubFinderDocumentation.lua
+25
-0
Interface/AddOns/Blizzard_APIDocumentation/QuestSessionDocumentation.lua
...s/Blizzard_APIDocumentation/QuestSessionDocumentation.lua
+10
-1
Interface/AddOns/Blizzard_APIDocumentation/RecruitAFriendDocumentation.lua
...Blizzard_APIDocumentation/RecruitAFriendDocumentation.lua
+3
-2
Interface/AddOns/Blizzard_APIDocumentation/SystemDocumentation.lua
.../AddOns/Blizzard_APIDocumentation/SystemDocumentation.lua
+18
-0
Interface/AddOns/Blizzard_Collections/Blizzard_MountCollection.lua
.../AddOns/Blizzard_Collections/Blizzard_MountCollection.lua
+1
-15
Interface/AddOns/Blizzard_Communities/ClubFinder.lua
Interface/AddOns/Blizzard_Communities/ClubFinder.lua
+19
-4
Interface/AddOns/Blizzard_Communities/CommunitiesSettings.lua
...rface/AddOns/Blizzard_Communities/CommunitiesSettings.lua
+6
-1
Interface/AddOns/Blizzard_StoreUI/Blizzard_LargeProductCardTemplates.lua
...s/Blizzard_StoreUI/Blizzard_LargeProductCardTemplates.lua
+142
-30
Interface/AddOns/Blizzard_StoreUI/Blizzard_ProductCardMagnifierTemplates.lua
...izzard_StoreUI/Blizzard_ProductCardMagnifierTemplates.lua
+1
-6
Interface/AddOns/Blizzard_StoreUI/Blizzard_ProductCardTemplates.lua
...AddOns/Blizzard_StoreUI/Blizzard_ProductCardTemplates.lua
+17
-13
Interface/AddOns/Blizzard_StoreUI/Blizzard_ProductCardTemplates.xml
...AddOns/Blizzard_StoreUI/Blizzard_ProductCardTemplates.xml
+18
-16
Interface/AddOns/Blizzard_StoreUI/Blizzard_SmallProductCardTemplates.lua
...s/Blizzard_StoreUI/Blizzard_SmallProductCardTemplates.lua
+84
-0
Interface/AddOns/Blizzard_StoreUI/Blizzard_StoreUIInsecure.lua
...face/AddOns/Blizzard_StoreUI/Blizzard_StoreUIInsecure.lua
+0
-6
Interface/AddOns/Blizzard_StoreUI/Blizzard_StoreUIOutbound.lua
...face/AddOns/Blizzard_StoreUI/Blizzard_StoreUIOutbound.lua
+0
-4
Interface/AddOns/Blizzard_StoreUI/Blizzard_StoreUISecure.lua
Interface/AddOns/Blizzard_StoreUI/Blizzard_StoreUISecure.lua
+298
-111
Interface/FrameXML/AlertFrameSystems.lua
Interface/FrameXML/AlertFrameSystems.lua
+1
-1
Interface/FrameXML/ContainerFrame.lua
Interface/FrameXML/ContainerFrame.lua
+5
-6
Interface/FrameXML/DressUpFrames.lua
Interface/FrameXML/DressUpFrames.lua
+1
-15
Interface/FrameXML/EasyMenu.lua
Interface/FrameXML/EasyMenu.lua
+2
-3
Interface/FrameXML/FriendsFrame.lua
Interface/FrameXML/FriendsFrame.lua
+24
-3
Interface/FrameXML/FriendsFrame.xml
Interface/FrameXML/FriendsFrame.xml
+7
-0
Interface/FrameXML/QuestInfo.lua
Interface/FrameXML/QuestInfo.lua
+4
-0
Interface/FrameXML/QuestMapFrame.lua
Interface/FrameXML/QuestMapFrame.lua
+77
-36
Interface/FrameXML/QuestMapFrame.xml
Interface/FrameXML/QuestMapFrame.xml
+64
-0
Interface/FrameXML/QuestSession.lua
Interface/FrameXML/QuestSession.lua
+75
-35
Interface/FrameXML/QuestSession.xml
Interface/FrameXML/QuestSession.xml
+39
-38
Interface/FrameXML/RecruitAFriendFrame.lua
Interface/FrameXML/RecruitAFriendFrame.lua
+72
-8
Interface/FrameXML/RecruitAFriendFrame.xml
Interface/FrameXML/RecruitAFriendFrame.xml
+21
-8
Interface/FrameXML/SecureCapsule.lua
Interface/FrameXML/SecureCapsule.lua
+1
-0
Interface/FrameXML/UIDropDownMenu.lua
Interface/FrameXML/UIDropDownMenu.lua
+42
-40
Interface/FrameXML/UIDropDownMenuTemplates.lua
Interface/FrameXML/UIDropDownMenuTemplates.lua
+0
-8
Interface/FrameXML/UIDropDownMenuTemplates.xml
Interface/FrameXML/UIDropDownMenuTemplates.xml
+2
-34
Interface/FrameXML/UnitPopup.lua
Interface/FrameXML/UnitPopup.lua
+5
-3
Interface/GlueXML/DesignerMenu.xml
Interface/GlueXML/DesignerMenu.xml
+0
-3
Interface/GlueXML/GlueXML.toc
Interface/GlueXML/GlueXML.toc
+0
-1
Interface/SharedXML/ModelPreviewFrame.lua
Interface/SharedXML/ModelPreviewFrame.lua
+6
-1
Interface/SharedXML/ModelSceneMixin.lua
Interface/SharedXML/ModelSceneMixin.lua
+43
-21
Interface/SharedXML/Pools.lua
Interface/SharedXML/Pools.lua
+8
-0
Interface/SharedXML/SharedBasicControls.xml
Interface/SharedXML/SharedBasicControls.xml
+18
-0
Interface/SharedXML/Util.lua
Interface/SharedXML/Util.lua
+5
-2
No files found.
Interface/AddOns/Blizzard_APIDocumentation/ClubFinderDocumentation.lua
View file @
91a27271
...
...
@@ -263,10 +263,22 @@ local ClubFinder =
{
Name
=
"RequestNextCommunityPage"
,
Type
=
"Function"
,
Arguments
=
{
{
Name
=
"startingIndex"
,
Type
=
"number"
,
Nilable
=
false
},
{
Name
=
"pageSize"
,
Type
=
"number"
,
Nilable
=
false
},
},
},
{
Name
=
"RequestNextGuildPage"
,
Type
=
"Function"
,
Arguments
=
{
{
Name
=
"startingIndex"
,
Type
=
"number"
,
Nilable
=
false
},
{
Name
=
"pageSize"
,
Type
=
"number"
,
Nilable
=
false
},
},
},
{
Name
=
"RequestSubscribedClubPostingIDs"
,
...
...
@@ -376,6 +388,15 @@ local ClubFinder =
Events
=
{
{
Name
=
"ClubFinderApplicationsUpdated"
,
Type
=
"Event"
,
LiteralName
=
"CLUB_FINDER_APPLICATIONS_UPDATED"
,
Payload
=
{
{
Name
=
"clubFinderGUIDs"
,
Type
=
"table"
,
InnerType
=
"string"
,
Nilable
=
false
},
},
},
{
Name
=
"ClubFinderClubListReturned"
,
Type
=
"Event"
,
...
...
@@ -414,6 +435,10 @@ local ClubFinder =
Name
=
"ClubFinderPostUpdated"
,
Type
=
"Event"
,
LiteralName
=
"CLUB_FINDER_POST_UPDATED"
,
Payload
=
{
{
Name
=
"clubFinderGUIDs"
,
Type
=
"table"
,
InnerType
=
"string"
,
Nilable
=
false
},
},
},
{
Name
=
"ClubFinderRecruitListChanged"
,
...
...
Interface/AddOns/Blizzard_APIDocumentation/QuestSessionDocumentation.lua
View file @
91a27271
...
...
@@ -30,7 +30,7 @@ local QuestSession =
Returns
=
{
{
Name
=
"details"
,
Type
=
"QuestSession
Player
Details"
,
Nilable
=
true
},
{
Name
=
"details"
,
Type
=
"QuestSession
JoinRequest
Details"
,
Nilable
=
true
},
},
},
{
...
...
@@ -169,6 +169,15 @@ local QuestSession =
{
Name
=
"guid"
,
Type
=
"string"
,
Nilable
=
false
},
},
},
{
Name
=
"QuestSessionJoinRequestDetails"
,
Type
=
"Structure"
,
Fields
=
{
{
Name
=
"requesterDetails"
,
Type
=
"QuestSessionPlayerDetails"
,
Nilable
=
false
},
{
Name
=
"joinedMembers"
,
Type
=
"table"
,
InnerType
=
"string"
,
Nilable
=
false
},
},
},
},
};
...
...
Interface/AddOns/Blizzard_APIDocumentation/RecruitAFriendDocumentation.lua
View file @
91a27271
...
...
@@ -98,9 +98,9 @@ local RecruitAFriend =
Events
=
{
{
Name
=
"PartyRe
fer
AFriendUpdated"
,
Name
=
"PartyRe
cruit
AFriendUpdated"
,
Type
=
"Event"
,
LiteralName
=
"PARTY_RE
FER
_A_FRIEND_UPDATED"
,
LiteralName
=
"PARTY_RE
CRUIT
_A_FRIEND_UPDATED"
,
Payload
=
{
{
Name
=
"unitTarget"
,
Type
=
"string"
,
Nilable
=
false
},
...
...
@@ -261,6 +261,7 @@ local RecruitAFriend =
Type
=
"Structure"
,
Fields
=
{
{
Name
=
"recruitmentCode"
,
Type
=
"string"
,
Nilable
=
false
},
{
Name
=
"recruitmentURL"
,
Type
=
"string"
,
Nilable
=
false
},
{
Name
=
"remainingTimeSeconds"
,
Type
=
"number"
,
Nilable
=
false
},
{
Name
=
"totalUses"
,
Type
=
"number"
,
Nilable
=
false
},
...
...
Interface/AddOns/Blizzard_APIDocumentation/SystemDocumentation.lua
View file @
91a27271
...
...
@@ -39,6 +39,24 @@ local System =
{
Name
=
"errorMessage"
,
Type
=
"string"
,
Nilable
=
false
},
},
},
{
Name
=
"GlobalMouseDown"
,
Type
=
"Event"
,
LiteralName
=
"GLOBAL_MOUSE_DOWN"
,
Payload
=
{
{
Name
=
"button"
,
Type
=
"string"
,
Nilable
=
false
},
},
},
{
Name
=
"GlobalMouseUp"
,
Type
=
"Event"
,
LiteralName
=
"GLOBAL_MOUSE_UP"
,
Payload
=
{
{
Name
=
"button"
,
Type
=
"string"
,
Nilable
=
false
},
},
},
{
Name
=
"InitialHotfixesApplied"
,
Type
=
"Event"
,
...
...
Interface/AddOns/Blizzard_Collections/Blizzard_MountCollection.lua
View file @
91a27271
...
...
@@ -579,21 +579,7 @@ function MountJournal_UpdateMountDisplay(forceSceneChange)
mountActor
:
SetAnimationBlendOperation
(
LE_MODEL_BLEND_OPERATION_ANIM
);
mountActor
:
SetAnimation
(
0
);
end
local
playerActor
=
MountJournal
.
MountDisplay
.
ModelScene
:
GetPlayerActor
();
if
(
playerActor
)
then
if
disablePlayerMountPreview
or
isSelfMount
then
playerActor
:
ClearModel
();
else
local
sheathWeapons
=
true
;
if
(
playerActor
:
SetModelByUnit
(
"player"
,
sheathWeapons
))
then
local
calcMountScale
=
mountActor
:
CalculateMountScale
(
playerActor
);
local
inverseScale
=
1
/
calcMountScale
;
playerActor
:
SetRequestedScale
(
inverseScale
);
mountActor
:
AttachToMount
(
playerActor
,
animID
,
spellVisualKitID
);
end
end
end
MountJournal
.
MountDisplay
.
ModelScene
:
AttachPlayerToMount
(
mountActor
,
animID
,
isSelfMount
,
disablePlayerMountPreview
);
end
end
...
...
Interface/AddOns/Blizzard_Communities/ClubFinder.lua
View file @
91a27271
...
...
@@ -81,6 +81,8 @@ function ClubsRecruitmentDialogMixin:UpdateSettingsInfoFromClubInfo()
self
.
LookingForDropdown
:
SetCheckedList
(
clubPostingInfo
.
recruitingSpecIds
);
self
.
LookingForDropdown
:
UpdateDropdownText
();
C_ClubFinder
.
SetAllRecruitmentSettings
(
clubPostingInfo
.
recruitmentFlags
);
local
index
=
C_ClubFinder
.
GetFocusIndexFromFlag
(
clubPostingInfo
.
recruitmentFlags
);
C_ClubFinder
.
SetRecruitmentSettings
(
index
,
true
);
UIDropDownMenu_Initialize
(
self
.
ClubFocusDropdown
,
ClubFocusClubDropdownInitialize
);
...
...
@@ -1064,7 +1066,7 @@ function ClubFinderCommunitiesCardMixin:UpdateCard()
self
.
MemberCount
:
SetText
(
info
.
numActiveMembers
);
self
.
RightClickDropdown
.
isGuildCard
=
false
;
if
(
info
.
emblemInfo
)
then
if
(
info
.
emblemInfo
>
0
)
then
C_Club
.
SetAvatarTexture
(
self
.
CommunityLogo
,
info
.
emblemInfo
,
Enum
.
ClubType
.
Character
);
end
...
...
@@ -1247,7 +1249,7 @@ function ClubFinderCommunitiesCardFrameMixin:RefreshLayout()
local
requestMoreValues
=
numCardsTotal
~=
0
and
numCardsTotal
-
lastDisplayed
<
threshold
;
if
(
not
self
.
isPendingListShowing
and
not
self
.
requestedNextPage
and
requestMoreValues
and
numCardsTotal
<
self
.
totalListSize
)
then
C_ClubFinder
.
RequestNextCommunityPage
();
C_ClubFinder
.
RequestNextCommunityPage
(
lastDisplayed
+
1
,
showingCards
);
self
.
requestedNextPage
=
true
;
end
end
...
...
@@ -1386,7 +1388,9 @@ function ClubFinderGuildCardsMixin:RefreshLayout(cardPage)
local
shouldRequestNextNormalPage
=
shouldShowNextNormal
and
(
cardPage
+
LOAD_PAGES_IN_ADVANCE
)
>
self
.
numPages
;
if
(
shouldRequestNextNormalPage
)
then
C_ClubFinder
.
RequestNextGuildPage
();
local
startingIndex
=
cardPage
*
GUILD_CARDS_PER_PAGE
;
local
pageSize
=
LOAD_PAGES_IN_ADVANCE
*
GUILD_CARDS_PER_PAGE
;
C_ClubFinder
.
RequestNextGuildPage
(
startingIndex
,
pageSize
);
self
.
requestedPage
=
true
;
end
...
...
@@ -1409,6 +1413,8 @@ ClubFinderGuildAndCommunityMixin = { };
function
ClubFinderGuildAndCommunityMixin
:
OnLoad
()
self
.
PendingClubs
:
SetEnabled
(
false
);
self
:
RegisterEvent
(
"CLUB_FINDER_LINKED_CLUB_RETURNED"
);
self
:
RegisterEvent
(
"CLUB_FINDER_POST_UPDATED"
);
self
:
RegisterEvent
(
"CLUB_FINDER_APPLICATIONS_UPDATED"
);
self
.
PendingClubs
:
SetText
(
CLUB_FINDER_PENDING_REQUESTS
:
format
(
0
));
self
.
InsetFrame
.
GuildDescription
:
Show
();
self
.
GuildCards
.
pendingCardListSize
=
0
;
...
...
@@ -1521,6 +1527,15 @@ function ClubFinderGuildAndCommunityMixin:OnEvent(event, ...)
local
clubInfo
=
...
;
local
communitiesFrame
=
self
:
GetParent
();
communitiesFrame
.
ClubFinderInvitationFrame
:
DisplayInvitation
(
clubInfo
,
true
);
elseif
(
event
==
"CLUB_FINDER_APPLICATIONS_UPDATED"
)
or
(
event
==
"CLUB_FINDER_POST_UPDATED"
)
then
local
updateGuild
=
(
requestType
==
Enum
.
ClubFinderRequestType
.
Guild
)
or
(
requestType
==
Enum
.
ClubFinderRequestType
.
All
);
local
updateCommunity
=
(
requestType
==
Enum
.
ClubFinderRequestType
.
Community
)
or
(
requestType
==
Enum
.
ClubFinderRequestType
.
All
);
if
(
updateGuild
)
then
self
.
GuildCards
:
RefreshLayout
();
end
if
(
updateCommunity
)
then
self
.
CommunityCards
:
RefreshLayout
();
end
end
end
...
...
@@ -1601,7 +1616,7 @@ function ClubFinderInvitationsFrameMixin:DisplayInvitation(clubInfo, isLinkInvit
SetLargeTabardTexturesFromColorRGB
(
"player"
,
self
.
GuildBannerEmblemLogo
,
self
.
GuildBannerBackground
,
self
.
GuildBannerBorder
,
clubInfo
.
tabardInfo
);
end
if
(
clubInfo
.
emblemInfo
and
not
isGuild
)
then
if
(
clubInfo
.
emblemInfo
>
0
and
not
isGuild
)
then
C_Club
.
SetAvatarTexture
(
self
.
Icon
,
clubInfo
.
emblemInfo
,
Enum
.
ClubType
.
Character
);
end
...
...
Interface/AddOns/Blizzard_Communities/CommunitiesSettings.lua
View file @
91a27271
...
...
@@ -28,11 +28,13 @@ function CommunitiesSettingsDialogMixin:OnShow()
self
.
DialogLabel
:
SetText
(
COMMUNITIES_SETTINGS_CHARACTER_LABEL
);
end
self
:
HideOrShowCommunityFinderOptions
(
clubType
==
Enum
.
ClubType
.
Character
);
if
(
clubType
==
Enum
.
ClubType
.
Character
)
then
self
:
UpdateSettingsInfoFromClubInfo
();
end
self
:
SetDisabledStateOnCommunityFinderOptions
(
not
self
.
ShouldListClub
.
Button
:
GetChecked
());
self
:
HideOrShowCommunityFinderOptions
(
clubType
==
Enum
.
ClubType
.
Character
);
self
:
RegisterEvent
(
"CLUB_FINDER_POST_UPDATED"
);
CommunitiesFrame
:
RegisterDialogShown
(
self
);
...
...
@@ -191,6 +193,8 @@ function CommunitiesSettingsDialogMixin:UpdateSettingsInfoFromClubInfo()
self
.
LookingForDropdown
:
SetCheckedList
(
clubPostingInfo
.
recruitingSpecIds
);
self
.
LookingForDropdown
:
UpdateDropdownText
();
C_ClubFinder
.
SetAllRecruitmentSettings
(
clubPostingInfo
.
recruitmentFlags
);
local
index
=
C_ClubFinder
.
GetFocusIndexFromFlag
(
clubPostingInfo
.
recruitmentFlags
);
C_ClubFinder
.
SetRecruitmentSettings
(
index
,
true
);
UIDropDownMenu_Initialize
(
self
.
ClubFocusDropdown
,
ClubFocusClubDropdownInitialize
)
...
...
@@ -205,6 +209,7 @@ function CommunitiesSettingsDialogMixin:UpdateSettingsInfoFromClubInfo()
self
.
MinIlvlOnly
.
EditBox
.
Text
:
Show
();
end
local
isMaxLevelChecked
=
CommunitiesSettingsGetRecruitmentSettingByValue
(
Enum
.
ClubFinderSettingFlags
.
MaxLevelOnly
);
self
.
MaxLevelOnly
.
Button
:
SetChecked
(
isMaxLevelChecked
);
...
...
Interface/AddOns/Blizzard_StoreUI/Blizzard_LargeProductCardTemplates.lua
View file @
91a27271
...
...
@@ -51,8 +51,6 @@ VerticalLargeStoreCardMixin = CreateFromMixins(StoreCardMixin);
function
VerticalLargeStoreCardMixin
:
OnLoad
()
StoreCardMixin
.
OnLoad
(
self
);
self
.
SplashBannerText
:
SetShadowColor
(
0
,
0
,
0
,
0
);
SecureMixin
(
self
.
ProductName
,
ShrinkUntilTruncateFontStringMixin
);
self
.
ProductName
:
SetFontObjectsToTry
(
"GameFontNormalLarge2"
,
"GameFontNormalLarge"
,
"GameFontNormalMed3"
);
self
.
ProductName
:
SetSpacing
(
0
);
...
...
@@ -117,17 +115,7 @@ function VerticalLargeStoreCardMixin:SetupBuyButton(info, entryInfo)
end
function
VerticalLargeStoreCardMixin
:
SetupBannerText
(
discounted
,
discountPercentage
,
entryInfo
)
if
entryInfo
.
bannerType
==
BATTLEPAY_SPLASH_BANNER_TEXT_NEW
then
self
.
SplashBannerText
:
SetText
(
BLIZZARD_STORE_SPLASH_BANNER_NEW
);
elseif
entryInfo
.
bannerType
==
BATTLEPAY_SPLASH_BANNER_TEXT_DISCOUNT
then
if
discounted
then
self
.
SplashBannerText
:
SetText
(
string.format
(
BLIZZARD_STORE_SPLASH_BANNER_DISCOUNT_FORMAT
,
discountPercentage
));
else
self
.
SplashBannerText
:
SetText
(
BLIZZARD_STORE_SPLASH_BANNER_FEATURED
);
end
elseif
entryInfo
.
bannerType
==
BATTLEPAY_SPLASH_BANNER_TEXT_FEATURED
then
self
.
SplashBannerText
:
SetText
(
BLIZZARD_STORE_SPLASH_BANNER_FEATURED
);
end
-- empty override
end
function
VerticalLargeStoreCardMixin
:
UpdateState
()
...
...
@@ -213,12 +201,6 @@ function VerticalLargeStoreCardMixin:Layout()
self
.
ProductName
:
SetShadowColor
(
0
,
0
,
0
,
0
);
self
.
ProductName
:
SetShadowOffset
(
1
,
-
1
);
self
.
Description
:
ClearAllPoints
();
self
.
Description
:
SetSize
(
250
,
0
);
self
.
Description
:
SetPoint
(
"LEFT"
,
self
.
ProductName
,
"LEFT"
,
0
,
0
);
self
.
Description
:
SetPoint
(
"RIGHT"
,
self
.
ProductName
,
"RIGHT"
,
0
,
0
);
self
.
Description
:
SetPoint
(
"TOP"
,
self
.
CurrentPrice
,
"BOTTOM"
,
0
,
0
);
self
.
SelectedTexture
:
Hide
();
self
.
UpgradeArrow
:
ClearAllPoints
();
...
...
@@ -243,9 +225,6 @@ function VerticalLargeStoreCardMixin:Layout()
self
.
DiscountText
:
SetSize
(
50
,
30
);
self
.
DiscountText
:
SetPoint
(
"CENTER"
,
self
.
DiscountMiddle
,
"CENTER"
,
1
,
2
);
self
.
SplashBanner
:
Hide
();
self
.
SplashBannerText
:
Hide
();
self
.
Strikethrough
:
ClearAllPoints
();
self
.
Strikethrough
:
SetPoint
(
"TOPLEFT"
,
self
.
NormalPrice
,
"TOPLEFT"
,
0
,
0
);
self
.
Strikethrough
:
SetPoint
(
"BOTTOMRIGHT"
,
self
.
NormalPrice
,
"BOTTOMRIGHT"
,
0
,
0
);
...
...
@@ -270,6 +249,41 @@ function VerticalLargeStoreCardMixin:Layout()
self
.
CurrentMarketPrice
:
SetPoint
(
"TOP"
,
self
.
ProductName
,
"BOTTOM"
,
0
,
-
4
);
self
.
CurrentMarketPrice
:
SetTextColor
(
0
.
733
,
0
.
588
,
0
.
31
);
self
.
GlowSpin
:
Hide
();
self
.
GlowPulse
:
Hide
();
self
.
BannerFadeIn
:
Hide
();
end
--------------------------------------------------
-- VERTICAL LARGE STORE CARD WITH A BUY BUTTON MIXIN
VerticalLargeStoreCardWithBuyButtonMixin
=
CreateFromMixins
(
VerticalLargeStoreCardMixin
);
function
VerticalLargeStoreCardWithBuyButtonMixin
:
OnLoad
()
VerticalLargeStoreCardMixin
.
OnLoad
(
self
);
self
.
SplashBannerText
:
SetShadowColor
(
0
,
0
,
0
,
0
);
end
function
VerticalLargeStoreCardWithBuyButtonMixin
:
SetupBannerText
(
discounted
,
discountPercentage
,
entryInfo
)
if
entryInfo
.
bannerType
==
BATTLEPAY_SPLASH_BANNER_TEXT_NEW
then
self
.
SplashBannerText
:
SetText
(
BLIZZARD_STORE_SPLASH_BANNER_NEW
);
elseif
entryInfo
.
bannerType
==
BATTLEPAY_SPLASH_BANNER_TEXT_DISCOUNT
then
if
discounted
then
self
.
SplashBannerText
:
SetText
(
string.format
(
BLIZZARD_STORE_SPLASH_BANNER_DISCOUNT_FORMAT
,
discountPercentage
));
else
self
.
SplashBannerText
:
SetText
(
BLIZZARD_STORE_SPLASH_BANNER_FEATURED
);
end
elseif
entryInfo
.
bannerType
==
BATTLEPAY_SPLASH_BANNER_TEXT_FEATURED
then
self
.
SplashBannerText
:
SetText
(
BLIZZARD_STORE_SPLASH_BANNER_FEATURED
);
end
end
function
VerticalLargeStoreCardWithBuyButtonMixin
:
Layout
()
VerticalLargeStoreCardMixin
.
Layout
(
self
);
self
.
SplashBanner
:
Hide
();
self
.
SplashBannerText
:
Hide
();
self
.
Description
:
ClearAllPoints
();
self
.
Description
:
SetSize
(
250
,
0
);
self
.
Description
:
SetPoint
(
"LEFT"
,
self
.
ProductName
,
"LEFT"
);
...
...
@@ -279,16 +293,8 @@ function VerticalLargeStoreCardMixin:Layout()
self
.
BuyButton
:
ClearAllPoints
();
self
.
BuyButton
:
SetSize
(
140
,
30
);
self
.
BuyButton
:
SetPoint
(
"BOTTOM"
,
0
,
20
);
self
.
SplashBanner
:
Hide
();
self
.
SplashBannerText
:
Hide
();
self
.
GlowSpin
:
Hide
();
self
.
GlowPulse
:
Hide
();
self
.
BannerFadeIn
:
Hide
();
end
--------------------------------------------------
-- HORIZONTAL LARGE STORE CARD MIXIN
HorizontalLargeStoreCardMixin
=
CreateFromMixins
(
VerticalLargeStoreCardMixin
);
...
...
@@ -304,3 +310,109 @@ end
function
HorizontalLargeStoreCardMixin
:
GetCurrencyFormat
(
currencyInfo
)
return
currencyInfo
.
formatLong
;
end
function
HorizontalLargeStoreCardMixin
:
Layout
()
self
:
SetSize
(
576
,
224
);
self
.
Card
:
ClearAllPoints
();
self
.
Card
:
SetAllPoints
(
self
);
end
--------------------------------------------------
-- HORIZONTAL LARGE STORE CARD WITH A BUY BUTTON MIXIN
HorizontalLargeStoreCardWithBuyButtonMixin
=
CreateFromMixins
(
VerticalLargeStoreCardWithBuyButtonMixin
);
function
HorizontalLargeStoreCardWithBuyButtonMixin
:
Layout
()
HorizontalLargeStoreCardMixin
.
Layout
(
self
);
self
:
SetSize
(
566
,
225
);
self
.
Card
:
SetAtlas
(
"store-card-horizontalfull"
,
true
);
self
.
Card
:
SetTexCoord
(
0
,
1
,
0
,
1
);
self
.
SplashBanner
:
Hide
();
self
.
SplashBannerText
:
Hide
();
self
.
NormalPrice
:
Hide
();
self
.
SalePrice
:
Hide
();
self
.
Strikethrough
:
Hide
();
self
.
CurrentPrice
:
Hide
();
self
.
Description
:
Hide
();
self
.
BuyButton
:
ClearAllPoints
();
self
.
BuyButton
:
SetSize
(
210
,
35
);
self
.
BuyButton
:
SetPoint
(
"BOTTOMRIGHT"
,
-
30
,
10
);
self
.
ProductName
:
ClearAllPoints
();
self
.
ProductName
:
SetSize
(
150
,
70
);
self
.
ProductName
:
SetPoint
(
"BOTTOM"
,
self
.
BuyButton
,
"CENTER"
,
0
,
30
);
self
.
ProductName
:
SetFontObject
(
"GameFontNormalLarge"
);
self
.
ProductName
:
SetJustifyH
(
"CENTER"
);
self
.
ProductName
:
SetJustifyV
(
"BOTTOM"
);
self
.
ProductName
:
SetTextColor
(
1
,
1
,
1
);
self
.
ProductName
:
SetShadowColor
(
0
,
0
,
0
,
0
);
self
.
ProductName
:
SetShadowOffset
(
1
,
-
1
);
self
.
ModelScene
:
ClearAllPoints
();
self
.
ModelScene
:
SetPoint
(
"TOPLEFT"
,
8
,
-
8
);
self
.
ModelScene
:
SetPoint
(
"BOTTOMRIGHT"
,
-
8
,
8
);
self
.
ModelScene
:
SetViewInsets
(
0
,
0
,
0
,
0
);
self
.
Magnifier
:
ClearAllPoints
();
self
.
Magnifier
:
SetSize
(
31
,
35
);
self
.
Magnifier
:
SetPoint
(
"TOPLEFT"
,
self
,
"TOPLEFT"
,
8
,
-
8
);
end
function
HorizontalLargeStoreCardWithBuyButtonMixin
:
UpdatePricing
(
entryInfo
,
discounted
,
currencyFormat
)
if
bit
.
band
(
entryInfo
.
sharedData
.
flags
,
Enum
.
BattlepayDisplayFlag
.
HiddenPrice
)
==
Enum
.
BattlepayDisplayFlag
.
HiddenPrice
then
self
.
NormalPrice
:
Hide
();
self
.
SalePrice
:
Hide
();
self
.
Strikethrough
:
Hide
();
self
.
CurrentPrice
:
Hide
();
elseif
discounted
then
self
:
ShowDiscount
(
StoreFrame_GetProductPriceText
(
entryInfo
,
currencyFormat
));
else
self
.
NormalPrice
:
Hide
();
self
.
SalePrice
:
Hide
();
self
.
Strikethrough
:
Hide
();
self
.
CurrentPrice
:
Hide
();
end
end
function
HorizontalLargeStoreCardWithBuyButtonMixin
:
ShowDiscount
(
discountText
)
self
.
SalePrice
:
SetText
(
discountText
);
self
.
NormalPrice
:
SetTextColor
(
0
.
8
,
0
.
66
,
0
);
self
.
CurrentPrice
:
Hide
();
self
.
NormalPrice
:
Hide
();
self
.
SalePrice
:
Hide
();
self
.
Strikethrough
:
Hide
();
end
function
HorizontalLargeStoreCardWithBuyButtonMixin
:
OnEnter
()
local
disabled
=
not
self
:
IsEnabled
();
local
hasDisabledTooltip
=
disabled
and
self
.
disabledTooltip
;
local
hasProductTooltip
=
not
disabled
and
self
.
productTooltipTitle
;
if
hasDisabledTooltip
or
hasProductTooltip
then
StoreTooltip
:
ClearAllPoints
();
if
self
.
anchorRight
then
StoreTooltip
:
SetPoint
(
"BOTTOMLEFT"
,
self
,
"TOPRIGHT"
,
-
7
,
-
6
);
else
StoreTooltip
:
SetPoint
(
"BOTTOMRIGHT"
,
self
,
"TOPLEFT"
,
7
,
-
6
);
end
if
hasDisabledTooltip
then
StoreTooltip_Show
(
""
,
self
.
disabledTooltip
);
elseif
hasProductTooltip
then
StoreTooltip_Show
(
self
.
productTooltipTitle
,
self
.
productTooltipDescription
);
end
end
if
disabled
then
return
;
end
if
self
.
HighlightTexture
then
self
.
HighlightTexture
:
Hide
();
end
self
:
UpdateMagnifier
();
end
Interface/AddOns/Blizzard_StoreUI/Blizzard_ProductCardMagnifierTemplates.lua
View file @
91a27271
...
...
@@ -33,12 +33,7 @@ function DefaultStoreCardMagnifierMixin:OnClick()
local
card
=
self
:
GetParent
();
local
entryID
=
card
:
GetID
();
local
entryInfo
=
C_StoreSecure
.
GetEntryInfo
(
entryID
);
if
#
entryInfo
.
sharedData
.
cards
>
1
then
StoreFrame_ShowPreviews
(
entryInfo
.
sharedData
.
cards
);
elseif
#
entryInfo
.
sharedData
.
cards
>
0
then
local
card
=
entryInfo
.
sharedData
.
cards
[
1
];
StoreFrame_ShowPreview
(
card
.
name
,
card
.
creatureDisplayInfoID
,
card
.
modelSceneID
);
end
StoreFrame_ShowPreviews
(
entryInfo
.
sharedData
.
cards
);
end
function
DefaultStoreCardMagnifierMixin
:
OnShow
()
...
...
Interface/AddOns/Blizzard_StoreUI/Blizzard_ProductCardTemplates.lua
View file @
91a27271
...
...
@@ -264,6 +264,22 @@ function StoreCardMixin:SetCardTexture(entryInfo)
end
end
function
StoreCardMixin
:
UpdatePricing
(
entryInfo
,
discounted
,
currencyFormat
)
if
bit
.
band
(
entryInfo
.
sharedData
.
flags
,
Enum
.
BattlepayDisplayFlag
.
HiddenPrice
)
==
Enum
.
BattlepayDisplayFlag
.
HiddenPrice
then
self
.
NormalPrice
:
Hide
();
self
.
SalePrice
:
Hide
();
self
.
Strikethrough
:
Hide
();
self
.
CurrentPrice
:
Hide
();
elseif
discounted
then
self
:
ShowDiscount
(
StoreFrame_GetProductPriceText
(
entryInfo
,
currencyFormat
));
else
self
.
NormalPrice
:
Hide
();
self
.
SalePrice
:
Hide
();
self
.
Strikethrough
:
Hide
();
self
.
CurrentPrice
:
Show
();
end
end
function
StoreCardMixin
:
ShowDiscount
(
discountText
)
self
.
SalePrice
:
SetText
(
discountText
);
self
.
NormalPrice
:
SetTextColor
(
0
.
8
,
0
.
66
,
0
);
...
...
@@ -429,19 +445,7 @@ function StoreCardMixin:UpdateCard(entryID, forceModelUpdate)
self
:
SetCardTexture
(
entryInfo
);
if
bit
.
band
(
entryInfo
.
sharedData
.
flags
,
Enum
.
BattlepayDisplayFlag
.
HiddenPrice
)
==
Enum
.
BattlepayDisplayFlag
.
HiddenPrice
then
self
.
NormalPrice
:
Hide
();
self
.
SalePrice
:
Hide
();
self
.
Strikethrough
:
Hide
();
self
.
CurrentPrice
:
Hide
();
elseif
discounted
then
self
:
ShowDiscount
(
StoreFrame_GetProductPriceText
(
entryInfo
,
currencyFormat
));
else
self
.
NormalPrice
:
Hide
();
self
.
SalePrice
:
Hide
();
self
.
Strikethrough
:
Hide
();
self
.
CurrentPrice
:
Show
();
end
self
:
UpdatePricing
(
entryInfo
,
discounted
,
currencyFormat
);
self
:
SetStyle
(
entryInfo
.
sharedData
.
overrideBackground
);
...
...
Interface/AddOns/Blizzard_StoreUI/Blizzard_ProductCardTemplates.xml
View file @
91a27271
...
...
@@ -172,28 +172,30 @@
</Texture>
</Layer>
</Layers>
</Frame>
</Frames>
</Frame>
</Frames>
</Button>
<
Button
name=
"SmallStore
CardTemplate
"
mixin=
"SmallStoreCardMixin"
inherits=
"DefaultStoreCardTemplate"
virtual=
"true"
>
<
/
Button>
<
!--
Card
Template
s WITHOUT a Buy Button--
>
<Button
name=
"SmallStoreCardTemplate"
mixin=
"SmallStoreCardMixin"
inherits=
"DefaultStoreCardTemplate"
virtual=
"true"
/
>
<Button
name=
"MediumStoreCardTemplate"
mixin=
"MediumStoreCardMixin"
inherits=
"DefaultStoreCardTemplate"
virtual=
"true"
>
</Button>
<Button
name=
"MediumStoreCardTemplate"
mixin=
"MediumStoreCardMixin"
inherits=
"DefaultStoreCardTemplate"
virtual=
"true"
/>
<Button
name=
"HorizontalLargeStoreCardTemplate"
mixin=
"HorizontalLargeStoreCardMixin"
inherits=
"LargeStoreCardTemplate"
virtual=
"true"
>
</Button>
<Button
name=
"HorizontalLargeStoreCardTemplate"
mixin=
"HorizontalLargeStoreCardMixin"
inherits=
"DefaultStoreCardTemplate"
virtual=
"true"
/>
<Button
name=
"VerticalLargeStoreCardTemplate"
mixin=
"VerticalLargeStoreCardMixin"
inherits=
"LargeStoreCardTemplate"
virtual=
"true"
>
</Button>
<Button
name=
"HorizontalFullStoreCardTemplate"
mixin=
"HorizontalFullStoreCardMixin"
inherits=
"LargeStoreCardTemplate"
virtual=
"true"
hidden=
"true"
>
</Button>
<Button
name=
"VerticalLargeStoreCardTemplate"
mixin=
"VerticalLargeStoreCardMixin"
inherits=
"DefaultStoreCardTemplate"
virtual=
"true"
/>
<!-- Card Templates WITH a Buy Button-->
<Button
name=
"MediumStoreCardWithBuyButtonTemplate"
mixin=
"MediumStoreCardWithBuyButtonMixin"
inherits=
"LargeStoreCardTemplate"
virtual=
"true"
/>
<Button
name=
"HorizontalLargeStoreCardWithBuyButtonTemplate"
mixin=
"HorizontalLargeStoreCardWithBuyButtonMixin"
inherits=
"LargeStoreCardTemplate"
virtual=
"true"
/>
<Button
name=
"VerticalLargeStoreCardWithBuyButtonTemplate"
mixin=
"VerticalLargeStoreCardWithBuyButtonMixin"
inherits=
"LargeStoreCardTemplate"
virtual=
"true"
/>
<Button
name=
"HorizontalFullStoreCardWithBuyButtonTemplate"
mixin=
"HorizontalFullStoreCardMixin"
inherits=
"LargeStoreCardTemplate"
virtual=
"true"
/>
<Button
name=
"VerticalFullStoreCardWithBuyButtonTemplate"
mixin=
"VerticalFullStoreCardMixin"
inherits=
"LargeStoreCardTemplate"
virtual=
"true"
/>