Quantcast

5.0.1

Munglunch [10-14-14 - 16:15]
5.0.1
Filename
Interface/AddOns/SVUI/scripts/ego.lua
Interface/BUTTONS/UI-SILVER-BUTTON-DOWN.blp
Interface/BUTTONS/UI-SILVER-BUTTON-UP.blp
Interface/BUTTONS/UI-SilverButtonLG-Left-Down.blp
Interface/BUTTONS/UI-SilverButtonLG-Left-Hi.blp
Interface/BUTTONS/UI-SilverButtonLG-Left-Up.blp
Interface/BUTTONS/UI-SilverButtonLG-Mid-Down.blp
Interface/BUTTONS/UI-SilverButtonLG-Mid-Hi.blp
Interface/BUTTONS/UI-SilverButtonLG-Mid-Up.blp
Interface/BUTTONS/UI-SilverButtonLG-Right-Down.blp
Interface/BUTTONS/UI-SilverButtonLG-Right-Hi.blp
Interface/BUTTONS/UI-SilverButtonLG-Right-Up.blp
diff --git a/Interface/AddOns/SVUI/scripts/ego.lua b/Interface/AddOns/SVUI/scripts/ego.lua
index ea57280..4cebace 100644
--- a/Interface/AddOns/SVUI/scripts/ego.lua
+++ b/Interface/AddOns/SVUI/scripts/ego.lua
@@ -33,73 +33,27 @@ local L = SV.L

 local Sequences = {
 	{65, 1000}, --shrug
-	{68, 1000}, --cheer
 	{70, 1000}, --laugh
 	{74, 1000}, --roar
-	{77, 1000}, --cry
-	{84, 1000}, --point
 	{82, 1000}, --flex
 };

-local EgoFrame = CreateFrame("Frame", "SVUI_EgoFrame", UIParent);
-
 local function rng()
 	return random(1, #Sequences)
 end

-local EgoPop_OnUpdate = function(self)
-	self.parent:SetAlpha(0)
-	self:SetScript("OnFinished", nil)
-end
-
-local LaunchAnimation = function(self, key)
+local GoGoGadget = function(self, key)
 	key = key or rng()
 	local emote = Sequences[key][1]
 	self:SetAlpha(1)
-	self.Model:SetAnimation(emote)
-	self.Pane.anim[1]:SetOffset(25, -25)
-	self.Pane.anim[2]:SetOffset(-50, 50)
-	self.Pane.anim[4]:SetOffset(25, -25)
-	self.Pane.anim[4]:SetScript("OnFinished", EgoPop_OnUpdate)
-	self.Pane.anim:Play()
-end
-
-local LaunchFreezeFrame = function(self)
-	self:SetAlpha(1)
-	self.Model:SetAnimation(70)
-	self.Model2:SetAnimation(70)
-end
-
-local ResetPosition = function(self)
-	local size = SVUIParent:GetHeight()
-	self:SetPoint("TOP", SV.UIParent, "TOP", 0, 0)
-	self:SetWidth(size)
-	self:SetHeight(size)
-	self.Model:SetUnit("player")
-end
-
-local Ego_OnEvent = function(self, event)
-	if event == "ACHIEVEMENT_EARNED" then
-		self:LaunchAnimation(4)
-	else
-		self:LaunchAnimation(6)
-	end
-end
-
-function SV:ToggleEgo()
-	if not SV.db.general.ego then
-		EgoFrame:UnregisterEvent("ACHIEVEMENT_EARNED")
-		EgoFrame:UnregisterEvent("SCREENSHOT_SUCCEEDED")
-		EgoFrame:SetScript("OnEvent", nil)
-	else
-		EgoFrame:RegisterEvent("ACHIEVEMENT_EARNED")
-		EgoFrame:RegisterEvent("SCREENSHOT_SUCCEEDED")
-		EgoFrame:SetScript("OnEvent", Ego_OnEvent)
-	end
+	self.Model1:SetAnimation(emote)
+	self.Model2:SetAnimation(emote)
 end

 local function LoadSVEgo()
 	local GameMenuFrame = _G.GameMenuFrame
+
+	local EgoFrame = CreateFrame("Frame", "SVUI_EgoFrame", UIParent);
 	EgoFrame:SetParent(GameMenuFrame)
 	EgoFrame:SetFrameLevel(0)
 	EgoFrame:SetAllPoints(SV.UIParent)
@@ -116,28 +70,14 @@ local function LoadSVEgo()
     EgoFrame.BG2:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]])
 	EgoFrame.BG2:SetVertexColor(0, 0, 0, 0.8)

