WoWInterface SVN AmbientAura

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 9 to Rev 10
    Reverse comparison

Rev 9 → Rev 10

trunk/AmbientAura/AmbientAura.lua
6,12 → 6,14
local height = GetScreenHeight()
local tip = GameTooltip
local red = "SPELLS\\RedRadiationFog.m2"
--local red = "Interface\\AddOns\\AmbientAura\\Redradiationfog.m2"
local blue = "SPELLS\\BlueRadiationFog.m2"
local green = "SPELLS\\GreenRadiationFog.m2"
 
local defaults = {
hmult = 1,
alpha = 1,
--alpha = 1,
alpha = .5,
-- scale = 1,
usage = 1,
}
28,17 → 30,25
AuraFrame:SetHeight(height * AmbientAuraDB.hmult) -- place for variable
AuraFrame:SetAlpha(AmbientAuraDB.alpha) -- place for variable
-- AuraFrame:SetModelScale(AmbientAuraDB.scale)
AuraFrame:SetCamDistanceScale(2.5)
AuraFrame:SetPosition(0,0,-2)
end
 
--white:26691, green:17055, purple:17054, fire:30903, yellow:17286, red:17522
--blue:18075, pink:20262, orange:20382, violet:20383,
 
local function SetUpEvents()
local usage = AmbientAuraDB.usage
if usage == 1 then
if IsResting() then
AuraFrame:SetModel(green)
--AuraFrame:SetModel(green)
AuraFrame:SetDisplayInfo(17055)
elseif InCombatLockdown() then
AuraFrame:SetModel(red)
--AuraFrame:SetModel(red)
AuraFrame:SetDisplayInfo(17522)
else
AuraFrame:SetModel(blue)
--AuraFrame:SetModel(blue)
AuraFrame:SetDisplayInfo(18075)
end
AuraFrame:RegisterEvent("PLAYER_REGEN_DISABLED")
AuraFrame:RegisterEvent("PLAYER_REGEN_ENABLED")
54,11 → 64,14
end
end
if stance == 1 then
AuraFrame:SetModel(red)
--AuraFrame:SetModel(red)
AuraFrame:SetDisplayInfo(17522)
elseif stance == 2 then
AuraFrame:SetModel(blue)
--AuraFrame:SetModel(blue)
AuraFrame:SetDisplayInfo(18075)
elseif stance == 3 then
AuraFrame:SetModel(green)
--AuraFrame:SetModel(green)
AuraFrame:SetDisplayInfo(17055)
end
AuraFrame:UnregisterEvent("PLAYER_REGEN_DISABLED")
AuraFrame:UnregisterEvent("PLAYER_REGEN_ENABLED")
66,11 → 79,14
AuraFrame:RegisterEvent("UPDATE_SHAPESHIFT_FORM")
else
if usage == 4 then
AuraFrame:SetModel(red)
--AuraFrame:SetModel(red)
AuraFrame:SetDisplayInfo(17522)
elseif usage == 5 then
AuraFrame:SetModel(blue)
--AuraFrame:SetModel(blue)
AuraFrame:SetDisplayInfo(18075)
elseif usage == 6 then
AuraFrame:SetModel(green)
--AuraFrame:SetModel(green)
AuraFrame:SetDisplayInfo(17055)
end
AuraFrame:UnregisterEvent("PLAYER_REGEN_DISABLED")
AuraFrame:UnregisterEvent("PLAYER_REGEN_ENABLED")
124,8 → 140,11
atext:SetPoint("BOTTOM", aslider, "TOP", 0,5)
atext:SetText("Fog Alpha")
local tkDrop = LibStub("tekKonfig-Dropdown")
local dropdown,droptext = tkDrop.new(config,"Usage")
dropdown:SetPoint("TOPLEFT", hslider, "BOTTOMLEFT", -15,-40)
local dropdown,droptext,dropcont,droplabel = tkDrop.new(config,"Usage","TOPLEFT", hslider, "BOTTOMLEFT", 0,-15)
-- dropdown:SetPoint("TOPLEFT", hslider, "BOTTOMLEFT", -15,-40)
dropdown:SetWidth(175)
droplabel:ClearAllPoints()
droplabel:SetPoint("BOTTOMLEFT", dropdown, "TOPLEFT", 20, 5)
dropdown.tiptext = "Select how Ambient Aura should display its colors for this character."
droptext:SetText(values[AmbientAuraDB.usage])
UIDropDownMenu_SetSelectedValue(dropdown, AmbientAuraDB.usage)
177,6 → 196,7
 
