From 61aabf78c9e44c05ad7642d8f41366e3bf8f0d64 Mon Sep 17 00:00:00 2001 From: Munglunch Date: Tue, 18 Nov 2014 12:25:13 -0600 Subject: [PATCH] latest --- Interface/AddOns/SVUI/framework/framework.lua | 2 +- .../AddOns/SVUI/framework/widgets/widget_ego.lua | 6 +- .../SVUI/framework/widgets/widget_gamemenu.lua | 100 ++++++++++++++++++++ .../AddOns/SVUI/framework/widgets/widgets.xml | 38 ++++++++ Interface/AddOns/SVUI/packages/tools/SVTools.xml | 1 + .../SVUI/packages/tools/components/garrison.lua | 6 ++ .../AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua | 2 +- .../components/blizzard/garrison.lua | 51 ++++++++++ 8 files changed, 201 insertions(+), 5 deletions(-) create mode 100644 Interface/AddOns/SVUI/framework/widgets/widget_gamemenu.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/garrison.lua diff --git a/Interface/AddOns/SVUI/framework/framework.lua b/Interface/AddOns/SVUI/framework/framework.lua index 9238308..d1b1eaf 100644 --- a/Interface/AddOns/SVUI/framework/framework.lua +++ b/Interface/AddOns/SVUI/framework/framework.lua @@ -32,5 +32,5 @@ function SV:LoadFramework() self.Dock:Initialize(); self.Mentalo:Initialize(); self.Comix:Initialize() - self.Ego:Initialize() + self.GameMenu:Initialize() end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/framework/widgets/widget_ego.lua b/Interface/AddOns/SVUI/framework/widgets/widget_ego.lua index 6a2eeb3..4b3a531 100644 --- a/Interface/AddOns/SVUI/framework/widgets/widget_ego.lua +++ b/Interface/AddOns/SVUI/framework/widgets/widget_ego.lua @@ -31,7 +31,7 @@ GET ADDON DATA ]]-- local SV = select(2, ...); -SV.Ego = _G["SVUI_EgoFrame"]; +SV.GameMenu = _G["SVUI_EgoFrame"]; local Sequences = { --{65, 1000}, --shrug @@ -66,7 +66,7 @@ local Activate = function(self) self.ModelRight:SetAnimation(emote) end -function SV.Ego:Initialize() +function SV.GameMenu:Initialize() self:SetFrameLevel(0) self:SetAllPoints(SV.Screen) @@ -89,7 +89,7 @@ function SV.Ego:Initialize() self:SetScript("OnShow", Activate) end -function SV.Ego:Toggle() +function SV.GameMenu:Toggle() if(SV.db.general.ego) then self:Show() self:SetScript("OnShow", Activate) diff --git a/Interface/AddOns/SVUI/framework/widgets/widget_gamemenu.lua b/Interface/AddOns/SVUI/framework/widgets/widget_gamemenu.lua new file mode 100644 index 0000000..3436789 --- /dev/null +++ b/Interface/AddOns/SVUI/framework/widgets/widget_gamemenu.lua @@ -0,0 +1,100 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local math = _G.math; +--[[ MATH METHODS ]]-- +local random = math.random; +local GameMenuFrame = _G.GameMenuFrame +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = select(2, ...); + +SV.GameMenu = _G["SVUI_GameMenuFrame"]; + +local Sequences = { + --{65, 1000}, --shrug + {70, 1000}, --laugh + --{74, 1000}, --roar + --{82, 1000}, --flex + {5, 1000}, --run + {125, 1000}, --spell2 + {125, 1000}, --spell2 + {26, 1000}, --attack + {26, 1000}, --attack + {26, 1000}, --attack + {26, 1000}, --attack + {5, 1000}, --run + {69, 1000}, --dance +}; + +local function rng() + return random(1, #Sequences) +end + +local Activate = function(self) + if(not SV.db.general.ego) then + self:Toggle() + return + end + + local key = rng() + local emote = Sequences[key][1] + self:SetAlpha(1) + self.ModelLeft:SetAnimation(emote) + self.ModelRight:SetAnimation(emote) +end + +function SV.GameMenu:Initialize() + self:SetFrameLevel(0) + self:SetAllPoints(SV.Screen) + + self.ModelLeft:SetUnit("player") + self.ModelLeft:SetRotation(1) + self.ModelLeft:SetPortraitZoom(0.05) + self.ModelLeft:SetPosition(0,0,-0.25) + + self.ModelRight:SetUnit("player") + self.ModelRight:SetRotation(-1) + self.ModelRight:SetPortraitZoom(0.05) + self.ModelRight:SetPosition(0,0,-0.25) + + -- local splash = self:CreateTexture(nil, "OVERLAY") + -- splash:SetSize(600, 300) + -- splash:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\SPLASH-BLACK") + -- splash:SetBlendMode("ADD") + -- splash:SetPoint("TOP", 0, 0) + + self:SetScript("OnShow", Activate) +end + +function SV.GameMenu:Toggle() + if(SV.db.general.ego) then + self:Show() + self:SetScript("OnShow", Activate) + else + self:Hide() + self:SetScript("OnShow", nil) + end +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/framework/widgets/widgets.xml b/Interface/AddOns/SVUI/framework/widgets/widgets.xml index b8cbf51..d2e7fa8 100644 --- a/Interface/AddOns/SVUI/framework/widgets/widgets.xml +++ b/Interface/AddOns/SVUI/framework/widgets/widgets.xml @@ -95,6 +95,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Interface/AddOns/SVUI/packages/tools/SVTools.xml b/Interface/AddOns/SVUI/packages/tools/SVTools.xml index 74c4b63..6172c7d 100644 --- a/Interface/AddOns/SVUI/packages/tools/SVTools.xml +++ b/Interface/AddOns/SVUI/packages/tools/SVTools.xml @@ -2,5 +2,6 @@