- Revamp on Death report.
- Data send to broker now is correctly formated. - Modified the percentage method used on Comparison Panel. - Added options panel for Encounter Details. - New API: _detalhes:GetCurrentCombat() returns the current combat object - New API: _detalhes:GetCombatSegments() returns a numeric table with all stored combats. - New API: _detalhes:GetZoneType() returns the type from GetInstanceInfo(). - New API: _detalhes:InGroup()return true if Details! is considering the player inside a group. - New API: _detalhes:GetOnlyName (string) return self.nome or string without realm name. - New Event: ZONE_TYPE_CHANGED, it's triggered when the player change the zoze type. - New Event: GROUP_ONENTER GROUP_ONLEAVE, trigger when the player left or enter in a group.
This commit is contained in:
@@ -134,4 +134,49 @@ function gump:ParseColors (_arg1, _arg2, _arg3, _arg4)
|
||||
end
|
||||
|
||||
return _arg1, _arg2, _arg3, _arg4
|
||||
end
|
||||
|
||||
function gump:BuildMenu (parent, menu, x_offset, y_offset, height)
|
||||
|
||||
local cur_x = x_offset
|
||||
local cur_y = y_offset
|
||||
local max_x = 0
|
||||
|
||||
for index, widget_table in ipairs (menu) do
|
||||
|
||||
if (widget_table.type == "select" or widget_table.type == "dropdown") then
|
||||
local dropdown = self:NewDropDown (parent, nil, "$parentWidget" .. index, nil, 140, 18, widget_table.values, widget_table.get())
|
||||
dropdown.tooltip = widget_table.desc
|
||||
local label = self:NewLabel (parent, nil, "$parentLabel" .. index, nil, widget_table.name, "GameFontNormal", 12)
|
||||
dropdown:SetPoint ("left", label, "right", 2)
|
||||
label:SetPoint (cur_x, cur_y)
|
||||
|
||||
local size = label.widget:GetStringWidth() + 140 + 4
|
||||
if (size > max_x) then
|
||||
max_x = size
|
||||
end
|
||||
|
||||
elseif (widget_table.type == "toggle" or widget_table.type == "switch") then
|
||||
local switch = self:NewSwitch (parent, nil, "$parentWidget" .. index, nil, 60, 20, nil, nil, widget_table.get())
|
||||
switch.tooltip = widget_table.desc
|
||||
switch.OnSwitch = widget_table.set
|
||||
|
||||
local label = self:NewLabel (parent, nil, "$parentLabel" .. index, nil, widget_table.name, "GameFontNormal", 12)
|
||||
switch:SetPoint ("left", label, "right", 2)
|
||||
label:SetPoint (cur_x, cur_y)
|
||||
|
||||
local size = label.widget:GetStringWidth() + 60 + 4
|
||||
if (size > max_x) then
|
||||
max_x = size
|
||||
end
|
||||
end
|
||||
|
||||
cur_y = cur_y - 20
|
||||
if (cur_y > height) then
|
||||
cur_y = y_offset
|
||||
cur_x = max_x
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user