comparison Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-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
6 -- * The **appName** field is the options table name as given at registration time \\ 6 -- * The **appName** field is the options table name as given at registration time \\
7 -- 7 --
8 -- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName". 8 -- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName".
9 -- @class file 9 -- @class file
10 -- @name AceConfigRegistry-3.0 10 -- @name AceConfigRegistry-3.0
11 -- @release $Id: AceConfigRegistry-3.0.lua 1105 2013-12-08 22:11:58Z nevcairiel $ 11 -- @release $Id: AceConfigRegistry-3.0.lua 1139 2016-07-03 07:43:51Z nevcairiel $
12 local MAJOR, MINOR = "AceConfigRegistry-3.0", 15 12 local MAJOR, MINOR = "AceConfigRegistry-3.0", 16
13 local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR) 13 local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
14 14
15 if not AceConfigRegistry then return end 15 if not AceConfigRegistry then return end
16 16
17 AceConfigRegistry.tables = AceConfigRegistry.tables or {} 17 AceConfigRegistry.tables = AceConfigRegistry.tables or {}
55 local isstringfunc={["string"]=true,["function"]=true, _="string or funcref"} 55 local isstringfunc={["string"]=true,["function"]=true, _="string or funcref"}
56 local istable={["table"]=true, _="table"} 56 local istable={["table"]=true, _="table"}
57 local ismethodtable={["table"]=true,["string"]=true,["function"]=true, _="methodname, funcref or table"} 57 local ismethodtable={["table"]=true,["string"]=true,["function"]=true, _="methodname, funcref or table"}
58 local optstring={["nil"]=true,["string"]=true, _="string"} 58 local optstring={["nil"]=true,["string"]=true, _="string"}
59 local optstringfunc={["nil"]=true,["string"]=true,["function"]=true, _="string or funcref"} 59 local optstringfunc={["nil"]=true,["string"]=true,["function"]=true, _="string or funcref"}
60 local optstringnumberfunc={["nil"]=true,["string"]=true,["number"]=true,["function"]=true, _="string, number or funcref"}
60 local optnumber={["nil"]=true,["number"]=true, _="number"} 61 local optnumber={["nil"]=true,["number"]=true, _="number"}
61 local optmethod={["nil"]=true,["string"]=true,["function"]=true, _="methodname or funcref"} 62 local optmethod={["nil"]=true,["string"]=true,["function"]=true, _="methodname or funcref"}
62 local optmethodfalse={["nil"]=true,["string"]=true,["function"]=true,["boolean"]={[false]=true}, _="methodname, funcref or false"} 63 local optmethodfalse={["nil"]=true,["string"]=true,["function"]=true,["boolean"]={[false]=true}, _="methodname, funcref or false"}
63 local optmethodnumber={["nil"]=true,["string"]=true,["function"]=true,["number"]=true, _="methodname, funcref or number"} 64 local optmethodnumber={["nil"]=true,["string"]=true,["function"]=true,["number"]=true, _="methodname, funcref or number"}
64 local optmethodtable={["nil"]=true,["string"]=true,["function"]=true,["table"]=true, _="methodname, funcref or table"} 65 local optmethodtable={["nil"]=true,["string"]=true,["function"]=true,["table"]=true, _="methodname, funcref or table"}
80 hidden=optmethodbool, 81 hidden=optmethodbool,
81 guiHidden=optmethodbool, 82 guiHidden=optmethodbool,
82 dialogHidden=optmethodbool, 83 dialogHidden=optmethodbool,
83 dropdownHidden=optmethodbool, 84 dropdownHidden=optmethodbool,
84 cmdHidden=optmethodbool, 85 cmdHidden=optmethodbool,
85 icon=optstringfunc, 86 icon=optstringnumberfunc,
86 iconCoords=optmethodtable, 87 iconCoords=optmethodtable,
87 handler=opttable, 88 handler=opttable,
88 get=optmethodfalse, 89 get=optmethodfalse,
89 set=optmethodfalse, 90 set=optmethodfalse,
90 func=optmethodfalse, 91 func=optmethodfalse,
93 } 94 }
94 95
95 local typedkeys={ 96 local typedkeys={
96 header={}, 97 header={},
97 description={ 98 description={
98 image=optstringfunc, 99 image=optstringnumberfunc,
99 imageCoords=optmethodtable, 100 imageCoords=optmethodtable,
100 imageHeight=optnumber, 101 imageHeight=optnumber,
101 imageWidth=optnumber, 102 imageWidth=optnumber,
102 fontSize=optstringfunc, 103 fontSize=optstringfunc,
103 }, 104 },
110 dropdownInline=optbool, 111 dropdownInline=optbool,
111 dialogInline=optbool, 112 dialogInline=optbool,
112 childGroups=optstring, 113 childGroups=optstring,
113 }, 114 },
114 execute={ 115 execute={
115 image=optstringfunc, 116 image=optstringnumberfunc,
116 imageCoords=optmethodtable, 117 imageCoords=optmethodtable,
117 imageHeight=optnumber, 118 imageHeight=optnumber,
118 imageWidth=optnumber, 119 imageWidth=optnumber,
119 }, 120 },
120 input={ 121 input={
125 dropdownControl=optstring, 126 dropdownControl=optstring,
126 multiline=optboolnumber, 127 multiline=optboolnumber,
127 }, 128 },
128 toggle={ 129 toggle={
129 tristate=optbool, 130 tristate=optbool,
130 image=optstringfunc, 131 image=optstringnumberfunc,
131 imageCoords=optmethodtable, 132 imageCoords=optmethodtable,
132 }, 133 },
133 tristate={ 134 tristate={
134 }, 135 },
135 range={ 136 range={