Mercurial > wow > hotcorners
comparison Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua @ 11:371e14cd2feb
- major fixes with icons not showing correctly.
author | Tercio |
---|---|
date | Thu, 08 Dec 2016 13:01:40 -0200 |
parents | c31ee4251181 |
children | 3000eccbf1a0 |
comparison
equal
deleted
inserted
replaced
10:6572ed4edaae | 11:371e14cd2feb |
---|---|
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 1126 2014-11-10 06:38:01Z nevcairiel $ | 4 -- @release $Id: AceConfigDialog-3.0.lua 1139 2016-07-03 07:43:51Z nevcairiel $ |
5 | 5 |
6 local LibStub = LibStub | 6 local LibStub = LibStub |
7 local MAJOR, MINOR = "AceConfigDialog-3.0", 60 | 7 local MAJOR, MINOR = "AceConfigDialog-3.0", 61 |
8 local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR) | 8 local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR) |
9 | 9 |
10 if not AceConfigDialog then return end | 10 if not AceConfigDialog then return end |
11 | 11 |
12 AceConfigDialog.OpenFrames = AceConfigDialog.OpenFrames or {} | 12 AceConfigDialog.OpenFrames = AceConfigDialog.OpenFrames or {} |
1090 if v.type == "execute" then | 1090 if v.type == "execute" then |
1091 | 1091 |
1092 local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName) | 1092 local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName) |
1093 local image, width, height = GetOptionsMemberValue("image",v, options, path, appName) | 1093 local image, width, height = GetOptionsMemberValue("image",v, options, path, appName) |
1094 | 1094 |
1095 if type(image) == "string" then | 1095 if type(image) == "string" or type(image) == "number" then |
1096 control = gui:Create("Icon") | 1096 control = gui:Create("Icon") |
1097 if not width then | 1097 if not width then |
1098 width = GetOptionsMemberValue("imageWidth",v, options, path, appName) | 1098 width = GetOptionsMemberValue("imageWidth",v, options, path, appName) |
1099 end | 1099 end |
1100 if not height then | 1100 if not height then |
1152 end | 1152 end |
1153 | 1153 |
1154 local image = GetOptionsMemberValue("image", v, options, path, appName) | 1154 local image = GetOptionsMemberValue("image", v, options, path, appName) |
1155 local imageCoords = GetOptionsMemberValue("imageCoords", v, options, path, appName) | 1155 local imageCoords = GetOptionsMemberValue("imageCoords", v, options, path, appName) |
1156 | 1156 |
1157 if type(image) == "string" then | 1157 if type(image) == "string" or type(image) == "number" then |
1158 if type(imageCoords) == "table" then | 1158 if type(imageCoords) == "table" then |
1159 control:SetImage(image, unpack(imageCoords)) | 1159 control:SetImage(image, unpack(imageCoords)) |
1160 else | 1160 else |
1161 control:SetImage(image) | 1161 control:SetImage(image) |
1162 end | 1162 end |
1352 end | 1352 end |
1353 | 1353 |
1354 local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName) | 1354 local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName) |
1355 local image, width, height = GetOptionsMemberValue("image",v, options, path, appName) | 1355 local image, width, height = GetOptionsMemberValue("image",v, options, path, appName) |
1356 | 1356 |
1357 if type(image) == "string" then | 1357 if type(image) == "string" or type(image) == "number" then |
1358 if not width then | 1358 if not width then |
1359 width = GetOptionsMemberValue("imageWidth",v, options, path, appName) | 1359 width = GetOptionsMemberValue("imageWidth",v, options, path, appName) |
1360 end | 1360 end |
1361 if not height then | 1361 if not height then |
1362 height = GetOptionsMemberValue("imageHeight",v, options, path, appName) | 1362 height = GetOptionsMemberValue("imageHeight",v, options, path, appName) |