Quantcast
--[[
##############################################################################
_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__      #
  __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____     #
   ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____    #
    ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____   #
     _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____  #
      __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ #
       _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_#
        ___\///////////___________\///___________\/////////_____\///////////_#
##############################################################################
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 pairs     = _G.pairs;
--[[
##########################################################
LOCALIZED GLOBALS
##########################################################
]]--
local SVUI_CLASS_COLORS = _G.SVUI_CLASS_COLORS
local RAID_CLASS_COLORS = _G.RAID_CLASS_COLORS
--[[
##########################################################
GET ADDON DATA
##########################################################
]]--
local SV, L = unpack(select(2, ...));
local scc = SVUI_CLASS_COLORS[SV.class];
local rcc = RAID_CLASS_COLORS[SV.class];
local r2 = .1 + (rcc.r * .1)
local g2 = .1 + (rcc.g * .1)
local b2 = .1 + (rcc.b * .1)
--[[
##########################################################
LAYOUT PRESETS
##########################################################
]]--
local presets = {
	["units"] = {
		["link"] = "SVUnit",
		["default"] = {
			["player"] = {
				width = 215,
				height = 60,
				portrait = {
					enable = true,
					overlay = true,
					style = "3D",
				}
			},
			["target"] = {
				width = 215,
				height = 60,
				portrait = {
					enable = true,
					overlay = true,
					style = "3D",
				}
			},
			["pet"] = {
				width = 130,
				height = 30,
				portrait = {
					enable = true,
					overlay = true,
					style = "3D",
				},
				name = {
					position = "CENTER"
				},
			},
			["targettarget"] = {
				width = 130,
				height = 30,
				portrait = {
					enable = true,
					overlay = true,
					style = "3D",
				},
				name = {
					position = "CENTER"
				},
			},
			["boss"] = {
				width = 200,
				height = 45,
				portrait = {
					enable = true,
					overlay = true,
					style = "3D",
				}
			},
			["party"] = {
				width = 75,
				height = 60,
				wrapXOffset = 9,
				wrapYOffset = 13,
				portrait = {
					enable = true,
					overlay = true,
					style = "3D",
				},
				name = {
					position = "INNERTOPLEFT"
				},
			},
			["raid10"] = {
				width = 50,
				height = 30,
				wrapXOffset = 6,
				wrapYOffset = 6,
			},
			["raid25"] = {
				width = 50,
				height = 30,
				wrapXOffset = 6,
				wrapYOffset = 6,
			},
			["raid40"] = {
				width = 50,
				height = 30,
				wrapXOffset = 6,
				wrapYOffset = 6,
			},
		},
		["super"] = {
			["player"] = {
				width = 215,
				height = 60,
				portrait = {
					enable = true,
					overlay = true,
					style = "3D",
				}
			},
			["target"] = {
				width = 215,
				height = 60,
				portrait = {
					enable = true,
					overlay = true,
					style = "3D",
				}
			},
			["pet"] = {
				width = 150,
				height = 30,
				portrait = {
					enable = true,
					overlay = true,
					style = "3D",
				},
				name = {
					position = "CENTER"
				},
			},
			["targettarget"] = {
				width = 150,
				height = 30,
				portrait = {
					enable = true,
					overlay = true,
					style = "3D",
				},
				name = {
					position = "CENTER"
				},
			},
			["boss"] = {
				width = 200,
				height = 45,
				portrait = {
					enable = true,
					overlay = true,
					style = "3D",
				}
			},
			["party"] = {
				width = 75,
				height = 60,
				wrapXOffset = 9,
				wrapYOffset = 13,
				portrait = {
					enable = true,
					overlay = true,
					style = "3D",
				},
				name = {
					position = "INNERTOPLEFT"
				},
			},
			["raid10"] = {
				width = 50,
				height = 30,
				wrapXOffset = 6,
				wrapYOffset = 6,
			},
			["raid25"] = {
				width = 50,
				height = 30,
				wrapXOffset = 6,
				wrapYOffset = 6,
			},
			["raid40"] = {
				width = 50,
				height = 30,
				wrapXOffset = 6,
				wrapYOffset = 6,
			},
		},
		["simple"] = {
			["player"] = {
				width = 215,
				height = 60,
				portrait = {
					enable = true,
					overlay = false,
					style = "2D",
					width = 60,
				}
			},
			["target"] = {
				width = 215,
				height = 60,
				portrait = {
					enable = true,
					overlay = false,
					style = "2D",
					width = 60,
				}
			},
			["pet"] = {
				width = 150,
				height = 30,
				portrait = {
					enable = true,
					overlay = false,
					style = "2D",
					width = 30,
				},
				name = {
					position = "INNERLEFT"
				},
			},
			["targettarget"] = {
				width = 150,
				height = 30,
				portrait = {
					enable = true,
					overlay = false,
					style = "2D",
					width = 30,
				},
				name = {
					position = "INNERLEFT"
				},
			},
			["boss"] = {
				width = 200,
				height = 45,
				portrait = {
					enable = true,
					overlay = false,
					style = "2D",
					width = 45,
				}
			},
			["party"] = {
				width = 100,
				height = 35,
				wrapXOffset = 9,
				wrapYOffset = 13,
				portrait = {
					enable = true,
					overlay = false,
					style = "2D",
					width = 35,
				},
				name = {
					position = "INNERRIGHT"
				},
			},
			["raid10"] = {
				width = 50,
				height = 30,
				wrapXOffset = 6,
				wrapYOffset = 6,
			},
			["raid25"] = {
				width = 50,
				height = 30,
				wrapXOffset = 6,
				wrapYOffset = 6,
			},
			["raid40"] = {
				width = 50,
				height = 30,
				wrapXOffset = 6,
				wrapYOffset = 6,
			},
		},
		["compact"] = {
			["player"] = {
				width = 215,
				height = 50,
				portrait = {
					enable = false
				}
			},
			["target"] = {
				width = 215,
				height = 50,
				portrait = {
					enable = false
				}
			},
			["pet"] = {
				width = 130,
				height = 30,
				portrait = {
					enable = false
				},
				name = {
					position = "CENTER"
				},
			},
			["targettarget"] = {
				width = 130,
				height = 30,
				portrait = {
					enable = false
				},
				name = {
					position = "CENTER"
				},
			},
			["boss"] = {
				width = 200,
				height = 45,
				portrait = {
					enable = false
				}
			},
			["party"] = {
				width = 70,
				height = 30,
				wrapXOffset = 9,
				wrapYOffset = 13,
				portrait = {
					enable = false
				},
				name = {
					position = "INNERTOPLEFT"
				},
			},
			["raid10"] = {
				width = 50,
				height = 30,
				wrapXOffset = 6,
				wrapYOffset = 6,
			},
			["raid25"] = {
				width = 50,
				height = 30,
				wrapXOffset = 6,
				wrapYOffset = 6,
			},
			["raid40"] = {
				width = 50,
				height = 30,
				wrapXOffset = 6,
				wrapYOffset = 6,
			},
		},
	}
};