Quantcast

Remove AVS from StarTip since it's part of StarVisuals

Scott Sibley [11-01-10 - 20:27]
Remove AVS from StarTip since it's part of StarVisuals
Filename
Modules/AVS/AVS.lua
Modules/AVS/StarTip_AVS.toc
diff --git a/Modules/AVS/AVS.lua b/Modules/AVS/AVS.lua
deleted file mode 100644
index d9f3bd3..0000000
--- a/Modules/AVS/AVS.lua
+++ /dev/null
@@ -1,205 +0,0 @@
-local mod = StarTip:NewModule("AVS")
-mod.name = "AVS"
-mod.toggled = true
-mod.defaultOff = true
-local LibBuffer = LibStub("LibScriptableDisplayBuffer-1.0")
-local LibCore = LibStub("LibScriptableDisplayCore-1.0")
-local LibTimer = LibStub("LibScriptableDisplayTimer-1.0")
-local PluginUtils = LibStub("LibScriptableDisplayPluginUtils-1.0"):New({})
-local AVSSuperScope = LibStub("LibScriptableDisplayAVSSuperScope-1.0")
-local PluginColor = LibStub("LibScriptableDisplayPluginColor-1.0"):New({})
-local _G = _G
-local GameTooltip = _G.GameTooltip
-local StarTip = _G.StarTip
-local UIParent = _G.UIParent
-local textures = {[0] = "Interface\\Addons\\StarTip\\Media\\black.blp", [1] = "Interface\\Addons\\StarTip\\Media\\white.blp"}
-local environment = {}
-local update
-
-local options = {
-}
-
-local foo = 200
-local defaults = {
-	profile = {
-		update = 100,
-		images = {
-			[1] = {
-				name = "Spiral",
-				init = [[
-n=25
-]],
-				frame = [[
-t=t-5
-]],
-				beat = [[
-]],
-				point = [[
-d=i+v*0.2; r=t+i*PI*200; x=cos(r)*d; y=sin(r)*d
-]],
-				width = 24,
-				height = 24,
-				pixel = 4,
-				drawLayer = "UIParent",
-				points = {{"CENTER", "UIParent", "CENTER", 0, -100}},
-				enabled = false
-			},
-			[2] = {
-				name = "Swirlie Dots",
-				init = [[
-n=30;
-t=random(100);
-u=random(100)
-]],
-				frame = [[
-t = t + 150; u = u + 50
-]],
-				beat = [[
-bb = (bb or 0) + 1;
-beatdiv = 16;
-if bb%beatdiv == 0 then
-    n = 32 + random( 30 )
-end
-]],
-				point = [[
-di = ( i - .5) * 2;
-x = di;
-y = cos(u*di) * .6;
-x = x + ( cos(t) * .005 );
-y = y + ( sin(t) * .005 );
-]],
-				width = 32,
-				height = 32,
-				pixel = 4,
-				drawLayer = "UIParent",
-				points = {{"CENTER", "UIParent", "CENTER", 0, 100}},
-				enabled = true
-}
-		}
-	}
-}
-
-function mod:OnInitialize()
-	self.db = StarTip.db:RegisterNamespace(self:GetName(), defaults)
-	StarTip:SetOptionsDisabled(options, true)
-
-	self.timer = LibTimer:New("Images", self.db.profile.update, true, update)
-end
-
-local function copy(tbl)
-	local newTbl = {}
-	for k, v in pairs(tbl) do
-		if type(v) == "table" then
-			v = copy(v)
-		end
-		newTbl[k] = v
-	end
-	return newTbl
-end
-
-local function createImages()
-	if type(mod.images) ~= "table" then mod.images = {} end
-
-	for k, image in pairs(mod.db.profile.images) do
-		if image.enabled then
-			local image = AVSSuperScope:New("image", copy(image), draw)
-			local frame = CreateFrame("Frame")
-			frame:SetParent(UIParent)
-			frame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
-				tile = true,
-				tileSize = 4,
-				edgeSize=4,
-				insets = { left = 0, right = 0, top = 0, bottom = 0}})
-			frame:ClearAllPoints()
-			frame:SetAlpha(1)
-			frame:SetWidth(image.width * image.pixel)
-			frame:SetHeight(image.height * image.pixel)
-			for _, point in ipairs(image.config.points or {{"CENTER", "UIParent", "CENTER"}}) do
-				frame:SetPoint(unpack(point))
-			end
-			frame:Show()
-			image.textures = {}
-			for row = 0, image.height - 1 do
-			for col = 0, image.width - 1 do
-			--for n = 0, image.height * image.width - 1 do
-				--local row, col = PluginUtils.GetCoords(n, image.width)
-				local n = row * image.width + col
-				image.textures[n] = frame:CreateTexture()
-				image.textures[n]:SetHeight(image.pixel)
-				image.textures[n]:SetWidth(image.pixel)
-				image.textures[n]:SetPoint("TOPLEFT", frame, "BOTTOMLEFT", col * image.pixel, (row + 1) * image.pixel)
-				image.textures[n]:SetTexture("Interface\\Tooltips\\UI-Tooltip-Background")
-				image.textures[n]:Show()
-			end
-			end
-			image.canvas = frame
-			tinsert(mod.images, image)
-		end
-	end
-end
-
-function mod:OnEnable()
-	StarTip:SetOptionsDisabled(options, false)
-	createImages()
-	self.timer:Start()
-end
-
-function mod:OnDisable()
-	StarTip:SetOptionsDisabled(options, true)
-	self.timer:Stop()
-	for k, image in pairs(self.images) do
-		image.canvas:Hide()
-	end
-	wipe(self.images)
-end
-
-function mod:GetOptionsbleh()
-	for i, image in ipairs(self.db.profile.images) do
-		options.images.args["Icon"..i] = {
-			enabled = {
-				name = "Enabled",
-				type = "toggle",
-				get = function() return image.enabled end,
-				set = function(info, val) image.enabled = val end,
-				order = 1
-			},
-			speed = {
-				name = "Speed",
-				type = "input",
-				pattern = "%d",
-				get = function() return image.speed end,
-				set = function(info, val) image.speed = val end,
-				order = 2
-			},
-			bitmap = {
-				name = "Bitmap",
-				type = "input",
-				multiline = true,
-				width = "full",
-				get = function() return image.bitmap end,
-				set = function(info, val) image.bitmap = val end,
-				order = 3
-			}
-		}
-	end
-	return options
-end
-
-function mod:ClearImages()
-do return end
-	for k, widget in pairs(mod.images) do
-		widget:Del()
-	end
-	wipe(mod.images)
-end
-
-function update()
-	for i, widget in ipairs(mod.images or {}) do
-		widget.buffer:Clear()
-		widget:Render()
-		for n = 0, widget.height * widget.width - 1 do
-			local color = widget.buffer.buffer[n]
-			widget.textures[n]:SetVertexColor(PluginColor.Color2RGBA(color))
-		end
-	end
-end
diff --git a/Modules/AVS/StarTip_AVS.toc b/Modules/AVS/StarTip_AVS.toc
deleted file mode 100644
index 606b5a0..0000000
--- a/Modules/AVS/StarTip_AVS.toc
+++ /dev/null
@@ -1,8 +0,0 @@
-## Interface: 40000
-## Title: StarTip [AVS]
-## Notes: Tooltips from outerspace
-## Author: Starlon
-## Version: 1.0
-## Deps: StarTip
-
-AVS.lua
\ No newline at end of file