Skip to content

Commit

Permalink
Build 16597
Browse files Browse the repository at this point in the history
  • Loading branch information
tekkub committed Feb 20, 2013
1 parent 5d363be commit d241a2f
Show file tree
Hide file tree
Showing 16 changed files with 222 additions and 66 deletions.
6 changes: 5 additions & 1 deletion AddOns/Blizzard_AchievementUI/Blizzard_AchievementUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1917,7 +1917,7 @@ end
-- [[ StatsFrames ]]--

function AchievementFrameStats_OnEvent (self, event, ...)
if ( event == "CRITERIA_UPDATE" and self:IsShown() ) then
if ( event == "CRITERIA_UPDATE" and self:IsVisible() ) then
AchievementFrameStats_Update();
end
end
Expand Down Expand Up @@ -2025,6 +2025,10 @@ function AchievementFrameStats_SetStat(button, category, index, colorIndex, isSu
id, name, points, completed, month, day, year, description, flags, icon = GetAchievementInfoFromCriteria(category);
end

if (not id) then
return;
end

button.id = id;

if ( not colorIndex ) then
Expand Down
2 changes: 1 addition & 1 deletion AddOns/Blizzard_GMChatUI/Blizzard_GMChatUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function GMChatFrame_OnLoad(self)
else
--error("Unhandled object type");
end
object:SetAlpha(0.4);
object:SetAlpha(0.6);
end

self:RegisterEvent("CHAT_MSG_WHISPER");
Expand Down
1 change: 1 addition & 0 deletions AddOns/Blizzard_GMSurveyUI/Blizzard_GMSurveyUI.xml
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,7 @@
</OnShow>
<OnHide>
PlaySound("igCharacterInfoClose");
HelpOpenTicketButton_Update();
</OnHide>
</Scripts>
</Frame>
Expand Down
82 changes: 61 additions & 21 deletions AddOns/Blizzard_PVPUI/Blizzard_PVPUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ BATTLEGROUND_BUTTON_HEIGHT = 40;

local MAX_SHOWN_BATTLEGROUNDS = 8;
local NUM_BLACKLIST_INFO_LINES = 2;
local NO_ARENA_SEASON = 0;

StaticPopupDialogs["CONFIRM_JOIN_SOLO"] = {
text = CONFIRM_JOIN_SOLO,
Expand Down Expand Up @@ -93,6 +94,9 @@ function PVPUIFrame_OnShow(self)
UpdateMicroButtons();
PlaySound("igCharacterInfoOpen");
PVPUIFrame_TabOnClick(PVPUIFrame.Tab1);
for teamIndex = 1, MAX_ARENA_TEAMS do
ArenaTeamRoster(teamIndex);
end
end

function PVPUIFrame_OnHide(self)
Expand Down Expand Up @@ -859,22 +863,27 @@ function ConquestFrame_OnShow(self)
end

function ConquestFrame_Update(self)
ConquestFrame_UpdateConquestBar(self);
ConquestFrame_UpdateArenas(self);
ConquestFrame_UpdateRatedBG(self);
-- select a button if one isn't selected
if ( not ConquestFrame.selectedButton ) then
local selectButton;
for i = 1, 3 do
if ( ARENA_BUTTONS[i]:IsEnabled() ) then
selectButton = ARENA_BUTTONS[i];
break;
if ( GetCurrentArenaSeason() == NO_ARENA_SEASON ) then
ConquestFrame.NoSeason:Show();
else
ConquestFrame.NoSeason:Hide();
ConquestFrame_UpdateConquestBar(self);
ConquestFrame_UpdateArenas(self);
ConquestFrame_UpdateRatedBG(self);
-- select a button if one isn't selected
if ( not ConquestFrame.selectedButton ) then
local selectButton;
for i = 1, 3 do
if ( ARENA_BUTTONS[i]:IsEnabled() ) then
selectButton = ARENA_BUTTONS[i];
break;
end
end
-- rated BG button is always going to be enabled
ConquestFrame_SelectButton(selectButton or ConquestFrame.RatedBG);
else
ConquestFrame_UpdateJoinButton();
end
-- rated BG button is always going to be enabled
ConquestFrame_SelectButton(selectButton or ConquestFrame.RatedBG);
else
ConquestFrame_UpdateJoinButton();
end
end

Expand All @@ -898,7 +907,6 @@ function ConquestFrame_UpdateArenas(self)
local arenaButton = ARENA_BUTTONS[i];
local teamIndex = GetArenaTeamIndexBySize(CONQUEST_SIZES[i]);
if ( teamIndex ) then
ArenaTeamRoster(teamIndex);
local teamName, teamSize, teamRating, teamPlayed, teamWins, seasonTeamPlayed,
seasonTeamWins, playerPlayed, seasonPlayerPlayed, teamRank, playerRating = GetArenaTeam(teamIndex);
arenaButton:Enable();
Expand Down Expand Up @@ -1396,6 +1404,10 @@ function PVPArenaTeamsFrame_OnEvent(self, event, ...)
PVPArenaTeamsFrame_UpdateTeams(self);
PVPArenaTeamsFrame_ShowTeam(self);
elseif (event == "ARENA_TEAM_ROSTER_UPDATE") then
local teamIndex = ...;
if ( teamIndex ) then
ArenaTeamRoster(teamIndex);
end
PVPArenaTeamsFrame_ShowTeam(self);
end
end
Expand All @@ -1411,10 +1423,7 @@ end
function PVPArenaTeamsFrame_ShowTeam(self)
local frame = ArenaTeamFrame;
if (not self.selectedButton) then
frame.NoTeams:Show()
return;
else
frame.NoTeams:Hide()
end

local teamIndex = self.selectedButton.teamIndex;
Expand Down Expand Up @@ -1526,6 +1535,21 @@ function PVPArenaTeamsFrame_SelectButton(button)
end
end

function PVPArenaTeamsFrameButton_SetEnabled(button, enabled)
if ( enabled ) then
button.Background:SetTexCoord(0.00390625, 0.87890625, 0.75195313, 0.83007813);
button.TeamName:SetFontObject("GameFontNormalMed3");
button.TeamSize:SetFontObject("GameFontHighlightMedium");
button.Rating:SetFontObject("GameFontHighlight");
else
button.Background:SetTexCoord(0.00390625, 0.87890625, 0.67187500, 0.75000000);
button.TeamName:SetFontObject("GameFontDisableMed3");
button.TeamSize:SetFontObject("GameFontDisableMed3");
button.Rating:SetFontObject("GameFontDisable");
end
button:SetEnabled(enabled);
end

function PVPArenaTeamsFrame_UpdateTeams(self)

local defaultButton = nil;
Expand All @@ -1535,12 +1559,12 @@ function PVPArenaTeamsFrame_UpdateTeams(self)
local background = {};
local emblemColor = {} ;
local borderColor = {};
local inSeason = (GetCurrentArenaSeason() ~= NO_ARENA_SEASON);

for i=1, MAX_ARENA_TEAMS do
teamButton = self["Team"..i];
teamIndex = GetArenaTeamIndexBySize(CONQUEST_SIZES[i]);
if (teamIndex) then
ArenaTeamRoster(teamIndex);
--the ammount of parameter this returns is absurd
teamName, teamSize, teamRating, _, _, _, _, _, _, _, _,
background.r, background.g, background.b,
Expand Down Expand Up @@ -1595,10 +1619,26 @@ function PVPArenaTeamsFrame_UpdateTeams(self)
teamButton.RatingLabel:SetPoint("BOTTOMRIGHT", teamButton, "BOTTOMRIGHT", -40, 10);
end
end
PVPArenaTeamsFrameButton_SetEnabled(teamButton, inSeason);
end

if (not self.selectedButton and defaultButton) then
PVPArenaTeamsFrame_SelectButton(defaultButton);
if ( inSeason ) then
if ( not defaultButton ) then
-- no teams to select
ArenaTeamFrame.NoTeams:Show();
ArenaTeamFrame.NoTeams.Error:Show();
ArenaTeamFrame.NoTeams.Info:SetText(ARENA_INFO);
else
ArenaTeamFrame.NoTeams:Hide();
if (not self.selectedButton and defaultButton) then
PVPArenaTeamsFrame_SelectButton(defaultButton);
end
end
else
self.selectedButton = nil;
ArenaTeamFrame.NoTeams:Show();
ArenaTeamFrame.NoTeams.Error:Hide();
ArenaTeamFrame.NoTeams.Info:SetText(ARENA_MASTER_NO_SEASON_TEXT);
end
end

Expand Down
35 changes: 24 additions & 11 deletions AddOns/Blizzard_PVPUI/Blizzard_PVPUI.xml
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,11 @@
<Anchor point="BOTTOMLEFT" relativeKey="$parent.RatingLabel" relativePoint="BOTTOMRIGHT" x="-1" />
</Anchors>
</FontString>
<FontString parentKey="TeamName" inherits="GameFontHighlightMedium" justifyH="LEFT" justifyV="BOTTOM" nonspacewrap="true">
<FontString parentKey="TeamName" inherits="GameFontNormalMed3" justifyH="LEFT" justifyV="BOTTOM" nonspacewrap="true">
<Size x="140" y="40"/>
<Anchors>
<Anchor point="BOTTOMLEFT" relativeKey="$parent.TeamSize" relativePoint="TOPLEFT" y="10" />
</Anchors>
<Color r="1.0" g="0.82" b="0"/>
</FontString>
</Layer>
</Layers>
Expand Down Expand Up @@ -663,7 +662,7 @@
<Scripts>
<OnClick function="PVPUIFrame_TabOnClick"/>
<OnEnter>
if ( not self:IsEnabled() ) then
if ( not self:IsEnabled() and PanelTemplates_GetSelectedTab(PVPUIFrame) ~= self:GetID() ) then
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(string.format(PVP_CONQUEST_LOWLEVEL, ARENA_TEAMS), nil, nil, nil, 1, 1);
end
Expand Down Expand Up @@ -1228,6 +1227,28 @@
</OnLeave>
</Scripts>
</Button>
<Frame parentKey="NoSeason" inherits="GlowBoxTemplate" hidden="true" frameLevel="100" enableMouse="true">
<Anchors>
<Anchor point="TOPLEFT" x="2" y="-2"/>
<Anchor point="BOTTOMRIGHT" x="-2" y="4"/>
</Anchors>
<Layers>
<Layer level="OVERLAY" >
<FontString parentKey="Title" inherits="QuestTitleFontBlackShadow" text="PVP_TAB_CONQUEST" justifyH="CENTER">
<Size x="280" y="0"/>
<Anchors>
<Anchor point="TOP" x="0" y="-125"/>
</Anchors>
</FontString>
<FontString parentKey="Info" inherits="GameFontHighlight" text="ARENA_MASTER_NO_SEASON_TEXT" justifyH="CENTER" justifyV="TOP">
<Size x="280" y="180"/>
<Anchors>
<Anchor point="TOP" relativeKey="$parent.Title" relativePoint="BOTTOM" x="0" y="-33"/>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Frame parentKey="ArenaInviteMenu" name="$parentArenaInviteMenu" inherits="UIDropDownMenuTemplate" enableMouse="true" />
</Frames>
<Scripts>
Expand Down Expand Up @@ -1789,14 +1810,6 @@
<OnShow function="PVPUIFrame_OnShow"/>
<OnHide function="PVPUIFrame_OnHide"/>
<OnEvent function="PVPUIFrame_OnEvent"/>
<OnShow>
UpdateMicroButtons();
PlaySound("igCharacterInfoOpen");
</OnShow>
<OnHide>
UpdateMicroButtons();
PlaySound("igCharacterInfoClose");
</OnHide>
</Scripts>
</Frame>

Expand Down
30 changes: 28 additions & 2 deletions AddOns/Blizzard_QuestChoice/Blizzard_QuestChoice.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ CURRENCY_SPACING = 5;
CURRENCY_HEIGHT = 20;
MAX_CURRENCIES = 3;
REWARDS_WIDTH = 200;
INIT_REWARDS_HEIGHT = 18; --basically total vertical padding between rewards
INIT_OPTION_HEIGHT = 268;
INIT_WINDOW_HEIGHT = 440;
OPTION_STATIC_HEIGHT = 136; --height of artwork, button, and minimum padding

function QuestChoiceFrame_OnEvent(self, event)
if (event == "QUEST_CHOICE_UPDATE") then
Expand Down Expand Up @@ -37,20 +41,38 @@ function QuestChoiceFrame_Update(self)
option.OptionButton:SetText(buttonText);
option.OptionText:SetText(description);
option.Artwork:SetTexture(artFile);

end

QuestChoiceFrame_ShowRewards()

--make window taller if there is too much stuff
local maxHeight = INIT_OPTION_HEIGHT;
local currHeight;
for i=1, numOptions do
local option = QuestChoiceFrame["Option"..i];
currHeight = OPTION_STATIC_HEIGHT;
currHeight = currHeight + option.OptionText:GetHeight();
currHeight = currHeight + option.Rewards:GetHeight();
maxHeight = max(currHeight, maxHeight);
end
for i=1, numOptions do
local option = QuestChoiceFrame["Option"..i];
option:SetHeight(maxHeight);
end
local heightDiff = maxHeight - INIT_OPTION_HEIGHT;
heightDiff = max(heightDiff, 0);
QuestChoiceFrame:SetHeight(INIT_WINDOW_HEIGHT + heightDiff);
end

function QuestChoiceFrame_ShowRewards()
local rewardFrame;
local rewardFrame, height;
local title, skillID, skillPoints, money, xp, numItems, numCurrencies, numChoices, numReps;
local name, texture, quantity, itemFrame;
local currID, factionID;

for i=1, MAX_NUM_OPTIONS do
rewardFrame = QuestChoiceFrame["Option"..i].Rewards;
height = INIT_REWARDS_HEIGHT;
title, skillID, skillPoints, money, xp, numItems, numCurrencies, numChoices, numReps = GetQuestChoiceRewardInfo(i)

if (numItems ~= 0) then
Expand All @@ -60,6 +82,7 @@ function QuestChoiceFrame_ShowRewards()
rewardFrame.Item.Name:SetText(name)
SetItemButtonCount(rewardFrame.Item, quantity);
SetItemButtonTexture(rewardFrame.Item, texture);
height = height + rewardFrame.Item:GetHeight()
else
rewardFrame.Item:Hide();
end
Expand Down Expand Up @@ -102,6 +125,7 @@ function QuestChoiceFrame_ShowRewards()
else
rewardFrame.Currencies:SetPoint("TOPLEFT", rewardFrame.Item, "BOTTOMLEFT", -30, -5);
end
height = height + rewardFrame.Currencies:GetHeight();
else
rewardFrame.Currencies:Hide();
end
Expand All @@ -127,8 +151,10 @@ function QuestChoiceFrame_ShowRewards()
repFrame.tooltip = nil
end
rewardFrame.ReputationsFrame:Show();
height = height + rewardFrame.ReputationsFrame:GetHeight()
else
rewardFrame.ReputationsFrame:Hide();
end
rewardFrame:SetHeight(height);
end
end
Loading

0 comments on commit d241a2f

Please sign in to comment.