@@ -90,7 +90,7 @@ function ConfigFrame:CreateConfigFrame(parentFrame)
90
90
-- Display Settings
91
91
local displaySetting = CreateFrame (" Frame" , nil , conFrame )
92
92
displaySetting :SetPoint (" TOPLEFT" , conFrameHeader , " BOTTOMLEFT" , 0 , - 4 )
93
- displaySetting :SetSize ((conFrame :GetWidth ()- (mlr * 2 ))/ 3 , settingsPanelBaseHeight / 3 )
93
+ displaySetting :SetSize ((conFrame :GetWidth ()- (mlr * 2 ))/ 3 , settingsPanelBaseHeight / 2 )
94
94
displaySetting .title = displaySetting :CreateFontString (nil , " OVERLAY" , " KeyMasterFontBig" )
95
95
displaySetting .title :SetTextColor (titleColor .r , titleColor .g , titleColor .b , 1 )
96
96
displaySetting .title :SetPoint (" TOPLEFT" , displaySetting , " TOPLEFT" , 4 , - 4 )
@@ -172,7 +172,7 @@ function ConfigFrame:CreateConfigFrame(parentFrame)
172
172
-- Diagnostic Settings
173
173
local diagnosticSettings = CreateFrame (" Frame" , nil , conFrame )
174
174
diagnosticSettings :SetPoint (" TOPLEFT" , displaySetting , " TOPRIGHT" , 4 , 0 )
175
- diagnosticSettings :SetSize ((conFrame :GetWidth ()- (mlr * 2 ))/ 3 , settingsPanelBaseHeight / 3 )
175
+ diagnosticSettings :SetSize ((conFrame :GetWidth ()- (mlr * 2 ))/ 3 , settingsPanelBaseHeight / 2 )
176
176
diagnosticSettings .title = diagnosticSettings :CreateFontString (nil , " OVERLAY" , " KeyMasterFontBig" )
177
177
diagnosticSettings .title :SetTextColor (titleColor .r , titleColor .g , titleColor .b , 1 )
178
178
diagnosticSettings .title :SetPoint (" TOPLEFT" , diagnosticSettings , " TOPLEFT" , 4 , - 4 )
@@ -280,7 +280,7 @@ function ConfigFrame:CreateConfigFrame(parentFrame)
280
280
-- Character Filter Settings
281
281
local charactersSetting = CreateFrame (" Frame" , nil , conFrame )
282
282
charactersSetting :SetPoint (" TOPLEFT" , diagnosticSettings , " TOPRIGHT" , 4 , 0 )
283
- charactersSetting :SetSize ((conFrame :GetWidth ()- (mlr * 2 ))/ 3 , settingsPanelBaseHeight / 3 )
283
+ charactersSetting :SetSize ((conFrame :GetWidth ()- (mlr * 2 ))/ 3 , settingsPanelBaseHeight / 2 )
284
284
charactersSetting .title = charactersSetting :CreateFontString (nil , " OVERLAY" , " KeyMasterFontBig" )
285
285
charactersSetting .title :SetTextColor (titleColor .r , titleColor .g , titleColor .b , 1 )
286
286
charactersSetting .title :SetPoint (" TOPLEFT" , charactersSetting , " TOPLEFT" , 4 , - 4 )
@@ -361,7 +361,7 @@ function ConfigFrame:CreateConfigFrame(parentFrame)
361
361
characterKeyFrame :SetPoint (" TOPLEFT" , characterRatingFrame , " BOTTOMLEFT" , 0 , 0 )
362
362
characterKeyFrame :SetWidth (charactersSetting :GetWidth ()- 8 )
363
363
364
- charactersSetting .filterNoKey = CreateFrame (" CheckButton" , " KM_FilerRatingCheckBox " , characterKeyFrame , " ChatConfigCheckButtonTemplate" )
364
+ charactersSetting .filterNoKey = CreateFrame (" CheckButton" , " KM_FilerKeyCheckBox " , characterKeyFrame , " ChatConfigCheckButtonTemplate" )
365
365
local Path , _ , Flags = conFrameHeader .title :GetFont ()
366
366
charactersSetting .filterNoKey .Text :SetFont (Path , 12 , Flags )
367
367
charactersSetting .filterNoKey .Text :SetTextColor (optionsColor .r , optionsColor .g , optionsColor .b , 1 )
@@ -384,6 +384,35 @@ function ConfigFrame:CreateConfigFrame(parentFrame)
384
384
end
385
385
end )
386
386
387
+ -- Filter Level Checkbox/Button
388
+ local characterLevelFrame = CreateFrame (" Frame" , nil , charactersSetting )
389
+ characterLevelFrame :SetPoint (" TOPLEFT" , characterKeyFrame , " BOTTOMLEFT" , 0 , 0 )
390
+ characterLevelFrame :SetWidth (charactersSetting :GetWidth ()- 8 )
391
+
392
+ charactersSetting .filterMaxLvl = CreateFrame (" CheckButton" , " KM_FilterLevelCheckBox" , characterLevelFrame , " ChatConfigCheckButtonTemplate" )
393
+ local Path , _ , Flags = conFrameHeader .title :GetFont ()
394
+ charactersSetting .filterMaxLvl .Text :SetFont (Path , 12 , Flags )
395
+ charactersSetting .filterMaxLvl .Text :SetTextColor (optionsColor .r , optionsColor .g , optionsColor .b , 1 )
396
+ charactersSetting .filterMaxLvl .Text :SetText (KeyMasterLocals .CONFIGURATIONFRAME [" FilterByMaxLvl" ].text )
397
+ charactersSetting .filterMaxLvl .Text :SetWidth (characterLevelFrame :GetWidth ()- charactersSetting .filterMaxLvl :GetWidth ())
398
+
399
+ characterLevelFrame :SetHeight (charactersSetting .filterMaxLvl .Text :GetHeight ()+ 12 )
400
+
401
+ charactersSetting .filterMaxLvl :SetPoint (" BOTTOMLEFT" ,characterLevelFrame , " BOTTOMLEFT" , 0 , 0 )
402
+ charactersSetting .filterMaxLvl .Text :SetPoint (" BOTTOMLEFT" , charactersSetting .filterMaxLvl , " BOTTOMRIGHT" , 0 , 6 )
403
+
404
+
405
+ if (KeyMaster_DB .addonConfig .characterFilters .filterMaxLvl ) then
406
+ charactersSetting .filterMaxLvl :SetChecked (KeyMaster_DB .addonConfig .characterFilters .filterMaxLvl )
407
+ end
408
+ charactersSetting .filterMaxLvl :HookScript (" OnClick" , function ()
409
+ if (charactersSetting .filterMaxLvl :GetChecked ()) == true then
410
+ KeyMaster_DB .addonConfig .characterFilters .filterMaxLvl = true
411
+ else
412
+ KeyMaster_DB .addonConfig .characterFilters .filterMaxLvl = false
413
+ end
414
+ end )
415
+
387
416
local function purgeStatus (button )
388
417
if not button then return end
389
418
if not KeyMaster_C_DB or type (KeyMaster_C_DB ) ~= " table" or KeyMaster :GetTableLength (KeyMaster_C_DB ) == 0 then
0 commit comments