--INITIAL MODEL SETUP--
AuraFrame:SetPoint("BOTTOM", UIParent)
--AuraFrame:SetPoint("CENTER", UIParent, "BOTTOM")
AuraFrame:SetWidth(GetScreenWidth())
-- AuraFrame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT")
-- AuraFrame:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT")
190,14 → 210,18
Initialize()
AuraFrame:UnregisterEvent("PLAYER_LOGIN")
elseif event == "PLAYER_REGEN_DISABLED" then
AuraFrame:SetModel(red)
--AuraFrame:SetModel(red)
AuraFrame:SetDisplayInfo(17522)
elseif event == "PLAYER_REGEN_ENABLED" then
AuraFrame:SetModel(blue)
--AuraFrame:SetModel(blue)
AuraFrame:SetDisplayInfo(18075)
elseif event == "PLAYER_UPDATE_RESTING" then
if IsResting() then
AuraFrame:SetModel(green)
--AuraFrame:SetModel(green)
AuraFrame:SetDisplayInfo(17055)
else
AuraFrame:SetModel(blue)
--AuraFrame:SetModel(blue)
AuraFrame:SetDisplayInfo(18075)
end
elseif event == "UPDATE_SHAPESHIFT_FORM" then
local active,stance,_
209,16 → 233,19
end
end
if stance == 1 then
AuraFrame:SetModel(red)
--AuraFrame:SetModel(red)
AuraFrame:SetDisplayInfo(17522)
elseif stance == 2 then
AuraFrame:SetModel(blue)
--AuraFrame:SetModel(blue)
AuraFrame:SetDisplayInfo(18075)
elseif stance == 3 then
AuraFrame:SetModel(green)
--AuraFrame:SetModel(green)
AuraFrame:SetDisplayInfo(17055)
end
end
end)
 
AuraFrame:SetScript("OnAnimFinished", function(self) self:SetSequence(0) end) --loops models that do not do so automatically
--AuraFrame:SetScript("OnAnimFinished", function(self) self:SetSequence(0) end) --loops models that do not do so automatically
AuraFrame:RegisterEvent("PLAYER_LOGIN")
 
--[[ ADDITIONAL MODELS
244,4 → 271,8
AuraFrame:SetModel("SPELLS\\Archimonde_fire.m2") --red one
AuraFrame:SetModel("SPELLS\\Camouflage_base.m2") --swirling autumn leaves (doesn't loop)
AuraFrame:SetModel("SPELLS\\Chargetrail.m2") --twinkling red lights
]]
\ No newline at end of file +AuraFrame:SetModel("WORLD\\Generic\\human\\passive doodads\\fog\\sfx_fog_nasty_purple.m2") (low, swirly fog/smoke) +]] + +--SPELLS\\HOLIDAYS\\Valentines_LookingForLoveHeart.m2 +--SPELLS\\HOLIDAYS\\Valentines_RoseShower_Impact_Base.m2 \ No newline at end of file
trunk/AmbientAura/libs/tekKonfigDropdown.lua
1,5 → 1,5
 
local lib, oldminor = LibStub:NewLibrary("tekKonfig-Dropdown", 2)
local lib, oldminor = LibStub:NewLibrary("tekKonfig-Dropdown", 3)
if not lib then return end
oldminor = oldminor or 0
 