-	EgoFrame.Pane = CreateFrame("Frame", nil, EgoFrame);
-	EgoFrame.Pane:SetPoint("LEFT", EgoFrame, "LEFT", 100, 0)
-	EgoFrame.Pane:SetWidth(512)
-	EgoFrame.Pane:SetHeight(512)
-
-	SV.Animate:Slide(EgoFrame.Pane, 100, 0, true, 0.1)
-
-	EgoFrame.Pane.image = EgoFrame.Pane:CreateTexture(nil, "BORDER", nil, -1)
-    EgoFrame.Pane.image:SetAllPoints(EgoFrame.Pane)
-    EgoFrame.Pane.image:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Panes\COMIC-PANE1]])
-
-    EgoFrame.Pane:Hide()
-
-	EgoFrame.Model = CreateFrame("PlayerModel", "SVUI_EgoModel1", EgoFrame);
-	EgoFrame.Model:SetUnit("player")
-	EgoFrame.Model:SetRotation(1)
-	EgoFrame.Model:SetPortraitZoom(0.3)
-	EgoFrame.Model:SetPosition(0,0,-0.25)
-	EgoFrame.Model:SetFrameStrata("BACKGROUND")
-	local w, h = EgoFrame:GetSize()
-	EgoFrame.Model:SetSize(w, h - 280)
-	EgoFrame.Model:SetPoint("LEFT", EgoFrame, "LEFT", -250, 0)
+	EgoFrame.Model1 = CreateFrame("PlayerModel", "SVUI_EgoModel1", EgoFrame);
+	EgoFrame.Model1:SetUnit("player")
+	EgoFrame.Model1:SetRotation(1)
+	EgoFrame.Model1:SetPortraitZoom(0.3)
+	EgoFrame.Model1:SetPosition(0,0,-0.25)
+	EgoFrame.Model1:SetFrameStrata("BACKGROUND")
+	EgoFrame.Model1:SetPoint("TOPLEFT", EgoFrame, "TOPLEFT", -250, -300)
+	EgoFrame.Model1:SetPoint("BOTTOMRIGHT", EgoFrame, "BOTTOM", 0, 300)

 	EgoFrame.Model2 = CreateFrame("PlayerModel", "SVUI_EgoModel2", EgoFrame);
 	EgoFrame.Model2:SetUnit("player")
@@ -145,22 +85,14 @@ local function LoadSVEgo()
 	EgoFrame.Model2:SetPortraitZoom(0.3)
 	EgoFrame.Model2:SetPosition(0,0,-0.25)
 	EgoFrame.Model2:SetFrameStrata("BACKGROUND")
-	local w, h = EgoFrame:GetSize()
-	EgoFrame.Model2:SetSize(w, h - 280)
-	EgoFrame.Model2:SetPoint("RIGHT", EgoFrame, "RIGHT", 250, 0)
+	EgoFrame.Model2:SetPoint("TOPRIGHT", EgoFrame, "TOPRIGHT", 250, -300)
+	EgoFrame.Model2:SetPoint("BOTTOMLEFT", EgoFrame, "BOTTOM", 250, 300)

-	EgoFrame.LaunchAnimation = LaunchAnimation
-	EgoFrame.LaunchFreezeFrame = LaunchFreezeFrame
-	EgoFrame.ResetPosition = ResetPosition
+	EgoFrame.GoGoGadget = GoGoGadget

 	EgoFrame:SetScript("OnShow", function(self)
-		self:LaunchFreezeFrame()
+		self:GoGoGadget()
 	end)
 end

