- merging more updates from the beta version.

This commit is contained in:
Tercio
2016-07-26 19:27:36 -03:00
parent da2d6b9bf4
commit bd0bb3b7d2
9 changed files with 886 additions and 23 deletions
+35 -1
View File
@@ -1,5 +1,5 @@
local dversion = 24
local dversion = 27
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
@@ -110,6 +110,7 @@ local embed_functions = {
"SetFrameworkDebugState",
"FindHighestParent",
"OpenInterfaceProfile",
"CreateInCombatTexture",
}
DF.table = {}
@@ -562,6 +563,10 @@ end
slider.widget_type = "range"
slider:SetHook ("OnValueChange", widget_table.set)
if (widget_table.thumbscale) then
slider:SetThumbSize (slider.thumb:GetWidth()*widget_table.thumbscale, nil)
end
local label = DF:NewLabel (parent, nil, "$parentLabel" .. index, nil, widget_table.name .. (use_two_points and ": " or ""), "GameFontNormal", widget_table.text_template or text_template or 12)
slider:SetPoint ("left", label, "right", 2)
label:SetPoint (cur_x, cur_y)
@@ -683,6 +688,34 @@ end
end
end)
function DF:CreateInCombatTexture (frame)
if (DF.debug and not frame) then
error ("Details! Framework: CreateInCombatTexture invalid frame on parameter 1.")
end
local in_combat_background = DF:CreateImage (frame)
in_combat_background:SetColorTexture (.6, 0, 0, .1)
in_combat_background:Hide()
local in_combat_label = Plater:CreateLabel (frame, "you are in combat", 24, "silver")
in_combat_label:SetPoint ("right", in_combat_background, "right", -10, 0)
in_combat_label:Hide()
frame:RegisterEvent ("PLAYER_REGEN_DISABLED")
frame:RegisterEvent ("PLAYER_REGEN_ENABLED")
frame:SetScript ("OnEvent", function (self, event)
if (event == "PLAYER_REGEN_DISABLED") then
in_combat_background:Show()
in_combat_label:Show()
elseif (event == "PLAYER_REGEN_ENABLED") then
in_combat_background:Hide()
in_combat_label:Hide()
end
end)
return in_combat_background
end
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> tutorials
@@ -1051,6 +1084,7 @@ DF.GlobalWidgetControlNames = {
image = "DF_ImageMetaFunctions",
slider = "DF_SliderMetaFunctions",
split_bar = "DF_SplitBarMetaFunctions",
aura_tracker = "DF_AuraTracker",
}
function DF:AddMemberForWidget (widgetName, memberType, memberName, func)