From ce817d5a76c9bb0b9fd3fac775f8066c822b8774 Mon Sep 17 00:00:00 2001 From: Cameron Ball Date: Wed, 22 Jan 2014 23:41:41 +0800 Subject: [PATCH] Added more layers to the player pane. --- Themes/GrooveNights/BGAnimations/_player pane.xml | 84 +++++++++++++++++++-- .../{BGAnimations => Graphics}/AvatarFrame B.png | Bin .../{BGAnimations => Graphics}/AvatarFrame.png | Bin Themes/GrooveNights/Scripts/gnSystem.lua | 34 ++++----- 4 files changed, 95 insertions(+), 23 deletions(-) rename Themes/GrooveNights/{BGAnimations => Graphics}/AvatarFrame B.png (100%) rename Themes/GrooveNights/{BGAnimations => Graphics}/AvatarFrame.png (100%) diff --git a/Themes/GrooveNights/BGAnimations/_player pane.xml b/Themes/GrooveNights/BGAnimations/_player pane.xml index 9392a35..6c45400 100644 --- a/Themes/GrooveNights/BGAnimations/_player pane.xml +++ b/Themes/GrooveNights/BGAnimations/_player pane.xml @@ -15,11 +15,83 @@ File="../Graphics/PaneDisplay p1 F.png" OnCommand="@'diffuse,'..FrameColor()..';horizalign,left;vertalign,bottom;'" /> - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Themes/GrooveNights/BGAnimations/AvatarFrame B.png b/Themes/GrooveNights/Graphics/AvatarFrame B.png similarity index 100% rename from Themes/GrooveNights/BGAnimations/AvatarFrame B.png rename to Themes/GrooveNights/Graphics/AvatarFrame B.png diff --git a/Themes/GrooveNights/BGAnimations/AvatarFrame.png b/Themes/GrooveNights/Graphics/AvatarFrame.png similarity index 100% rename from Themes/GrooveNights/BGAnimations/AvatarFrame.png rename to Themes/GrooveNights/Graphics/AvatarFrame.png diff --git a/Themes/GrooveNights/Scripts/gnSystem.lua b/Themes/GrooveNights/Scripts/gnSystem.lua index f4e1906..435d434 100644 --- a/Themes/GrooveNights/Scripts/gnSystem.lua +++ b/Themes/GrooveNights/Scripts/gnSystem.lua @@ -475,26 +475,26 @@ local function QuadAwardEasterEgg(Params) local ScoreP2 local AwardFile - --[[ - I don't even understand this. When this function is called from a queued command you have to get the score like this: - SCREENMAN:GetTopScreen():GetChild('PercentP1'):GetChild('PercentP1'):GetText() end - - But if it's in an initcommand or oncommand you have to do it like this: - SCREENMAN:GetTopScreen():GetChild('ScoreP1'):GetChild('ScoreDisplayPercentage Percent'):GetChild('PercentP1'):GetText() - - I think some children must get renamed/added between the commands or something, I don't know. - ]]-- - if Params.Layer == 'Silence' then - if GAMESTATE:IsPlayerEnabled(PLAYER_1) then ScoreP1 = SCREENMAN:GetTopScreen():GetChild('PercentP1'):GetChild('PercentP1'):GetText() end - if GAMESTATE:IsPlayerEnabled(PLAYER_2) then ScoreP2 = SCREENMAN:GetTopScreen():GetChild('PercentP2'):GetChild('PercentP2'):GetText() end - else - if GAMESTATE:IsPlayerEnabled(PLAYER_1) then ScoreP1 = SCREENMAN:GetTopScreen():GetChild('ScoreP1'):GetChild('ScoreDisplayPercentage Percent'):GetChild('PercentP1'):GetText() end - if GAMESTATE:IsPlayerEnabled(PLAYER_2) then ScoreP2 = SCREENMAN:GetTopScreen():GetChild('ScoreP2'):GetChild('ScoreDisplayPercentage Percent'):GetChild('PercentP2'):GetText() end - end + --[[ + I don't even understand this. When this function is called from a queued command you have to get the score like this: + SCREENMAN:GetTopScreen():GetChild('PercentP1'):GetChild('PercentP1'):GetText() end + + But if it's in an initcommand or oncommand you have to do it like this: + SCREENMAN:GetTopScreen():GetChild('ScoreP1'):GetChild('ScoreDisplayPercentage Percent'):GetChild('PercentP1'):GetText() + + I think some children must get renamed/added between the commands or something, I don't know. + ]]-- + if Params.Layer == 'Silence' then + if GAMESTATE:IsPlayerEnabled(PLAYER_1) then ScoreP1 = SCREENMAN:GetTopScreen():GetChild('PercentP1'):GetChild('PercentP1'):GetText() end + if GAMESTATE:IsPlayerEnabled(PLAYER_2) then ScoreP2 = SCREENMAN:GetTopScreen():GetChild('PercentP2'):GetChild('PercentP2'):GetText() end + else + if GAMESTATE:IsPlayerEnabled(PLAYER_1) then ScoreP1 = SCREENMAN:GetTopScreen():GetChild('ScoreP1'):GetChild('ScoreDisplayPercentage Percent'):GetChild('PercentP1'):GetText() end + if GAMESTATE:IsPlayerEnabled(PLAYER_2) then ScoreP2 = SCREENMAN:GetTopScreen():GetChild('ScoreP2'):GetChild('ScoreDisplayPercentage Percent'):GetChild('PercentP2'):GetText() end + end if ScoreP1 == "100.00%" and ScoreP2 == "100.00%" then --choose p1 or p2 randomly - local seconds = gnPlaySec -- TODO: This is temporary until the time tracker is reimplemented + local seconds = gnPlaySec -- TODO: This is temporary until the time tracker is reimplemented local pn = math.mod(seconds, 2) AwardFile = GetQuadAwardFile(pn) elseif ScoreP1 == "100.00%" then -- 2.11.0