comparison Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua @ 20:9ad7f3c634f1 v8.0.1.020

- Updated Libraries.
author Tercio
date Fri, 20 Jul 2018 19:13:08 -0300
parents 3000eccbf1a0
children
comparison
equal deleted inserted replaced
19:817b319cd8ce 20:9ad7f3c634f1
1 --- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables. 1 --- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables.
2 -- @class file 2 -- @class file
3 -- @name AceConfigDialog-3.0 3 -- @name AceConfigDialog-3.0
4 -- @release $Id: AceConfigDialog-3.0.lua 1167 2017-08-29 22:08:48Z funkydude $ 4 -- @release $Id: AceConfigDialog-3.0.lua 1169 2018-02-27 16:18:28Z nevcairiel $
5 5
6 local LibStub = LibStub 6 local LibStub = LibStub
7 local gui = LibStub("AceGUI-3.0") 7 local gui = LibStub("AceGUI-3.0")
8 local reg = LibStub("AceConfigRegistry-3.0") 8 local reg = LibStub("AceConfigRegistry-3.0")
9 9
10 local MAJOR, MINOR = "AceConfigDialog-3.0", 64 10 local MAJOR, MINOR = "AceConfigDialog-3.0", 66
11 local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR) 11 local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
12 12
13 if not AceConfigDialog then return end 13 if not AceConfigDialog then return end
14 14
15 AceConfigDialog.OpenFrames = AceConfigDialog.OpenFrames or {} 15 AceConfigDialog.OpenFrames = AceConfigDialog.OpenFrames or {}
1032 if not inline and not hidden then 1032 if not inline and not hidden then
1033 local entry = new() 1033 local entry = new()
1034 entry.value = k 1034 entry.value = k
1035 entry.text = GetOptionsMemberValue("name", v, options, path, appName) 1035 entry.text = GetOptionsMemberValue("name", v, options, path, appName)
1036 entry.icon = GetOptionsMemberValue("icon", v, options, path, appName) 1036 entry.icon = GetOptionsMemberValue("icon", v, options, path, appName)
1037 entry.iconCoords = GetOptionsMemberValue("iconCoords", v, options, path, appName)
1037 entry.disabled = CheckOptionDisabled(v, options, path, appName) 1038 entry.disabled = CheckOptionDisabled(v, options, path, appName)
1038 tinsert(tree,entry) 1039 tinsert(tree,entry)
1039 if recurse and (v.childGroups or "tree") == "tree" then 1040 if recurse and (v.childGroups or "tree") == "tree" then
1040 BuildSubGroups(v,entry, options, path, appName) 1041 BuildSubGroups(v,entry, options, path, appName)
1041 end 1042 end
1224 control:AddChild(radio) 1225 control:AddChild(radio)
1225 if width == "double" then 1226 if width == "double" then
1226 radio:SetWidth(width_multiplier * 2) 1227 radio:SetWidth(width_multiplier * 2)
1227 elseif width == "half" then 1228 elseif width == "half" then
1228 radio:SetWidth(width_multiplier / 2) 1229 radio:SetWidth(width_multiplier / 2)
1230 elseif (type(width) == "number") then
1231 radio:SetWidth(width_multiplier * width)
1229 elseif width == "full" then 1232 elseif width == "full" then
1230 radio.width = "fill" 1233 radio.width = "fill"
1231 else 1234 else
1232 radio:SetWidth(width_multiplier) 1235 radio:SetWidth(width_multiplier)
1233 end 1236 end
1286 local width = GetOptionsMemberValue("width",v,options,path,appName) 1289 local width = GetOptionsMemberValue("width",v,options,path,appName)
1287 if width == "double" then 1290 if width == "double" then
1288 control:SetWidth(width_multiplier * 2) 1291 control:SetWidth(width_multiplier * 2)
1289 elseif width == "half" then 1292 elseif width == "half" then
1290 control:SetWidth(width_multiplier / 2) 1293 control:SetWidth(width_multiplier / 2)
1294 elseif (type(width) == "number") then
1295 control:SetWidth(width_multiplier * width)
1291 elseif width == "full" then 1296 elseif width == "full" then
1292 control.width = "fill" 1297 control.width = "fill"
1293 else 1298 else
1294 control:SetWidth(width_multiplier) 1299 control:SetWidth(width_multiplier)
1295 end 1300 end
1322 control:AddChild(check) 1327 control:AddChild(check)
1323 if width == "double" then 1328 if width == "double" then
1324 check:SetWidth(width_multiplier * 2) 1329 check:SetWidth(width_multiplier * 2)
1325 elseif width == "half" then 1330 elseif width == "half" then
1326 check:SetWidth(width_multiplier / 2) 1331 check:SetWidth(width_multiplier / 2)
1332 elseif (type(width) == "number") then
1333 control:SetWidth(width_multiplier * width)
1327 elseif width == "full" then 1334 elseif width == "full" then
1328 check.width = "fill" 1335 check.width = "fill"
1329 else 1336 else
1330 check:SetWidth(width_multiplier) 1337 check:SetWidth(width_multiplier)
1331 end 1338 end
1403 local width = GetOptionsMemberValue("width",v,options,path,appName) 1410 local width = GetOptionsMemberValue("width",v,options,path,appName)
1404 if width == "double" then 1411 if width == "double" then
1405 control:SetWidth(width_multiplier * 2) 1412 control:SetWidth(width_multiplier * 2)
1406 elseif width == "half" then 1413 elseif width == "half" then
1407 control:SetWidth(width_multiplier / 2) 1414 control:SetWidth(width_multiplier / 2)
1415 elseif (type(width) == "number") then
1416 control:SetWidth(width_multiplier * width)
1408 elseif width == "full" then 1417 elseif width == "full" then
1409 control.width = "fill" 1418 control.width = "fill"
1410 else 1419 else
1411 control:SetWidth(width_multiplier) 1420 control:SetWidth(width_multiplier)
1412 end 1421 end