Quantcast

quick fixes

Steven Jackson [07-20-14 - 06:19]
quick fixes
Filename
Interface/AddOns/SVUI/packages/bag/SVBag.lua
Interface/AddOns/SVUI/packages/map/common/mmbar.lua
Interface/AddOns/SVUI/packages/tip/SVTip.lua
Interface/AddOns/SVUI/scripts/_load.xml
Interface/AddOns/SVUI/scripts/pvp.lua
Interface/AddOns/SVUI/system/classes/Database.lua
Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua
diff --git a/Interface/AddOns/SVUI/packages/bag/SVBag.lua b/Interface/AddOns/SVUI/packages/bag/SVBag.lua
index ccda7cd..fbb2050 100644
--- a/Interface/AddOns/SVUI/packages/bag/SVBag.lua
+++ b/Interface/AddOns/SVUI/packages/bag/SVBag.lua
@@ -1076,6 +1076,7 @@ do
 			frame.editBox:SetScript("OnEditFocusGained", frame.editBox.HighlightText)
 			frame.editBox:SetScript("OnTextChanged", Search_OnInput)
 			frame.editBox:SetScript('OnChar', Search_OnInput)
+			frame.editBox.SearchReset = Search_OnKeyPressed
 			frame.editBox:SetText(SEARCH)
 			frame.editBox:SetFontTemplate(SuperVillain.Media.font.roboto)

@@ -1234,6 +1235,7 @@ do
 		MOD.BagFrame:Show()
 		MOD.BagFrame:RefreshBagsSlots()
 		TTIP.GameTooltip_SetDefaultAnchor(GameTooltip)
+		MOD.BagFrame.editBox:SearchReset()
 	end

 	local function CloseBags()
@@ -1249,6 +1251,7 @@ do
 			BreakStuffButton.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1)
 		end
 		TTIP.GameTooltip_SetDefaultAnchor(GameTooltip)
+		MOD.BagFrame.editBox:SearchReset()
 	end

 	local function ToggleBags(id)
diff --git a/Interface/AddOns/SVUI/packages/map/common/mmbar.lua b/Interface/AddOns/SVUI/packages/map/common/mmbar.lua
index fa9dd6a..59f5bcd 100644
--- a/Interface/AddOns/SVUI/packages/map/common/mmbar.lua
+++ b/Interface/AddOns/SVUI/packages/map/common/mmbar.lua
@@ -89,8 +89,8 @@ function MOD:MMBarSetButton(btn)
 				btn.preset.DragEnd=btn:GetScript("OnDragEnd")
 			end;
 			if frame:GetObjectType()=="Texture" then
-				local icon=frame:GetTexture()
-				if icon and icon:find("Border") or icon:find("Background") or icon:find("AlphaMask") then
+				local icon = frame:GetTexture()
+				if icon and icon ~= nil and icon:find("Border") or icon:find("Background") or icon:find("AlphaMask") then
 					frame:SetTexture(nil)
 				else
 					frame:ClearAllPoints()
diff --git a/Interface/AddOns/SVUI/packages/tip/SVTip.lua b/Interface/AddOns/SVUI/packages/tip/SVTip.lua
index 1f0ac6f..40bfeb7 100644
--- a/Interface/AddOns/SVUI/packages/tip/SVTip.lua
+++ b/Interface/AddOns/SVUI/packages/tip/SVTip.lua
@@ -397,7 +397,7 @@ local _hook_GameTooltip_OnTooltipSetUnit = function(self)
 			lvlLine:SetFormattedText("|cff%02x%02x%02x%s|r %s |c%s%s|r", qColor.r * 255, qColor.g * 255, qColor.b * 255, unitLevel > 0 and unitLevel or SKULL_ICON, race or "", colors.colorStr, className)
 		end

-		if MOD.db.inspectInfo and isShiftKeyDown then
+		if MOD.db.inspectInfo or isShiftKeyDown then
 			ShowInspectInfo(self, unit, unitLevel, colors.r, colors.g, colors.b, 0)
 		end
 	else
@@ -650,6 +650,24 @@ local _hook_OnTipShow = function(self)
 	self.SuperBorder[1]:SetSize(widthScale,heightWidth)
 	self.SuperBorder[2]:SetSize(heightScale,heightScale)
 	self.SuperBorder[3]:SetSize(widthScale,heightWidth)
+
+	self:SetBackdrop({
+		bgFile = [[Interface\BUTTONS\WHITE8X8]],
+		edgeFile = [[Interface\BUTTONS\WHITE8X8]],
+		tile = false,
+		edgeSize = 1
+	})
+	self:SetBackdropColor(0, 0, 0, 0)
+	self:SetBackdropBorderColor(0, 0, 0, 0)
+
+	self.SuperBorder:SetBackdrop({
+		bgFile = [[Interface\BUTTONS\WHITE8X8]],
+		edgeFile = [[Interface\BUTTONS\WHITE8X8]],
+		tile = false,
+		edgeSize = 1
+	})
+	self.SuperBorder:SetBackdropColor(0, 0, 0, 0.8)
+	self.SuperBorder:SetBackdropBorderColor(0, 0, 0)
 end

 local _hook_OnItemRef = function(link,text,button,chatFrame)
