From 549b04ce7808fb87ab6b2c3001c28fb61b50b806 Mon Sep 17 00:00:00 2001 From: Bunny67 Date: Fri, 31 Jul 2020 18:42:48 +0300 Subject: [PATCH] StopMotion --- WeakAuras/Media/Textures/StopMotion.blp | Bin 0 -> 263316 bytes WeakAuras/RegionTypes/StopMotion.lua | 375 ++++++++++++++++ WeakAuras/Types.lua | 24 + WeakAuras/WeakAuras.toc | 1 + WeakAurasOptions/RegionOptions/StopMotion.lua | 414 ++++++++++++++++++ WeakAurasOptions/WeakAurasOptions.toc | 1 + 6 files changed, 815 insertions(+) create mode 100644 WeakAuras/Media/Textures/StopMotion.blp create mode 100644 WeakAuras/RegionTypes/StopMotion.lua create mode 100644 WeakAurasOptions/RegionOptions/StopMotion.lua diff --git a/WeakAuras/Media/Textures/StopMotion.blp b/WeakAuras/Media/Textures/StopMotion.blp new file mode 100644 index 0000000000000000000000000000000000000000..eea4ad9e05e1fa794e07208de899e3650bc04576 GIT binary patch literal 263316 zcmeFae^gs%n&&Byg#(hOk-&eAb2^d`cI;An4aj}Y&cR6x5=l?3J6muC@n&oiBMCd* zQ{E{9GL^EaQ~+V8&g`6RV&kM{sM-=ggsJMCb6kmyNvgU7j(=r${_yGU#Acb=U^|YX zde0fp)bW(VexLWf@72{6*s1QBa7A9}9K;1|^m)F|`@Z*HiTm04&F3rfEEY@tWB8a) zpI9t^u?CO-sM|mKKln%ecKMHG1!M(e1!M(e1!M(e1!M(e1!M(e1!M(e1!M(e1!M(e z1!M(e1!M(e1!M(e1!M(e1!M(e1!M(e1!M(e1!M(e1!M(e1!M)jUKOwxSS*U7j0)-t zR<XwD|d4e>C#*{L}oyj5kfW+W1fN@thQdm)Z8HmiGng6X=gF@oh^V>zA%qKkS<7$a?7X9D{%auVE#*{^Ny8TEc9M*ar+=}%dRL#wSK>8w^;O( z|0T9Qgm;UdH~Zr^iC0nj#q)dx+x??relK>;mDM>E8C{8}ERhy5E(>&+=~_>=O0;dw%@T zD7MY^n8{!4{4*_o>VD57_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t!P(t0jvK+}*W_<*!5J)YPR;)h`d{X^@)k}1Q~r%BF@K5wrou1z z-_5jR61eOimGf^h!GGQ$kAElcFntw%sr3Ib%pYA{E6{%~@zeQ0n*Z`>f6T|1n~Z_0 zcZokQFDt8+->%{JAb;>H^B?tpW5>$ve;WUczbuRK5Adxf?j7)7)bLNr`IkrW`!RnW zs{Lfej{h|{U(5WN$luRz0RNT0ev|kI`R%qIE-<-Sn*Yl&|9u&Lsmy=DmC7Gy{`>~} zCC{oO>o+U-xUVC}Y1Hp2yuOWtmGH}tF#8p&_-Q|vJEG>#;lit!pJsoDihnQ0M_@F< z-;U$1hRAWkgwe_Y`}5&#+Ur@>E}PyM~>y!SIaZ;sr$b?hJSVUf0_y3msItC zJJvUWW0AaRy)c`?*SAaU!$R<>`EQ{fBZdh7ERNe%^;zosrP|+rg#Ndv_~_ru2UPrY zeZQLdQ!Nku^XL`OE1*|EuYg_wy#jg#^a|(|&?}%wPa literal 0 HcmV?d00001 diff --git a/WeakAuras/RegionTypes/StopMotion.lua b/WeakAuras/RegionTypes/StopMotion.lua new file mode 100644 index 0000000..bc199a0 --- /dev/null +++ b/WeakAuras/RegionTypes/StopMotion.lua @@ -0,0 +1,375 @@ +if not WeakAuras.IsCorrectVersion() then return end +local AddonName, Private = ... + +local texture_types = WeakAuras.StopMotion.texture_types; +local texture_data = WeakAuras.StopMotion.texture_data; +local animation_types = WeakAuras.StopMotion.animation_types; +local L = WeakAuras.L; + +local default = { + foregroundTexture = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\StopMotion", + backgroundTexture = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\StopMotion", + desaturateBackground = false, + desaturateForeground = false, + sameTexture = true, + width = 128, + height = 128, + foregroundColor = {1, 1, 1, 1}, + backgroundColor = {0.5, 0.5, 0.5, 0.5}, + blendMode = "BLEND", + rotation = 0, + discrete_rotation = 0, + mirror = false, + rotate = true, + selfPoint = "CENTER", + anchorPoint = "CENTER", + anchorFrameType = "SCREEN", + xOffset = 0, + yOffset = 0, + frameStrata = 1, + startPercent = 0, + endPercent = 1, + backgroundPercent = 1, + frameRate = 15, + animationType = "progress", + inverse = false, + customForegroundFrames = 0, + customForegroundRows = 16, + customForegroundColumns = 16, + customBackgroundFrames = 0, + customBackgroundRows = 16, + customBackgroundColumns = 16, + hideBackground = true +}; + +local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20; + +local properties = { + desaturateForeground = { + display = L["Desaturate Foreground"], + setter = "SetForegroundDesaturated", + type = "bool", + }, + desaturateBackground = { + display = L["Desaturate Background"], + setter = "SetBackgroundDesaturated", + type = "bool", + }, + foregroundColor = { + display = L["Foreground Color"], + setter = "Color", + type = "color" + }, + backgroundColor = { + display = L["Background Color"], + setter = "SetBackgroundColor", + type = "color" + }, + width = { + display = L["Width"], + setter = "SetRegionWidth", + type = "number", + min = 1, + softMax = screenWidth, + bigStep = 1, + }, + height = { + display = L["Height"], + setter = "SetRegionHeight", + type = "number", + min = 1, + softMax = screenHeight, + bigStep = 1 + }, +} + +WeakAuras.regionPrototype.AddProperties(properties, default); + +local function create(parent) + local frame = CreateFrame("FRAME", nil, UIParent); + frame:SetMovable(true); + frame:SetResizable(true); + frame:SetMinResize(1, 1); + + local background = frame:CreateTexture(nil, "BACKGROUND"); + frame.background = background; + background:SetAllPoints(frame); + + local foreground = frame:CreateTexture(nil, "ART"); + frame.foreground = foreground; + foreground:SetAllPoints(frame); + + WeakAuras.regionPrototype.create(frame); + + return frame; +end + +local function SetTextureViaAtlas(self, texture) + self:SetTexture(texture); +end + +local function setTile(texture, frame, rows, columns ) + frame = frame - 1; + local row = floor(frame / columns); + local column = frame % columns; + + local deltaX = 1 / columns; + local deltaY = 1 / rows; + + local left = deltaX * column; + local right = left + deltaX; + + local top = deltaY * row; + local bottom = top + deltaY; + + texture:SetTexCoord(left, right, top, bottom); +end + +WeakAuras.setTile = setTile; + +local function SetFrameViaAtlas(self, texture, frame) + setTile(self, frame, self.rows, self.columns); +end + +local function SetTextureViaFrames(self, texture) + self:SetTexture(texture .. format("%03d", 0)); + self:SetTexCoord(0, 1, 0, 1); +end + +local function SetFrameViaFrames(self, texture, frame) + self:SetTexture(texture .. format("%03d", frame)); +end + +local function modify(parent, region, data) + WeakAuras.regionPrototype.modify(parent, region, data); + + local tdata = texture_data[data.foregroundTexture]; + if (tdata) then + local lastFrame = tdata.count - 1; + region.startFrame = floor( (data.startPercent or 0) * lastFrame) + 1; + region.endFrame = floor( (data.endPercent or 1) * lastFrame) + 1; + region.foreground.rows = tdata.rows; + region.foreground.columns = tdata.columns; + else + local lastFrame = (data.customForegroundFrames or 256) - 1; + region.startFrame = floor( (data.startPercent or 0) * lastFrame) + 1; + region.endFrame = floor( (data.endPercent or 1) * lastFrame) + 1; + region.foreground.rows = data.customForegroundRows; + region.foreground.columns = data.customForegroundColumns; + end + + local backgroundTexture = data.sameTexture + and data.foregroundTexture + or data.backgroundTexture; + + local tbdata = texture_data[backgroundTexture]; + if (tbdata) then + local lastFrame = tbdata.count - 1; + region.backgroundFrame = floor( (data.backgroundPercent or 1) * lastFrame + 1); + region.background.rows = tbdata.rows; + region.background.columns = tbdata.columns; + else + local lastFrame = (data.sameTexture and data.customForegroundFrames + or data.customBackgroundFrames or 256) - 1; + region.backgroundFrame = floor( (data.backgroundPercent or 1) * lastFrame + 1); + region.background.rows = data.sameTexture and data.customForegroundRows + or data.customBackgroundRows; + region.background.columns = data.sameTexture and data.customForegroundColumns + or data.customBackgroundColumns; + end + + if (region.foreground.rows and region.foreground.columns) then + region.foreground.SetBaseTexture = SetTextureViaAtlas; + region.foreground.SetFrame = SetFrameViaAtlas; + else + region.foreground.SetBaseTexture = SetTextureViaFrames; + region.foreground.SetFrame = SetFrameViaFrames; + end + + if (region.background.rows and region.background.columns) then + region.background.SetBaseTexture = SetTextureViaAtlas; + region.background.SetFrame = SetFrameViaAtlas; + else + region.background.SetBaseTexture = SetTextureViaFrames; + region.background.SetFrame = SetFrameViaFrames; + end + + + region.background:SetBaseTexture(backgroundTexture); + region.background:SetFrame(backgroundTexture, region.backgroundFrame or 1); + region.background:SetDesaturated(data.desaturateBackground) + region.background:SetVertexColor(data.backgroundColor[1], data.backgroundColor[2], data.backgroundColor[3], data.backgroundColor[4]); + region.background:SetBlendMode(data.blendMode); + + if (data.hideBackground) then + region.background:Hide(); + else + region.background:Show(); + end + + region.foreground:SetBaseTexture(data.foregroundTexture); + region.foreground:SetFrame(data.foregroundTexture, 1); + region.foreground:SetDesaturated(data.desaturateForeground); + region.foreground:SetBlendMode(data.blendMode); + + region:SetWidth(data.width); + region:SetHeight(data.height); + region.width = data.width; + region.height = data.height; + region.scalex = 1; + region.scaley = 1; + + function region:Scale(scalex, scaley) + region.scalex = scalex; + region.scaley = scaley; + if(scalex < 0) then + region.mirror_h = true; + scalex = scalex * -1; + else + region.mirror_h = nil; + end + region:SetWidth(region.width * scalex); + if(scaley < 0) then + scaley = scaley * -1; + region.mirror_v = true; + else + region.mirror_v = nil; + end + region:SetHeight(region.height * scaley); + end + + function region:Color(r, g, b, a) + region.color_r = r; + region.color_g = g; + region.color_b = b; + region.color_a = a; + if (r or g or b) then + a = a or 1; + end + region.foreground:SetVertexColor(region.color_anim_r or r, region.color_anim_g or g, region.color_anim_b or b, region.color_anim_a or a); + end + + function region:ColorAnim(r, g, b, a) + region.color_anim_r = r; + region.color_anim_g = g; + region.color_anim_b = b; + region.color_anim_a = a; + if (r or g or b) then + a = a or 1; + end + region.foreground:SetVertexColor(r or region.color_r, g or region.color_g, b or region.color_b, a or region.color_a); + end + + function region:GetColor() + return region.color_r or data.color[1], region.color_g or data.color[2], + region.color_b or data.color[3], region.color_a or data.color[4]; + end + + region:Color(data.foregroundColor[1], data.foregroundColor[2], data.foregroundColor[3], data.foregroundColor[4]); + + function region:PreShow() + region.startTime = GetTime(); + end + + local function onUpdate() + if (not region.startTime) then return end + + WeakAuras.StartProfileAura(region.id); + WeakAuras.StartProfileSystem("stopmotion") + local timeSinceStart = (GetTime() - region.startTime); + local newCurrentFrame = floor(timeSinceStart * (data.frameRate or 15)); + if (newCurrentFrame == region.currentFrame) then + WeakAuras.StopProfileAura(region.id); + WeakAuras.StopProfileSystem("stopmotion") + return; + end + + region.currentFrame = newCurrentFrame; + + local frames; + local startFrame = region.startFrame; + local endFrame = region.endFrame; + local inverse = data.inverse; + if (endFrame >= startFrame) then + frames = endFrame - startFrame + 1; + else + frames = startFrame - endFrame + 1; + startFrame, endFrame = endFrame, startFrame; + inverse = not inverse; + end + + local frame = 0; + if (data.animationType == "loop") then + frame = (newCurrentFrame % frames) + startFrame; + elseif (data.animationType == "bounce") then + local direction = floor(newCurrentFrame / frames) % 2; + if (direction == 0) then + frame = (newCurrentFrame % frames) + startFrame; + else + frame = endFrame - (newCurrentFrame % frames); + end + elseif (data.animationType == "once") then + frame = newCurrentFrame + startFrame + if (frame > endFrame) then + frame = endFrame; + end + elseif (data.animationType == "progress") then + if (not region.state) then + -- Do nothing + elseif (region.state.progressType == "static") then + local value = region.state.value or 0 + local total = region.state.total ~= 0 and region.state.total or 1 + frame = floor((frames - 1) * value / total) + startFrame; + else + local remaining = region.state.expirationTime and (region.state.expirationTime - GetTime()) or 0; + local progress = region.state.duration and region.state.duration > 0 and (1 - (remaining / region.state.duration)) or 0; + frame = floor( (frames - 1) * progress) + startFrame; + end + end + + if (inverse) then + frame = endFrame - frame + startFrame; + end + + if (frame > endFrame) then + frame = endFrame + end + if (frame < startFrame) then + frame = startFrame + end + region.foreground:SetFrame(data.foregroundTexture, frame); + + WeakAuras.StopProfileAura(region.id); + WeakAuras.StopProfileSystem("stopmotion") + end; + + region.FrameTick = onUpdate; + + function region:Update() + onUpdate(); + end + + function region:SetForegroundDesaturated(b) + region.foreground:SetDesaturated(b); + end + + function region:SetBackgroundDesaturated(b) + region.background:SetDesaturated(b); + end + + function region:SetBackgroundColor(r, g, b, a) + region.background:SetVertexColor(r, g, b, a); + end + + function region:SetRegionWidth(width) + region.width = width; + region:Scale(region.scalex, region.scaley); + end + + function region:SetRegionHeight(height) + region.height = height; + region:Scale(region.scalex, region.scaley); + end +end + +WeakAuras.RegisterRegionType("stopmotion", create, modify, default, properties); diff --git a/WeakAuras/Types.lua b/WeakAuras/Types.lua index ae6b35d..2c35999 100644 --- a/WeakAuras/Types.lua +++ b/WeakAuras/Types.lua @@ -2495,6 +2495,30 @@ WeakAuras.reset_ranged_swing_spells = { [75] = true, -- Auto Shot } +WeakAuras.StopMotion = {} +WeakAuras.StopMotion.texture_types = { +} + +WeakAuras.StopMotion.texture_types.Basic = { + ["Interface\\AddOns\\WeakAuras\\Media\\Textures\\StopMotion"] = "Example", +} + +WeakAuras.StopMotion.texture_data = { +} + +WeakAuras.StopMotion.texture_data["Interface\\AddOns\\WeakAuras\\Media\\Textures\\StopMotion"] = { + ["count"] = 64, + ["rows"] = 8, + ["columns"] = 8 +} + +WeakAuras.StopMotion.animation_types = { + loop = L["Loop"], + bounce = L["Forward, Reverse Loop"], + once = L["Forward"], + progress = L["Progress"] +} + if WeakAuras.IsClassic() then local reset_swing_spell_list = { 1464, 8820, 11604, 11605, -- Slam diff --git a/WeakAuras/WeakAuras.toc b/WeakAuras/WeakAuras.toc index 61e222f..52280ea 100644 --- a/WeakAuras/WeakAuras.toc +++ b/WeakAuras/WeakAuras.toc @@ -50,6 +50,7 @@ RegionTypes\Icon.lua RegionTypes\Text.lua RegionTypes\Group.lua RegionTypes\DynamicGroup.lua +RegionTypes\StopMotion.lua RegionTypes\Model.lua # sub region support diff --git a/WeakAurasOptions/RegionOptions/StopMotion.lua b/WeakAurasOptions/RegionOptions/StopMotion.lua new file mode 100644 index 0000000..f3d6fce --- /dev/null +++ b/WeakAurasOptions/RegionOptions/StopMotion.lua @@ -0,0 +1,414 @@ +local L = WeakAuras.L + +local texture_types = WeakAuras.StopMotion.texture_types; +local texture_data = WeakAuras.StopMotion.texture_data; +local animation_types = WeakAuras.StopMotion.animation_types; +local setTile = WeakAuras.setTile; + +local function setTextureFunc(textureWidget, texturePath, textureName) + local data = texture_data[texturePath]; + textureWidget.frameNr = 0; + if (data) then + if (data.rows and data.columns) then + -- Texture Atlas + textureWidget:SetTexture(texturePath, textureName); + + setTile(textureWidget, data.count, data.rows, data.columns); + + textureWidget:SetOnUpdate(function() + textureWidget.frameNr = textureWidget.frameNr + 1; + if (textureWidget.frameNr == data.count) then + textureWidget.frameNr = 1; + end + setTile(textureWidget, textureWidget.frameNr, data.rows, data.columns); + end); + else + -- Numbered Textures + local texture = texturePath .. format("%03d", texture_data[texturePath].count) + textureWidget:SetTexture(texture, textureName) + textureWidget:SetTexCoord(0, 1, 0, 1); + + textureWidget:SetOnUpdate(function() + textureWidget.frameNr = textureWidget.frameNr + 1; + if (textureWidget.frameNr == data.count) then + textureWidget.frameNr = 1; + end + local texture = texturePath .. format("%03d", textureWidget.frameNr) + textureWidget:SetTexture(texture, textureName); + end); + end + else + local texture = texturePath .. format("%03d", 1) + textureWidget:SetTexture(texture, textureName); + end +end + +local function createOptions(id, data) + local options = { + __title = L["Stop Motion Settings"], + __order = 1, + foregroundTexture = { + type = "input", + width = WeakAuras.normalWidth, + name = L["Texture"], + order = 1, + }, + backgroundTexture = { + type = "input", + width = WeakAuras.normalWidth, + name = L["Background Texture"], + order = 5, + disabled = function() return data.sameTexture or data.hideBackground end, + get = function() return data.sameTexture and data.foregroundTexture or data.backgroundTexture; end, + }, + chooseForegroundTexture = { + type = "execute", + width = WeakAuras.normalWidth, + name = L["Choose"], + order = 12, + func = function() + WeakAuras.OpenTexturePicker(data, data, "foregroundTexture", texture_types, setTextureFunc); + end + }, + sameTexture = { + type = "toggle", + width = WeakAuras.halfWidth, + name = L["Same"], + order = 15, + disabled = function() return data.hideBackground; end + }, + chooseBackgroundTexture = { + type = "execute", + width = WeakAuras.halfWidth, + name = L["Choose"], + order = 17, + func = function() + WeakAuras.OpenTexturePick(data, data, "backgroundTexture", texture_types, setTextureFunc); + end, + disabled = function() return data.sameTexture or data.hideBackground; end + }, + desaturateForeground = { + type = "toggle", + width = WeakAuras.normalWidth, + name = L["Desaturate"], + order = 17.5, + }, + desaturateBackground = { + type = "toggle", + name = L["Desaturate"], + order = 17.6, + width = WeakAuras.halfWidth, + disabled = function() return data.hideBackground; end + }, + hideBackground = { + type = "toggle", + name = L["Hide"], + order = 17.65, + width = WeakAuras.halfWidth, + }, + -- Foreground options for custom textures + customForegroundHeader = { + type = "header", + name = L["Custom Foreground"], + order = 17.70, + hidden = function() return texture_data[data.foregroundTexture] end + }, + customForegroundRows = { + type = "range", + width = WeakAuras.normalWidth, + name = L["Rows"], + min = 1, + max = 64, + order = 17.71, + hidden = function() return texture_data[data.foregroundTexture] end + }, + customForegroundColumns = { + type = "range", + width = WeakAuras.normalWidth, + name = L["Columns"], + min = 1, + max = 64, + order = 17.72, + hidden = function() return texture_data[data.foregroundTexture] end + }, + customForegroundFrames = { + type = "range", + width = WeakAuras.normalWidth, + name = L["Frame Count"], + min = 0, + max = 4096, + --bigStep = 0.01, + order = 17.73, + hidden = function() return texture_data[data.foregroundTexture] end + }, + customForegroundSpace = { + type = "execute", + width = WeakAuras.normalWidth, + name = "", + order = 17.74, + image = function() return "", 0, 0 end, + hidden = function() return texture_data[data.foregroundTexture] end + }, + -- Background options for custom textures + customBackgroundHeader = { + type = "header", + name = L["Custom Background"], + order = 18.00, + hidden = function() return data.sameTexture or texture_data[data.backgroundTexture] + or data.hideBackground end + }, + customBackgroundRows = { + type = "range", + width = WeakAuras.normalWidth, + name = L["Rows"], + min = 1, + max = 64, + order = 18.01, + hidden = function() return data.sameTexture or texture_data[data.backgroundTexture] + or data.hideBackground end + }, + customBackgroundColumns = { + type = "range", + width = WeakAuras.normalWidth, + name = L["Columns"], + min = 1, + max = 64, + order = 18.02, + hidden = function() return data.sameTexture or texture_data[data.backgroundTexture] + or data.hideBackground end + }, + customBackgroundFrames = { + type = "range", + width = WeakAuras.normalWidth, + name = L["Frame Count"], + min = 0, + max = 4096, + step = 1, + order = 18.03, + hidden = function() return data.sameTexture or texture_data[data.backgroundTexture] + or data.hideBackground end + }, + customBackgroundSpace = { + type = "execute", + width = WeakAuras.normalWidth, + name = "", + order = 18.04, + image = function() return "", 0, 0 end, + hidden = function() return data.sameTexture or texture_data[data.backgroundTexture] + or data.hideBackground end + }, + blendMode = { + type = "select", + width = WeakAuras.normalWidth, + name = L["Blend Mode"], + order = 20, + values = WeakAuras.blend_types + }, + animationType = { + type = "select", + width = WeakAuras.normalWidth, + name = L["Animation Mode"], + order = 21, + values = animation_types + }, + startPercent = { + type = "range", + width = WeakAuras.normalWidth, + name = L["Animation Start"], + min = 0, + max = 1, + --bigStep = 0.01, + order = 22, + isPercent = true + }, + endPercent = { + type = "range", + width = WeakAuras.normalWidth, + name = L["Animation End"], + min = 0, + max = 1, + --bigStep = 0.01, + order = 23, + isPercent = true + }, + frameRate = { + type = "range", + width = WeakAuras.normalWidth, + name = L["Frame Rate"], + min = 3, + max = 120, + step = 1, + bigStep = 3, + order = 24, + disabled = function() return data.animationType == "progress" end; + }, + backgroundPercent = { + type = "range", + width = WeakAuras.normalWidth, + name = L["Background"], + min = 0, + max = 1, + order = 25, + isPercent = true, + disabled = function() return data.hideBackground; end + }, + foregroundColor = { + type = "color", + width = WeakAuras.normalWidth, + name = L["Foreground Color"], + hasAlpha = true, + order = 30 + }, + backgroundColor = { + type = "color", + width = WeakAuras.normalWidth, + name = L["Background Color"], + hasAlpha = true, + order = 32, + disabled = function() return data.hideBackground; end + }, + inverse = { + type = "toggle", + width = WeakAuras.normalWidth, + name = L["Inverse"], + order = 33 + }, + space3 = { + type = "execute", + width = WeakAuras.normalWidth, + name = "", + order = 36, + image = function() return "", 0, 0 end, + }, + }; + + if WeakAuras.commonOptions then + return { + stopmotion = options, + position = WeakAuras.commonOptions.PositionOptions(id, data, 2), + }; + else + return { + stopmotion = options, + position = WeakAuras.PositionOptions(id, data, 2), + }; + end +end + +local function createThumbnail() + local borderframe = CreateFrame("FRAME", nil, UIParent); + borderframe:SetWidth(32); + borderframe:SetHeight(32); + + local border = borderframe:CreateTexture(nil, "OVERLAY"); + border:SetAllPoints(borderframe); + border:SetTexture("Interface\\BUTTONS\\UI-Quickslot2.blp"); + border:SetTexCoord(0.2, 0.8, 0.2, 0.8); + + local texture = borderframe:CreateTexture(); + borderframe.texture = texture; + texture:SetPoint("CENTER", borderframe, "CENTER"); + + return borderframe; +end + +local function modifyThumbnail(parent, region, data, fullModify, size) + region:SetParent(parent) + + size = size or 30; + local scale; + if(data.height > data.width) then + scale = size/data.height; + region.texture:SetWidth(scale * data.width); + region.texture:SetHeight(size); + else + scale = size/data.width; + region.texture:SetWidth(size); + region.texture:SetHeight(scale * data.height); + end + + local frame = 1; + + local tdata = texture_data[data.foregroundTexture]; + if (tdata) then + local lastFrame = tdata.count - 1; + region.startFrame = floor( (data.startPercent or 0) * lastFrame) + 1; + region.endFrame = floor( (data.endPercent or 1) * lastFrame) + 1; + region.foregroundRows = tdata.rows; + region.foregroundColumns = tdata.columns; + else + local lastFrame = data.customForegroundFrames - 1; + region.startFrame = floor( (data.startPercent or 0) * lastFrame) + 1; + region.endFrame = floor( (data.endPercent or 1) * lastFrame) + 1; + region.foregroundRows = data.customForegroundRows; + region.foregroundColumns = data.customForegroundColumns; + end + + if (region.startFrame and region.endFrame) then + frame = floor(region.startFrame + (region.endFrame - region.startFrame) * 0.75); + end + + local texture = data.foregroundTexture or "Interface\\AddOns\\WeakAuras\\Media\\Textures\\stopmotion"; + + if (region.foregroundRows and region.foregroundColumns) then + region.texture:SetTexture(texture); + setTile(region.texture, frame, region.foregroundRows, region.foregroundColumns); + + region.SetValue = function(self, percent) + local frame = floor(percent * (region.endFrame - region.startFrame) + region.startFrame); + setTile(self.texture, frame, region.foregroundRows, region.foregroundColumns); + end + else + region.texture:SetTexture(texture .. format("%03d", frame)); + region.texture:SetTexCoord(0, 1, 0, 1); + + region.SetValue = function(self, percent) + local frame = floor(percent * (region.endFrame - region.startFrame) + region.startFrame); + self.texture:SetTexture((data.foregroundTexture) .. format("%03d", frame)); + end + end + + region.texture:SetVertexColor(data.foregroundColor[1], data.foregroundColor[2], data.foregroundColor[3], data.foregroundColor[4]); + region.texture:SetBlendMode(data.blendMode); + + region.elapsed = 0; + region:SetScript("OnUpdate", function(self, elapsed) + region.elapsed = region.elapsed + elapsed; + if(region.elapsed > 4) then + region.elapsed = region.elapsed - 4; + end + region:SetValue(region.elapsed / 4); + end); +end + +local function createIcon() + local data = { + height = 30, + width = 30, + foregroundTexture = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\StopMotion", + foregroundColor = {1, 1, 1, 1}, + blendMode = "ADD", + rotate = false, + rotation = 0, + startPercent = 0, + endPercent = 1, + backgroundPercent = 1, + animationType = "progress" + }; + + local thumbnail = createThumbnail(UIParent); + modifyThumbnail(UIParent, thumbnail, data, nil, 75); + + thumbnail.elapsed = 0; + thumbnail:SetScript("OnUpdate", function(self, elapsed) + thumbnail.elapsed = thumbnail.elapsed + elapsed; + if(thumbnail.elapsed > 2) then + thumbnail.elapsed = thumbnail.elapsed - 2; + end + thumbnail:SetValue(thumbnail.elapsed / 2); + end); + + return thumbnail; +end + +WeakAuras.RegisterRegionOptions("stopmotion", createOptions, createIcon, L["Stop Motion"], createThumbnail, modifyThumbnail, L["Shows a stop motion textures"]); diff --git a/WeakAurasOptions/WeakAurasOptions.toc b/WeakAurasOptions/WeakAurasOptions.toc index f90232e..234a415 100644 --- a/WeakAurasOptions/WeakAurasOptions.toc +++ b/WeakAurasOptions/WeakAurasOptions.toc @@ -24,6 +24,7 @@ RegionOptions\Icon.lua RegionOptions\Text.lua RegionOptions\Group.lua RegionOptions\DynamicGroup.lua +RegionOptions\StopMotion.lua RegionOptions\Model.lua RegionOptions\ProgressTexture.lua