Mercurial > wow > hotcorners
comparison Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua @ 5:c31ee4251181
Libs Update
author | tercio |
---|---|
date | Tue, 25 Nov 2014 21:15:10 -0200 |
parents | fc346da3afd9 |
children | 371e14cd2feb |
comparison
equal
deleted
inserted
replaced
4:453c68ff5d72 | 5:c31ee4251181 |
---|---|
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 1089 2013-09-13 14:32:35Z nevcairiel $ | 4 -- @release $Id: AceConfigDialog-3.0.lua 1126 2014-11-10 06:38:01Z nevcairiel $ |
5 | 5 |
6 local LibStub = LibStub | 6 local LibStub = LibStub |
7 local MAJOR, MINOR = "AceConfigDialog-3.0", 58 | 7 local MAJOR, MINOR = "AceConfigDialog-3.0", 60 |
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 {} |
540 local usage = GetOptionsMemberValue("usage", opt, options, path, appName) | 540 local usage = GetOptionsMemberValue("usage", opt, options, path, appName) |
541 local descStyle = opt.descStyle | 541 local descStyle = opt.descStyle |
542 | 542 |
543 if descStyle and descStyle ~= "tooltip" then return end | 543 if descStyle and descStyle ~= "tooltip" then return end |
544 | 544 |
545 GameTooltip:SetText(name, 1, .82, 0, 1) | 545 GameTooltip:SetText(name, 1, .82, 0, true) |
546 | 546 |
547 if opt.type == "multiselect" then | 547 if opt.type == "multiselect" then |
548 GameTooltip:AddLine(user.text,0.5, 0.5, 0.8, 1) | 548 GameTooltip:AddLine(user.text, 0.5, 0.5, 0.8, true) |
549 end | 549 end |
550 if type(desc) == "string" then | 550 if type(desc) == "string" then |
551 GameTooltip:AddLine(desc, 1, 1, 1, 1) | 551 GameTooltip:AddLine(desc, 1, 1, 1, true) |
552 end | 552 end |
553 if type(usage) == "string" then | 553 if type(usage) == "string" then |
554 GameTooltip:AddLine("Usage: "..usage, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1) | 554 GameTooltip:AddLine("Usage: "..usage, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true) |
555 end | 555 end |
556 | 556 |
557 GameTooltip:Show() | 557 GameTooltip:Show() |
558 end | 558 end |
559 | 559 |
1446 GameTooltip:SetPoint("BOTTOM",button,"TOP") | 1446 GameTooltip:SetPoint("BOTTOM",button,"TOP") |
1447 else | 1447 else |
1448 GameTooltip:SetPoint("LEFT",button,"RIGHT") | 1448 GameTooltip:SetPoint("LEFT",button,"RIGHT") |
1449 end | 1449 end |
1450 | 1450 |
1451 GameTooltip:SetText(name, 1, .82, 0, 1) | 1451 GameTooltip:SetText(name, 1, .82, 0, true) |
1452 | 1452 |
1453 if type(desc) == "string" then | 1453 if type(desc) == "string" then |
1454 GameTooltip:AddLine(desc, 1, 1, 1, 1) | 1454 GameTooltip:AddLine(desc, 1, 1, 1, true) |
1455 end | 1455 end |
1456 | 1456 |
1457 GameTooltip:Show() | 1457 GameTooltip:Show() |
1458 end | 1458 end |
1459 | 1459 |
1813 tinsert(path, container) | 1813 tinsert(path, container) |
1814 container = nil | 1814 container = nil |
1815 end | 1815 end |
1816 for n = 1, select("#",...) do | 1816 for n = 1, select("#",...) do |
1817 tinsert(path, (select(n, ...))) | 1817 tinsert(path, (select(n, ...))) |
1818 end | |
1819 | |
1820 local option = options | |
1821 if type(container) == "table" and container.type == "BlizOptionsGroup" and #path > 0 then | |
1822 for i = 1, #path do | |
1823 option = options.args[path[i]] | |
1824 end | |
1825 name = format("%s - %s", name, GetOptionsMemberValue("name", option, options, path, appName)) | |
1818 end | 1826 end |
1819 | 1827 |
1820 --if a container is given feed into that | 1828 --if a container is given feed into that |
1821 if container then | 1829 if container then |
1822 f = container | 1830 f = container |