diff --git a/Interface/AddOns/SVUI/scripts/_load.xml b/Interface/AddOns/SVUI/scripts/_load.xml
index 5cc2910..8effc80 100644
--- a/Interface/AddOns/SVUI/scripts/_load.xml
+++ b/Interface/AddOns/SVUI/scripts/_load.xml
@@ -8,5 +8,5 @@
 	<Script file='totems.lua'/>
 	<Script file='raid.lua'/>
 	<Script file='reactions.lua'/>
-	<!-- <Script file='pvp.lua'/> -->
+	<Script file='pvp.lua'/>
 </Ui>
\ No newline at end of file
diff --git a/Interface/AddOns/SVUI/scripts/pvp.lua b/Interface/AddOns/SVUI/scripts/pvp.lua
index 66fc7d7..9eb63b7 100644
--- a/Interface/AddOns/SVUI/scripts/pvp.lua
+++ b/Interface/AddOns/SVUI/scripts/pvp.lua
@@ -203,24 +203,17 @@ local function LoadPVPComm()

 	local width = holder:GetWidth()
 	local height = holder:GetHeight()
-	local sectionWidth = (width / 3) - 2
+	local sectionWidth = (width / 6) - 2
 	local sectionHeight = (height / 5) - 2

 	for i = 1, 5 do
-		local yOffset = (24 * (i - 1)) + 2
+		local yOffset = (sectionHeight * (i - 1)) + 2

 		local poiName = ("SVUI_PVPNode%d"):format(i)
 		local poi = CreateFrame("Frame", poiName, holder)
 		poi:SetSize((width - 2), sectionHeight)
 		poi:SetPoint("TOP", holder, "TOP", 0, -yOffset)
 		poi:SetPanelTemplate("Transparent")
-		poi.Text = poi:CreateFontString(nil,"OVERLAY")
-		poi.Text:SetFont(SuperVillain.Media.font.roboto, 12, "NONE")
-		poi.Text:SetPoint("LEFT", poi, "LEFT", 2, 0)
-		poi.Text:SetHeight(sectionHeight)
-		poi.Text:SetWidth(sectionWidth)
-		poi.Text:SetJustifyH("CENTER")
-		poi.Text:SetText("")

 		local safe = CreateFrame("Button", nil, poi)
 		safe:SetSize(sectionWidth, sectionHeight)
@@ -228,7 +221,8 @@ local function LoadPVPComm()
 		safe:SetButtonTemplate()
 		safe:SetPanelColor("green")
 		local sicon = safe:CreateTexture(nil, "OVERLAY")
-		sicon:SetAllPoints(safe)
+		sicon:SetPoint("CENTER", safe, "CENTER", 0, 0)
+		sicon:SetSize(sectionHeight,sectionHeight)
 		sicon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
 		sicon:SetTexture(PVP_SAFE)
 		safe:SetScript("OnEnter", Safe_OnEnter)
@@ -243,7 +237,8 @@ local function LoadPVPComm()
 		help:SetButtonTemplate()
 		help:SetPanelColor("red")
 		local hicon = help:CreateTexture(nil, "OVERLAY")
-		hicon:SetAllPoints(help)
+		hicon:SetPoint("CENTER", help, "CENTER", 0, 0)
+		hicon:SetSize(sectionHeight,sectionHeight)
 		hicon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
 		hicon:SetTexture(PVP_HELP)
 		help:SetScript("OnEnter", Help_OnEnter)
@@ -251,8 +246,16 @@ local function LoadPVPComm()
 		help:SetScript("OnClick", Help_OnClick)

 		poi.Help = help
+
+		poi.Text = poi:CreateFontString(nil,"OVERLAY")
+		poi.Text:SetFont(SuperVillain.Media.font.roboto, 12, "NONE")
+		poi.Text:SetPoint("TOPLEFT", poi, "TOPLEFT", 2, 0)
+		poi.Text:SetPoint("BOTTOMRIGHT", help, "BOTTOMLEFT", -2, 0)
+		poi.Text:SetJustifyH("CENTER")
+		poi.Text:SetText("")
 	end
-	SuperVillain:SetSVMovable(holder, "SVUI_PVPComm_MOVE", L["PvP Communicator"])
+
+	holder:Hide()

 	local docklet = _G["SVUI_PVPComm_ToolBarButton"]
 	docklet.Enable = DOCK.AddTool
diff --git a/Interface/AddOns/SVUI/system/classes/Database.lua b/Interface/AddOns/SVUI/system/classes/Database.lua
index e3522e9..1d98f74 100644
--- a/Interface/AddOns/SVUI/system/classes/Database.lua
+++ b/Interface/AddOns/SVUI/system/classes/Database.lua
@@ -798,7 +798,7 @@ local DatabaseDefaults = {
 		["targetInfo"] = true,
 		["playerTitles"] = true,
 		["guildRanks"] = true,
-		["inspectInfo"] = true,
+		["inspectInfo"] = false,
 		["itemCount"] = true,
 		["spellID"] = false,
 		["progressInfo"] = true,
diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua
index bdb9808..efcdb08 100644
--- a/Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua
+++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua
@@ -92,7 +92,7 @@ SuperVillain.Options.args.SVTip = {
 							name = L["Guild Ranks"],
 							desc = L["Display guild ranks if a unit is guilded."]
 						},
-						talentInfo = {
+						inspectInfo = {
 							order = 5,
 							type = "toggle",
 							name = L["Talent Spec"],