Added setting for font size
kibsgaard [11-04-14 - 16:56]
Added setting for font size
Signed-off-by: kibsgaard <kibsgaard@curseforge.com>
diff --git a/KibsItemLevel.lua b/KibsItemLevel.lua
index 6bc8c72..326b479 100644
--- a/KibsItemLevel.lua
+++ b/KibsItemLevel.lua
@@ -14,7 +14,7 @@ local ItemUpgradeInfo = LibStub("LibItemUpgradeInfo-1.0");
local ilvlFrame = CreateFrame("frame");
local iconSize = 16;
local iconOffset = 18;
-local fontStyle = "SystemFont_Small";
+local fontStyle = "SystemFont_Med1";
local UpdateInProgress = false;
local UpdateInProgressInspect = false;
ilvlFrame:RegisterEvent("VARIABLES_LOADED");
@@ -66,6 +66,7 @@ local KibsItemLevelConfig_defaultUpgrades = false;
local KibsItemLevelConfig_defaultCharacter = true;
local KibsItemLevelConfig_defaultInspection = true;
local KibsItemLevelConfig_defaultColor = true;
+local KibsItemLevelConfig_defaultSmall = false;
local emptySockets = { ["Meta "] = "INTERFACE/ITEMSOCKETINGFRAME/UI-EmptySocket-Meta",
["Red "] = "INTERFACE/ITEMSOCKETINGFRAME/UI-EmptySocket-Red",
@@ -92,8 +93,7 @@ local enchantableItems={ [ 1 ] = nil,
[ 17 ] = true };
function KibsItemLevel_OnLoad()
- createFontStrings();
- createInspectFontStrings();
+
end
@@ -230,6 +230,9 @@ function KibsItemLevelFrame_VARIABLES_LOADED()
if (KibsItemLevelConfig.Inspection == nil) then
KibsItemLevelConfig.Inspection = KibsItemLevelConfig_defaultInspection;
end
+ if (KibsItemLevelConfig.Small == nil) then
+ KibsItemLevelConfig.Small = KibsItemLevelConfig_defaultSmall;
+ end
local ConfigPanel = CreateFrame("Frame", "KibsItemLevelConfigPanel", UIParent);
ConfigPanel.name = "Kibs Item Level";
@@ -258,6 +261,17 @@ function KibsItemLevelFrame_VARIABLES_LOADED()
_G[b3:GetName() .. "Text"]:SetText("Show on Inspection Frame");
b3:SetScript("OnClick", function(self, button, isDown) if ( self:GetChecked() ) then KibsItemLevelConfig.Inspection = true; cleanUp(); else KibsItemLevelConfig.Inspection = false; cleanUp(); end end)
+ local b4 = CreateFrame("CheckButton","Small",ConfigPanel,"UICheckButtonTemplate");
+ b4:SetPoint("TOPLEFT",b3,"BOTTOMLEFT",0,0);
+ b4:SetChecked(KibsItemLevelConfig.Small);
+ _G[b4:GetName() .. "Text"]:SetText("Smaller ilvl text (requires reload)");
+ b4:SetScript("OnClick", function(self, button, isDown) if ( self:GetChecked() ) then KibsItemLevelConfig.Small = true; cleanUp(); else KibsItemLevelConfig.Small = false; cleanUp(); end end)
+
+ if(KibsItemLevelConfig.Small) then
+ fontStyle = "SystemFont_Small";
+ end
+ createFontStrings();
+ createInspectFontStrings();
cleanUp();