Mercurial > wow > hansgar_and_franzok_assist
comparison Libs/DF/slider.lua @ 29:5da06cb420d4
- framework update.
| author | Tercioo |
|---|---|
| date | Sat, 02 Jan 2016 13:33:05 -0200 |
| parents | 6bb668a41455 |
| children | a9c4a360ccfe |
comparison
equal
deleted
inserted
replaced
| 28:7523376ecaa3 | 29:5da06cb420d4 |
|---|---|
| 16 local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0") | 16 local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0") |
| 17 | 17 |
| 18 local cleanfunction = function() end | 18 local cleanfunction = function() end |
| 19 local APISliderFunctions = false | 19 local APISliderFunctions = false |
| 20 local SliderMetaFunctions = {} | 20 local SliderMetaFunctions = {} |
| 21 local NameLessSlider = 1 | |
| 22 | 21 |
| 23 ------------------------------------------------------------------------------------------------------------ | 22 ------------------------------------------------------------------------------------------------------------ |
| 24 --> metatables | 23 --> metatables |
| 25 | 24 |
| 26 SliderMetaFunctions.__call = function (_table, value) | 25 SliderMetaFunctions.__call = function (_table, value) |
| 875 | 874 |
| 876 function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, default_value, color_inverted, switch_func, return_func, with_label, switch_template, label_template) | 875 function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, default_value, color_inverted, switch_func, return_func, with_label, switch_template, label_template) |
| 877 | 876 |
| 878 --> early checks | 877 --> early checks |
| 879 if (not name) then | 878 if (not name) then |
| 880 name = "DetailsFrameWorkSlider" .. NameLessSlider | 879 name = "DetailsFrameWorkSlider" .. DF.SwitchCounter |
| 881 NameLessSlider = NameLessSlider + 1 | 880 DF.SwitchCounter = DF.SwitchCounter + 1 |
| 882 elseif (not parent) then | 881 elseif (not parent) then |
| 883 return nil | 882 return error ("Details! FrameWork: parent not found.", 2) |
| 884 end | 883 end |
| 885 if (not container) then | 884 if (not container) then |
| 886 container = parent | 885 container = parent |
| 887 end | 886 end |
| 888 | 887 |
| 1033 if (not name) then | 1032 if (not name) then |
| 1034 name = "DetailsFrameworkSlider" .. DF.SliderCounter | 1033 name = "DetailsFrameworkSlider" .. DF.SliderCounter |
| 1035 DF.SliderCounter = DF.SliderCounter + 1 | 1034 DF.SliderCounter = DF.SliderCounter + 1 |
| 1036 end | 1035 end |
| 1037 if (not parent) then | 1036 if (not parent) then |
| 1038 return nil | 1037 return error ("Details! FrameWork: parent not found.", 2) |
| 1039 end | 1038 end |
| 1040 if (not container) then | 1039 if (not container) then |
| 1041 container = parent | 1040 container = parent |
| 1042 end | 1041 end |
| 1043 | 1042 |
| 1044 if (name:find ("$parent")) then | 1043 if (name:find ("$parent")) then |
| 1045 name = name:gsub ("$parent", parent:GetName()) | 1044 local parentName = DF.GetParentName (parent) |
| 1045 name = name:gsub ("$parent", parentName) | |
| 1046 end | 1046 end |
| 1047 | 1047 |
| 1048 local SliderObject = {type = "slider", dframework = true} | 1048 local SliderObject = {type = "slider", dframework = true} |
| 1049 | 1049 |
| 1050 if (member) then | 1050 if (member) then |
