Sort of dry commit of Clamp. I just made sure it didn't cause any errors.
Scott Sibley [08-04-11 - 08:42]
Sort of dry commit of Clamp. I just made sure it didn't cause any errors.
diff --git a/Localization/enUS.lua b/Localization/enUS.lua
index 8644aaf..194301a 100644
--- a/Localization/enUS.lua
+++ b/Localization/enUS.lua
@@ -409,9 +409,9 @@ L["Icon Height"] = true
L["How tall to make the raid icon."] = true
L["Icon Height"] = true
-
-
-
+-- Clamp
+L["Script"] = true
+L["This will be ran when the tooltip shows."] = true
diff --git a/Modules/Appearance/Appearance.lua b/Modules/Appearance/Appearance.lua
index 01e109e..f585773 100644
--- a/Modules/Appearance/Appearance.lua
+++ b/Modules/Appearance/Appearance.lua
@@ -396,8 +396,8 @@ function mod:OnEnable()
local cright = self.db.profile.clampRight
local ctop = self.db.profile.clampTop
local cbottom = self.db.profile.clampBottom
- StarTip.tooltipMain:SetClampRectInsets(cleft, cright, ctop, cbottom)
- StarTip.tooltipMain:SetClampedToScreen(true)
+ --StarTip.tooltipMain:SetClampRectInsets(cleft, cright, ctop, cbottom)
+ --StarTip.tooltipMain:SetClampedToScreen(true)
end
function mod:OnDisable()
diff --git a/Modules/Clamp/Clamp.lua b/Modules/Clamp/Clamp.lua
index 2f2663b..44583b3 100644
--- a/Modules/Clamp/Clamp.lua
+++ b/Modules/Clamp/Clamp.lua
@@ -10,7 +10,10 @@ local Evaluator = LibStub("LibScriptableUtilsEvaluator-1.0")
local defaults = {
profile = {
- script = "return 1, 1, 1, 1",
+ script = [[
+local clampLeft, clampRight, clampTop, clampBottom = 0, 10, 10, 0
+return clampLeft, clampRight, clampTop, clampBottom
+]],
}
}
@@ -54,7 +57,7 @@ function mod:GetOptions()
end
function mod:GameTooltip_SetDefaultAnchor(this, owner)
- local cleft, cright, ctop, cbottom = Evaluator.Execute(StarTip.environment, "StarTip.Clamp", self.db.profile.script)
+ local cleft, cright, ctop, cbottom = Evaluator.ExecuteCode(StarTip.environment, "StarTip.Clamp", self.db.profile.script)
StarTip.tooltipMain:SetClampRectInsets(cleft or 0, cright or 0, ctop or 0, cbottom or 0)
StarTip.tooltipMain:SetClampedToScreen(true)
GameTooltip:SetClampedToScreen(true)