-_G.SlashCmdList["BADASS"] = function()
-	EgoFrame:LaunchAnimation(4)
-end
-_G.SLASH_BADASS1 = "/badass"
-
 SV:NewScript(LoadSVEgo)
\ No newline at end of file
diff --git a/Interface/BUTTONS/UI-SILVER-BUTTON-DOWN.blp b/Interface/BUTTONS/UI-SILVER-BUTTON-DOWN.blp
new file mode 100644
index 0000000..bfc7cf2
Binary files /dev/null and b/Interface/BUTTONS/UI-SILVER-BUTTON-DOWN.blp differ
diff --git a/Interface/BUTTONS/UI-SILVER-BUTTON-UP.blp b/Interface/BUTTONS/UI-SILVER-BUTTON-UP.blp
new file mode 100644
index 0000000..5ef32d9
Binary files /dev/null and b/Interface/BUTTONS/UI-SILVER-BUTTON-UP.blp differ
diff --git a/Interface/BUTTONS/UI-SilverButtonLG-Left-Down.blp b/Interface/BUTTONS/UI-SilverButtonLG-Left-Down.blp
new file mode 100644
index 0000000..ea9c18c
Binary files /dev/null and b/Interface/BUTTONS/UI-SilverButtonLG-Left-Down.blp differ
diff --git a/Interface/BUTTONS/UI-SilverButtonLG-Left-Hi.blp b/Interface/BUTTONS/UI-SilverButtonLG-Left-Hi.blp
new file mode 100644
index 0000000..611cc3f
Binary files /dev/null and b/Interface/BUTTONS/UI-SilverButtonLG-Left-Hi.blp differ
diff --git a/Interface/BUTTONS/UI-SilverButtonLG-Left-Up.blp b/Interface/BUTTONS/UI-SilverButtonLG-Left-Up.blp
new file mode 100644
index 0000000..ea9c18c
Binary files /dev/null and b/Interface/BUTTONS/UI-SilverButtonLG-Left-Up.blp differ
diff --git a/Interface/BUTTONS/UI-SilverButtonLG-Mid-Down.blp b/Interface/BUTTONS/UI-SilverButtonLG-Mid-Down.blp
new file mode 100644
index 0000000..5a2fe76
Binary files /dev/null and b/Interface/BUTTONS/UI-SilverButtonLG-Mid-Down.blp differ
diff --git a/Interface/BUTTONS/UI-SilverButtonLG-Mid-Hi.blp b/Interface/BUTTONS/UI-SilverButtonLG-Mid-Hi.blp
new file mode 100644
index 0000000..454fcc2
Binary files /dev/null and b/Interface/BUTTONS/UI-SilverButtonLG-Mid-Hi.blp differ
diff --git a/Interface/BUTTONS/UI-SilverButtonLG-Mid-Up.blp b/Interface/BUTTONS/UI-SilverButtonLG-Mid-Up.blp
new file mode 100644
index 0000000..5a2fe76
Binary files /dev/null and b/Interface/BUTTONS/UI-SilverButtonLG-Mid-Up.blp differ
diff --git a/Interface/BUTTONS/UI-SilverButtonLG-Right-Down.blp b/Interface/BUTTONS/UI-SilverButtonLG-Right-Down.blp
new file mode 100644
index 0000000..deaf17d
Binary files /dev/null and b/Interface/BUTTONS/UI-SilverButtonLG-Right-Down.blp differ
diff --git a/Interface/BUTTONS/UI-SilverButtonLG-Right-Hi.blp b/Interface/BUTTONS/UI-SilverButtonLG-Right-Hi.blp
new file mode 100644
index 0000000..624cd81
Binary files /dev/null and b/Interface/BUTTONS/UI-SilverButtonLG-Right-Hi.blp differ
diff --git a/Interface/BUTTONS/UI-SilverButtonLG-Right-Up.blp b/Interface/BUTTONS/UI-SilverButtonLG-Right-Up.blp
new file mode 100644
index 0000000..deaf17d
Binary files /dev/null and b/Interface/BUTTONS/UI-SilverButtonLG-Right-Up.blp differ