7,11 → 7,12
local GameTooltip = GameTooltip
local function HideTooltip() GameTooltip:Hide() end
local function ShowTooltip(self)
if self.tiptext then
if self.frame.tiptext then
GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT")
GameTooltip:SetText(self.tiptext, nil, nil, nil, nil, true)
GameTooltip:SetText(self.frame.tiptext, nil, nil, nil, nil, true)
end
end
local function ShowTooltip2(self) ShowTooltip(self.container) end
 
 
local function OnClick(self)
25,8 → 26,10
-- Create a dropdown.
-- All args optional, parent recommended
function lib.new(parent, label, ...)
local container = CreateFrame("Frame", nil, parent)
local container = CreateFrame("Button", nil, parent)
container:SetWidth(149+13) container:SetHeight(32+24)
container:SetScript("OnEnter", ShowTooltip)
container:SetScript("OnLeave", HideTooltip)
if select("#", ...) > 0 then container:SetPoint(...) end
 
local name = "tekKonfigDropdown"..GetTime() -- Sadly, some of these frames must be named
35,8 → 38,7
f:SetPoint("TOPLEFT", container, -13, -24)
f:EnableMouse(true)
f:SetScript("OnHide", OnHide)
f:SetScript("OnEnter", ShowTooltip)
f:SetScript("OnLeave", HideTooltip)
container.frame = f
 
local ltex = f:CreateTexture(name.."Left", "ARTWORK")
ltex:SetWidth(25) ltex:SetHeight(64)
44,18 → 46,19
ltex:SetTexture("Interface\\Glues\\CharacterCreate\\CharacterCreate-LabelFrame")
ltex:SetTexCoord(0, 0.1953125, 0, 1)
 
local rtex = f:CreateTexture(nil, "ARTWORK")
rtex:SetWidth(25) rtex:SetHeight(64)
rtex:SetPoint("RIGHT")
rtex:SetTexture("Interface\\Glues\\CharacterCreate\\CharacterCreate-LabelFrame")
rtex:SetTexCoord(0.8046875, 1, 0, 1)
 
local mtex = f:CreateTexture(nil, "ARTWORK")
mtex:SetWidth(115) mtex:SetHeight(64)
mtex:SetPoint("LEFT", ltex, "RIGHT")
mtex:SetPoint("RIGHT", rtex, "LEFT")
mtex:SetTexture("Interface\\Glues\\CharacterCreate\\CharacterCreate-LabelFrame")
mtex:SetTexCoord(0.1953125, 0.8046875, 0, 1)
 
local rtex = f:CreateTexture(nil, "ARTWORK")
rtex:SetWidth(25) rtex:SetHeight(64)
rtex:SetPoint("LEFT", mtex, "RIGHT")
rtex:SetTexture("Interface\\Glues\\CharacterCreate\\CharacterCreate-LabelFrame")
rtex:SetTexCoord(0.8046875, 1, 0, 1)
 
local text = f:CreateFontString(name.."Text", "ARTWORK", "GameFontHighlightSmall")
text:SetWidth(0) text:SetHeight(10)
text:SetPoint("RIGHT", rtex, -43, 2)
65,6 → 68,8
button:SetWidth(24) button:SetHeight(24)
button:SetPoint("TOPRIGHT", rtex, -16, -18)
button:SetScript("OnClick", OnClick)
button:SetScript("OnEnter", ShowTooltip2)
button.container = container
 
button:SetNormalTexture("Interface\\ChatFrame\\UI-ChatIcon-ScrollDown-Up")
button:SetPushedTexture("Interface\\ChatFrame\\UI-ChatIcon-ScrollDown-Down")
73,9 → 78,9
button:GetHighlightTexture():SetBlendMode("ADD")
 
local labeltext = f:CreateFontString(nil, "BACKGROUND", "GameFontNormal")--GameFontHighlight
labeltext:SetPoint("BOTTOMLEFT", f, "TOPLEFT", 16, 3)
labeltext:SetPoint("BOTTOMLEFT", container, "TOPLEFT", 16-13, 3-24)
labeltext:SetText(label)
 
return f, text, container
return f, text, container, labeltext
end
 
trunk/AmbientAura/AmbientAura.toc
1,7 → 1,7
## Interface: 30100
## Interface: 40000
## Title: AmbientAura
## Author: Seerah
## Version: 1.1.1
## Version: 1.2
## Notes: Creates a swirly fog effect along the bottom of your screen, colored by combat/resting status.
## SavedVariablesPerCharacter: AmbientAuraDB
 
trunk/AmbientAura Property changes : Added: svn:ignore + Redradiationfog.m2