Added config options for choosing/forcing ideal gems to obey socket colors
Kevin Lyles [11-21-09 - 04:29]
Added config options for choosing/forcing ideal gems to obey socket colors
diff --git a/config.xml b/config.xml
index 96f1613..8376f9b 100644
--- a/config.xml
+++ b/config.xml
@@ -201,6 +201,88 @@
</OnShow>
</Scripts>
</CheckButton>
+ <CheckButton name="$parentObeySocketColors" parentKey="obeySocketColors" inherits="UICheckButtonTemplate" text="Obey socket colors">
+ <Size>
+ <AbsDimension x="25" y="25"/>
+ </Size>
+ <Anchors>
+ <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentHideTooltipHints"/>
+<!-- <Offset>
+ <AbsDimension x="10" y="-10"/>
+ </Offset>
+ </Anchor>-->
+ </Anchors>
+ <Scripts>
+ <OnClick>
+ if self:GetChecked() then
+ ww_vars.options.breakSocketColors = false
+ self:GetParent().alwaysObeySocketColors:Enable()
+ else
+ ww_vars.options.breakSocketColors = true
+ self:GetParent().alwaysObeySocketColors:Disable()
+ end
+ ww_weightIdealCache = {}
+ </OnClick>
+ <OnEnter>
+ GameTooltip:SetOwner(self,"ANCHOR_RIGHT")
+ GameTooltip:AddLine("Chooses ideal gems that obey their socket color (even if that gives a lower overall score)", 1, 1, 1)
+ GameTooltip:Show()
+ </OnEnter>
+ <OnLeave>
+ GameTooltip:Hide()
+ </OnLeave>
+ <OnLoad>
+ getglobal(self:GetName() .. "Text"):SetText(self:GetText())
+ </OnLoad>
+ <OnShow>
+ self:SetChecked(not ww_vars.options.breakSocketColors)
+ </OnShow>
+ </Scripts>
+ </CheckButton>
+ <CheckButton name="$parentAlwaysObeySocketColors" parentKey="alwaysObeySocketColors" inherits="UICheckButtonTemplate" text="Even if the socket bonus is worthless">
+ <Size>
+ <AbsDimension x="25" y="25"/>
+ </Size>
+ <Anchors>
+ <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentObeySocketColors"/>
+ </Anchors>
+ <Scripts>
+ <OnClick>
+ if self:GetChecked() then
+ ww_vars.options.neverBreakSocketColors = true
+ else
+ ww_vars.options.neverBreakSocketColors = false
+ end
+ ww_weightIdealCache = {}
+ </OnClick>
+ <OnDisable>
+ self.text:SetTextColor(0.5, 0.5, 0.5)
+ </OnDisable>
+ <OnEnable>
+ self.text:SetTextColor(1, 0.82, 0)
+ </OnEnable>
+ <OnEnter>
+ GameTooltip:SetOwner(self,"ANCHOR_RIGHT")
+ GameTooltip:AddLine("Forces ideal gems to obey their socket color (even if the socket bonus has a 0 or negative score for that weight)", 1, 1, 1)
+ GameTooltip:Show()
+ </OnEnter>
+ <OnLeave>
+ GameTooltip:Hide()
+ </OnLeave>
+ <OnLoad>
+ self.text = getglobal(self:GetName() .. "Text")
+ self.text:SetText(self:GetText())
+ </OnLoad>
+ <OnShow>
+ self:SetChecked(ww_vars.options.neverBreakSocketColors)
+ if ww_vars.options.breakSocketColors then
+ self:Disable()
+ else
+ self:Enable()
+ end
+ </OnShow>
+ </Scripts>
+ </CheckButton>
</Frames>
<Scripts>
<OnLoad>