Format the text in the breakdown player list using the same font, size and outline of the damage window

This commit is contained in:
Tercio Jose
2022-10-09 17:12:13 -03:00
parent 61644c755a
commit 9974a87119
92 changed files with 5980 additions and 5978 deletions
+12 -12
View File
@@ -140,7 +140,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
end
end)
new_button:SetScript ("OnMouseUp", function (self, button)
new_button:SetScript ("OnMouseUp", function(self, button)
if (not self:IsEnabled()) then
return
end
@@ -324,7 +324,7 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
end
end
local EnterPress = function (byScript)
local EnterPress = function(byScript)
if (editbox.EnterHook) then
editbox.EnterHook()
@@ -444,13 +444,13 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
end
end)
editbox:SetScript ("OnChar", function (self, text)
editbox:SetScript ("OnChar", function(self, text)
if (editbox.InputHook) then
editbox:InputHook (text)
end
end)
editbox:SetScript ("OnTextChanged", function (self, userChanged)
editbox:SetScript ("OnTextChanged", function(self, userChanged)
if (editbox.TextChangeedHook and userChanged) then
editbox:TextChangeedHook (userChanged)
end
@@ -463,13 +463,13 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
end
end)
editbox.SetNext = function (_, NextBox)
editbox.SetNext = function(_, NextBox)
if (NextBox) then
editbox.next = NextBox
end
end
editbox.SetLabel = function (_, Label)
editbox.SetLabel = function(_, Label)
if (Label) then
editbox.label = Label
editbox.label:SetTextColor (.8, .8, .8, 1)
@@ -608,14 +608,14 @@ function gump:NewScrollBar2 (master, slave, x, y)
self:SetScript ("OnUpdate", nil)
end)
--> isso aqui pra quando o slider ativar, o scroll fica na posio zero
botao_cima:SetScript ("OnEnable", function (self)
botao_cima:SetScript ("OnEnable", function(self)
local current = slider_gump:GetValue()
if (current == 0) then
botao_cima:Disable()
end
end)
slider_gump:SetScript ("OnValueChanged", function (self)
slider_gump:SetScript ("OnValueChanged", function(self)
local current = self:GetValue()
master:SetVerticalScroll (current)
@@ -635,22 +635,22 @@ function gump:NewScrollBar2 (master, slave, x, y)
end)
slider_gump:SetScript ("OnShow", function (self)
slider_gump:SetScript ("OnShow", function(self)
botao_cima:Show()
botao_baixo:Show()
end)
slider_gump:SetScript ("OnDisable", function (self)
slider_gump:SetScript ("OnDisable", function(self)
botao_cima:Disable()
botao_baixo:Disable()
end)
slider_gump:SetScript ("OnEnable", function (self)
slider_gump:SetScript ("OnEnable", function(self)
botao_cima:Enable()
botao_baixo:Enable()
end)
master:SetScript ("OnMouseWheel", function (self, delta)
master:SetScript ("OnMouseWheel", function(self, delta)
if (not slider_gump:IsEnabled()) then
return
end
+10 -10
View File
@@ -40,7 +40,7 @@ function Details:CreateAPI2Frame()
local api = Details.API_Description.namespaces[1].api
--on select api on the menu
local onSelectAPI = function (self)
local onSelectAPI = function(self)
local apiName = apiFunctionNames [self.index]
if (not apiName) then
Details:Msg ("API name not found:", apiName)
@@ -124,7 +124,7 @@ function Details:CreateAPI2Frame()
end
--menu scroll
local apiMenuScrollRefresh = function (self, data, offset, total_lines)
local apiMenuScrollRefresh = function(self, data, offset, total_lines)
for i = 1, total_lines do
local index = i + offset
local apiName = data [index]
@@ -147,11 +147,11 @@ function Details:CreateAPI2Frame()
end
local api2ScrollMenu = DetailsFramework:CreateScrollBox (Api2Frame, "$parentApi2MenuScroll", apiMenuScrollRefresh, apiFunctionNames, scrollWidth, scrollHeight, lineAmount, lineHeight)
DetailsFramework:ReskinSlider (api2ScrollMenu)
DetailsFramework:ReskinSlider(api2ScrollMenu)
api2ScrollMenu:SetPoint ("topleft", Api2Frame, "topleft", 10, yStart)
Api2Frame.scrollMenu = api2ScrollMenu
local lineOnEnter = function (self)
local lineOnEnter = function(self)
self:SetBackdropColor (unpack (backdropColorOnEnter))
local apiName = apiFunctionNames [self.index]
@@ -171,7 +171,7 @@ function Details:CreateAPI2Frame()
GameCooltip2:ShowCooltip()
end
local lineOnLeave = function (self)
local lineOnLeave = function(self)
if (currentSelected == self.index) then
self:SetBackdropColor (unpack (backdropColorSelected))
else
@@ -183,7 +183,7 @@ function Details:CreateAPI2Frame()
--create lines
for i = 1, lineAmount do
api2ScrollMenu:CreateLine (function (self, index)
api2ScrollMenu:CreateLine (function(self, index)
local line = CreateFrame ("button", "$parentLine" .. index, self, "BackdropTemplate")
line:SetPoint ("topleft", self, "topleft", 1, -((index-1)*(lineHeight+1)) - 1)
line:SetSize (scrollWidth - 2, lineHeight)
@@ -245,7 +245,7 @@ function Details:CreateAPI2Frame()
parametersHeader.required:SetPoint ("left", parametersHeader, "left", space2, 0)
parametersHeader.default:SetPoint ("left", parametersHeader, "left", space3, 0)
local parameterOnEnter = function (self)
local parameterOnEnter = function(self)
GameCooltip2:Preset(2)
GameCooltip2:SetOwner (self)
@@ -259,7 +259,7 @@ function Details:CreateAPI2Frame()
self:SetBackdropColor (unpack (backdropColorOnEnter))
end
local parameterOnLeave = function (self)
local parameterOnLeave = function(self)
GameCooltip2:Hide()
self:SetBackdropColor (unpack (backdropColor))
end
@@ -307,10 +307,10 @@ function Details:CreateAPI2Frame()
returnHeader.name:SetPoint ("left", returnHeader, "left", 2, 0)
returnHeader.typeData:SetPoint ("left", returnHeader, "left", space1, 0)
local returnOnEnter = function (self)
local returnOnEnter = function(self)
self:SetBackdropColor (unpack (backdropColorOnEnter))
end
local returnOnLeave = function (self)
local returnOnLeave = function(self)
self:SetBackdropColor (unpack (backdropColor))
end
+1 -1
View File
@@ -96,7 +96,7 @@ local libwindow = LibStub("LibWindow-1.1")
f:RegisterEvent ("PLAYER_REGEN_DISABLED")
f:RegisterEvent ("PLAYER_REGEN_ENABLED")
f:SetScript ("OnEvent", function (self, event, ...)
f:SetScript ("OnEvent", function(self, event, ...)
if (event == "PLAYER_REGEN_DISABLED") then
f.StartNewBenchmark()
+5 -5
View File
@@ -14,7 +14,7 @@ function Details:OpenBookmarkConfig()
panel:SetBackdropColor(.1, .1, .1, .9)
panel.blocks = {}
local clear_func = function (self, button, id)
local clear_func = function(self, button, id)
if (Details.switch.table [id]) then
Details.switch.table [id].atributo = nil
Details.switch.table [id].sub_atributo = nil
@@ -23,7 +23,7 @@ function Details:OpenBookmarkConfig()
end
end
local select_attribute = function (_, _, _, attribute, sub_atribute)
local select_attribute = function(_, _, _, attribute, sub_atribute)
if (not sub_atribute) then
return
end
@@ -34,7 +34,7 @@ function Details:OpenBookmarkConfig()
end
local cooltip_color = {.1, .1, .1, .3}
local set_att = function (self, button, id)
local set_att = function(self, button, id)
panel.selecting_slot = id
GameCooltip:Reset()
GameCooltip:SetType (3)
@@ -52,11 +52,11 @@ function Details:OpenBookmarkConfig()
local button_backdrop = {bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 64, insets = {left=0, right=0, top=0, bottom=0}}
local set_onenter = function (self, capsule)
local set_onenter = function(self, capsule)
self:SetBackdropColor (1, 1, 1, 0.9)
capsule.icon:SetBlendMode ("ADD")
end
local set_onleave = function (self, capsule)
local set_onleave = function(self, capsule)
self:SetBackdropColor (0, 0, 0, 0.5)
capsule.icon:SetBlendMode ("BLEND")
end
+2 -2
View File
@@ -34,7 +34,7 @@ function Details:OpenBrokerTextEditor()
end)
local option_selected = 1
local onclick= function (_, _, value)
local onclick= function(_, _, value)
option_selected = value
end
local AddOptions = {
@@ -172,7 +172,7 @@ function Details:OpenBrokerTextEditor()
self:HighlightText( Start, #ColorCode + ( #Replacement - #Selection ) + #COLOR_END + End );
end
local color_func = function (_, r, g, b, a)
local color_func = function(_, r, g, b, a)
local hex = Details:hex (a*255)..Details:hex (r*255)..Details:hex (g*255)..Details:hex (b*255)
ColorSelection ( textentry.editbox, "|c" .. hex)
end
+13 -13
View File
@@ -379,7 +379,7 @@ end
{--enable ocd
type = "toggle",
get = function() return Details.ocd_tracker.enabled end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
if (value) then
Details.CooldownTracking.EnableTracker()
else
@@ -393,7 +393,7 @@ end
{--show only in group
type = "toggle",
get = function() return Details.ocd_tracker.show_conditions.only_in_group end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.show_conditions.only_in_group = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -404,7 +404,7 @@ end
{--show only inside instances
type = "toggle",
get = function() return Details.ocd_tracker.show_conditions.only_inside_instance end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.show_conditions.only_inside_instance = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -414,7 +414,7 @@ end
{--lock frame
type = "toggle",
get = function() return Details.ocd_tracker.framme_locked end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.framme_locked = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -427,7 +427,7 @@ end
{--filter: show raid wide defensive cooldowns
type = "toggle",
get = function() return Details.ocd_tracker.filters["defensive-raid"] end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.filters["defensive-raid"] = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -438,7 +438,7 @@ end
{--filter: show target defensive cooldowns
type = "toggle",
get = function() return Details.ocd_tracker.filters["defensive-target"] end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.filters["defensive-target"] = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -449,7 +449,7 @@ end
{--filter: show personal defensive cooldowns
type = "toggle",
get = function() return Details.ocd_tracker.filters["defensive-personal"] end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.filters["defensive-personal"] = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -460,7 +460,7 @@ end
{--filter: show ofensive cooldowns
type = "toggle",
get = function() return Details.ocd_tracker.filters["ofensive"] end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.filters["ofensive"] = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -471,7 +471,7 @@ end
{--filter: show utility cooldowns
type = "toggle",
get = function() return Details.ocd_tracker.filters["utility"] end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.filters["utility"] = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -482,7 +482,7 @@ end
{--filter: show interrupt cooldowns
type = "toggle",
get = function() return Details.ocd_tracker.filters["interrupt"] end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.filters["interrupt"] = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -495,7 +495,7 @@ end
{--bar width
type = "range",
get = function() return Details.ocd_tracker.width end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.width = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -509,7 +509,7 @@ end
{--bar height
type = "range",
get = function() return Details.ocd_tracker.height end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.height = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -523,7 +523,7 @@ end
{--bar height
type = "range",
get = function() return Details.ocd_tracker.lines_per_column end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.lines_per_column = floor(value)
Details.CooldownTracking.RefreshCooldownFrames()
end,
+5 -5
View File
@@ -19,7 +19,7 @@ function Details:OpenClassColorsConfig()
local y = -50
local callback = function (button, r, g, b, a, self)
local callback = function(button, r, g, b, a, self)
self.MyObject.my_texture:SetVertexColor (r, g, b)
Details.class_colors [self.MyObject.my_class][1] = r
Details.class_colors [self.MyObject.my_class][2] = g
@@ -27,13 +27,13 @@ function Details:OpenClassColorsConfig()
Details:RefreshMainWindow (-1, true)
end
local set_color = function (self, button, class, index)
local set_color = function(self, button, class, index)
local current_class_color = Details.class_colors [class]
local r, g, b = unpack (current_class_color)
DF:ColorPick (self, r, g, b, 1, callback)
end
local reset_color = function (self, button, class, index)
local reset_color = function(self, button, class, index)
local color_table = RAID_CLASS_COLORS [class]
local r, g, b = color_table.r, color_table.g, color_table.b
self.MyObject.my_texture:SetVertexColor (r, g, b)
@@ -43,12 +43,12 @@ function Details:OpenClassColorsConfig()
Details:RefreshMainWindow (-1, true)
end
local on_enter = function (self, capsule)
local on_enter = function(self, capsule)
--Details:CooltipPreset (1)
--GameCooltip:AddLine ("right click to reset")
--GameCooltip:Show (self)
end
local on_leave = function (self, capsule)
local on_leave = function(self, capsule)
--GameCooltip:Hide()
end
+16 -16
View File
@@ -52,7 +52,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
local testUsing = "arena" --mythicdungeon
--> frame strata options
local set_frame_strata = function (_, _, strata)
local set_frame_strata = function(_, _, strata)
Details.realtime_dps_meter.frame_settings.strata = strata
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end
@@ -64,7 +64,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
strataTable [5] = {value = "DIALOG", label = "DIALOG", onclick = set_frame_strata}
--> font options
local set_font_shadow= function (_, _, shadow)
local set_font_shadow= function(_, _, shadow)
Details.realtime_dps_meter.font_shadow = shadow
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end
@@ -73,7 +73,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
fontShadowTable [2] = {value = "OUTLINE", label = "Outline", onclick = set_font_shadow}
fontShadowTable [3] = {value = "THICKOUTLINE", label = "Thick Outline", onclick = set_font_shadow}
local on_select_text_font = function (self, fixed_value, value)
local on_select_text_font = function(self, fixed_value, value)
Details.realtime_dps_meter.font_face = value
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end
@@ -99,7 +99,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "toggle",
get = function() return Details.realtime_dps_meter.enabled end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.enabled = not Details.realtime_dps_meter.enabled
Details:LoadFramesForBroadcastTools()
end,
@@ -111,7 +111,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "toggle",
get = function() return Details.realtime_dps_meter.frame_settings.locked end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.frame_settings.locked = not Details.realtime_dps_meter.frame_settings.locked
Details:UpdateTheRealCurrentDPSFrame(testUsing)
lockCallback()
@@ -124,7 +124,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "toggle",
get = function() return Details.realtime_dps_meter.frame_settings.show_title end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.frame_settings.show_title = not Details.realtime_dps_meter.frame_settings.show_title
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end,
@@ -138,7 +138,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
get = function()
return {Details.realtime_dps_meter.frame_settings.backdrop_color[1], Details.realtime_dps_meter.frame_settings.backdrop_color[2], Details.realtime_dps_meter.frame_settings.backdrop_color[3], Details.realtime_dps_meter.frame_settings.backdrop_color[4]}
end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local color = Details.realtime_dps_meter.frame_settings.backdrop_color
color[1], color[2], color[3], color[4] = r, g, b, a
Details:UpdateTheRealCurrentDPSFrame(testUsing)
@@ -158,7 +158,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "range",
get = function() return Details.realtime_dps_meter.sample_size end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.sample_size = value
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end,
@@ -173,7 +173,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "range",
get = function() return Details.realtime_dps_meter.frame_settings.width end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.frame_settings.width = value
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end,
@@ -187,7 +187,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "range",
get = function() return Details.realtime_dps_meter.frame_settings.height end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.frame_settings.height = value
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end,
@@ -205,7 +205,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "toggle",
get = function() return Details.realtime_dps_meter.arena_enabled end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.arena_enabled = not Details.realtime_dps_meter.arena_enabled
Details:LoadFramesForBroadcastTools()
end,
@@ -216,7 +216,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "toggle",
get = function() return Details.realtime_dps_meter.mythic_dungeon_enabled end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.mythic_dungeon_enabled = not Details.realtime_dps_meter.mythic_dungeon_enabled
Details:LoadFramesForBroadcastTools()
end,
@@ -231,7 +231,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "range",
get = function() return Details.realtime_dps_meter.font_size end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.font_size = value
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end,
@@ -247,7 +247,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
get = function()
return {Details.realtime_dps_meter.font_color[1], Details.realtime_dps_meter.font_color[2], Details.realtime_dps_meter.font_color[3], Details.realtime_dps_meter.font_color[4]}
end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local color = Details.realtime_dps_meter.font_color
color[1], color[2], color[3], color[4] = r, g, b, a
Details:UpdateTheRealCurrentDPSFrame(testUsing)
@@ -275,7 +275,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "range",
get = function() return _detalhes.realtime_dps_meter.text_offset end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
_detalhes.realtime_dps_meter.text_offset = value
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end,
@@ -673,7 +673,7 @@ function Details:CreateCurrentDpsFrame(parent, name)
_detalhes:UpdateTheRealCurrentDPSFrame()
local on_tick = function (self, deltaTime)
local on_tick = function(self, deltaTime)
self.NextUpdate = self.NextUpdate - deltaTime
if (self.NextUpdate <= 0) then
+27 -27
View File
@@ -171,7 +171,7 @@
custom_window:SetSize (850, 500)
custom_window:EnableMouse (true)
custom_window:SetMovable (true)
custom_window:SetScript ("OnMouseDown", function (self, button)
custom_window:SetScript ("OnMouseDown", function(self, button)
if (button == "LeftButton") then
if (not self.moving) then
self.moving = true
@@ -183,7 +183,7 @@
end
end
end)
custom_window:SetScript ("OnMouseUp", function (self)
custom_window:SetScript ("OnMouseUp", function(self)
if (self.moving) then
self.moving = false
self:StopMovingOrSizing()
@@ -742,10 +742,10 @@
local menu_up_frame = _CreateFrame ("frame", nil, custom_window)
menu_up_frame:SetFrameLevel (custom_window:GetFrameLevel()+2)
local onenter = function (self)
local onenter = function(self)
--self.icontexture:SetVertexColor (1, 1, 1, 1)
end
local onleave = function (self)
local onleave = function(self)
--self.icontexture:SetVertexColor (.9, .9, .9, 1)
end
@@ -768,7 +768,7 @@
custom_window.menu [index] = {circle = circle, icon = texture, button = button}
end
local build_menu = function (self, button, func, param2)
local build_menu = function(self, button, func, param2)
GameCooltip:Reset()
for index, custom_object in _ipairs (_detalhes.custom) do
@@ -792,21 +792,21 @@
end
--> edit button
local start_edit = function (_, _, custom_object, index)
local start_edit = function(_, _, custom_object, index)
GameCooltip:Hide()
DetailsCustomPanel:StartEdit (custom_object)
end
custom_window:CreateMenuButton (Loc ["STRING_CUSTOM_EDIT"], "Interface\\ICONS\\INV_Inscription_RunescrollOfFortitude_Red", build_menu, start_edit, nil, nil, "Edit", {0.07, 0.93, 0.07, 0.93})
--> remove button
local remove_display = function (_, _, custom_object, index)
local remove_display = function(_, _, custom_object, index)
GameCooltip:Hide()
DetailsCustomPanel:RemoveDisplay (custom_object, index)
end
custom_window:CreateMenuButton (Loc ["STRING_CUSTOM_REMOVE"], "Interface\\ICONS\\Spell_BrokenHeart", build_menu, remove_display, nil, nil, "Remove", {1, 0, 0, 1})
--> export button
local export_display = function (_, _, custom_object, index)
local export_display = function(_, _, custom_object, index)
GameCooltip:Hide()
local export_object = {}
@@ -863,7 +863,7 @@
custom_window:CreateMenuButton (Loc ["STRING_CUSTOM_EXPORT"], "Interface\\ICONS\\INV_Misc_Gift_01", build_menu, export_display, nil, nil, "Export", {0.00, 0.9, 0.07, 0.93}) --> localize
--> import buttonRaceChange
local import_display = function (_, _, custom_object, index)
local import_display = function(_, _, custom_object, index)
GameCooltip:Hide()
if (not custom_window.ImportBox) then
@@ -951,11 +951,11 @@
attribute_box:SetSize (180, 260)
attribute_box:Hide()
local button_onenter = function (self)
local button_onenter = function(self)
self:SetBackdropColor (.3, .3, .3, .3)
self.icon:SetBlendMode ("ADD")
end
local button_onleave = function (self)
local button_onleave = function(self)
self:SetBackdropColor (0, 0, 0, .2)
self.icon:SetBlendMode ("BLEND")
end
@@ -1064,7 +1064,7 @@
local icon_label = gump:NewLabel (box0, box0, "$parenIconLabel", "icon", Loc ["STRING_CUSTOM_ICON"], "GameFontHighlightLeft") --> localize-me
icon_label:SetPoint ("topleft", desc_label, "bottomleft", 0, -12)
local pickicon_callback = function (texture)
local pickicon_callback = function(texture)
box0.icontexture:SetTexture (texture)
end
@@ -1166,7 +1166,7 @@
modelFrameBackground:Hide()
modelFrameBackgroundIcon:Hide()
local selectedEncounterActor = function (actorName, model)
local selectedEncounterActor = function(actorName, model)
source_field:SetText (actorName)
source_dropdown:Select (4, true)
box1.sourceentry:Enable()
@@ -1176,7 +1176,7 @@
local actorsFrameButtons = {}
local buttonMouseOver = function (button)
local buttonMouseOver = function(button)
button.MyObject.image:SetBlendMode ("ADD")
button.MyObject.line:SetBlendMode ("ADD")
button.MyObject.label:SetTextColor (1, 1, 1, 1)
@@ -1192,7 +1192,7 @@
modelFrame:SetDisplayInfo (button.MyObject.model)
end
local buttonMouseOut = function (button)
local buttonMouseOut = function(button)
button.MyObject.image:SetBlendMode ("BLEND")
button.MyObject.line:SetBlendMode ("BLEND")
button.MyObject.label:SetTextColor (.8, .8, .8, .8)
@@ -1200,7 +1200,7 @@
modelFrame:Hide()
end
local EncounterSelect = function (_, _, instanceId, bossIndex, ej_id)
local EncounterSelect = function(_, _, instanceId, bossIndex, ej_id)
DetailsCustomSpellsFrame:Hide()
DetailsCustomActorsFrame:Hide()
@@ -1374,7 +1374,7 @@
local modelFrameTexture = modelFrame:CreateTexture (nil, "background")
modelFrameTexture:SetAllPoints()
local selectedEncounterActor = function (actorName)
local selectedEncounterActor = function(actorName)
target_field:SetText (actorName)
target_dropdown:Select (4, true)
box1.targetentry:Enable()
@@ -1384,7 +1384,7 @@
local actorsFrameButtons = {}
local buttonMouseOver = function (button)
local buttonMouseOver = function(button)
button.MyObject.image:SetBlendMode ("ADD")
button.MyObject.line:SetBlendMode ("ADD")
button.MyObject.label:SetTextColor (1, 1, 1, 1)
@@ -1400,7 +1400,7 @@
modelFrame:SetDisplayInfo (button.MyObject.model)
end
local buttonMouseOut = function (button)
local buttonMouseOut = function(button)
button.MyObject.image:SetBlendMode ("BLEND")
button.MyObject.line:SetBlendMode ("BLEND")
button.MyObject.label:SetTextColor (.8, .8, .8, .8)
@@ -1409,7 +1409,7 @@
modelFrame:Hide()
end
local EncounterSelect = function (_, _, instanceId, bossIndex, ej_id)
local EncounterSelect = function(_, _, instanceId, bossIndex, ej_id)
DetailsCustomSpellsFrame:Hide()
DetailsCustomActorsFrame:Show()
@@ -1549,8 +1549,8 @@
spellsFrame:SetPoint ("topleft", custom_window, "topright", 5, 0)
spellsFrame:Hide()
local selectedEncounterSpell = function (spellId)
local _, _, icon = _GetSpellInfo (spellId)
local selectedEncounterSpell = function(spellId)
local _, _, icon = _GetSpellInfo(spellId)
spellid_entry:SetText (spellId)
box0.icontexture:SetTexture (icon)
spellsFrame:Hide()
@@ -1559,7 +1559,7 @@
local spellsFrameButtons = {}
local buttonMouseOver = function (button)
local buttonMouseOver = function(button)
button.MyObject.image:SetBlendMode ("ADD")
button.MyObject.line:SetBlendMode ("ADD")
button.MyObject.label:SetTextColor (1, 1, 1, 1)
@@ -1568,14 +1568,14 @@
_detalhes:GameTooltipSetSpellByID (button.MyObject.spellid)
GameTooltip:Show()
end
local buttonMouseOut = function (button)
local buttonMouseOut = function(button)
button.MyObject.image:SetBlendMode ("BLEND")
button.MyObject.line:SetBlendMode ("BLEND")
button.MyObject.label:SetTextColor (.8, .8, .8, .8)
GameTooltip:Hide()
end
local EncounterSelect = function (_, _, instanceId, bossIndex)
local EncounterSelect = function(_, _, instanceId, bossIndex)
DetailsCustomSpellsFrame:Show()
DetailsCustomActorsFrame:Hide()
@@ -1626,7 +1626,7 @@
x = x + 100
end
local nome_magia, _, icone_magia = _GetSpellInfo (spell)
local nome_magia, _, icone_magia = _GetSpellInfo(spell)
thisButton.image:SetTexture (icone_magia)
thisButton.label:SetText (nome_magia)
thisButton:SetClickFunction (selectedEncounterSpell, spell)
@@ -1774,7 +1774,7 @@
end
end
local font_change = function (_, _, increase)
local font_change = function(_, _, increase)
if (increase) then
local file, size, flags = code_editor.editbox:GetFont()
code_editor.font_size = code_editor.font_size + 1
+2 -2
View File
@@ -30,7 +30,7 @@ function Details:Dump (...)
text_editor.editbox:SetBackdrop (nil)
text_editor:SetBackdrop (nil)
DetailsFramework:ReskinSlider (text_editor.scroll)
DetailsFramework:ReskinSlider(text_editor.scroll)
if (not text_editor.__background) then
text_editor.__background = text_editor:CreateTexture (nil, "background")
@@ -95,7 +95,7 @@ function _detalhes:ShowImportWindow (defaultText, confirmFunc, titleText)
importTextEditor.editbox:SetBackdrop (nil)
importTextEditor:SetBackdrop (nil)
DetailsFramework:ReskinSlider (importTextEditor.scroll)
DetailsFramework:ReskinSlider(importTextEditor.scroll)
if (not importTextEditor.__background) then
importTextEditor.__background = importTextEditor:CreateTexture (nil, "background")
+33 -33
View File
@@ -26,7 +26,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
--> frame strata options
local set_frame_strata = function (_, _, strata)
local set_frame_strata = function(_, _, strata)
Details.event_tracker.frame.strata = strata
Details:UpdateEventTrackerFrame()
end
@@ -38,7 +38,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
strataTable [5] = {value = "DIALOG", label = "DIALOG", onclick = set_frame_strata}
--> font options
local set_font_shadow= function (_, _, shadow)
local set_font_shadow= function(_, _, shadow)
Details.event_tracker.font_shadow = shadow
Details:UpdateEventTrackerFrame()
end
@@ -47,13 +47,13 @@ function Details:OpenEventTrackerOptions (from_options_panel)
fontShadowTable [2] = {value = "OUTLINE", label = "Outline", onclick = set_font_shadow}
fontShadowTable [3] = {value = "THICKOUTLINE", label = "Thick Outline", onclick = set_font_shadow}
local on_select_text_font = function (self, fixed_value, value)
local on_select_text_font = function(self, fixed_value, value)
Details.event_tracker.font_face = value
Details:UpdateEventTrackerFrame()
end
--> texture options
local set_bar_texture = function (_, _, value)
local set_bar_texture = function(_, _, value)
Details.event_tracker.line_texture = value
Details:UpdateEventTrackerFrame()
end
@@ -64,7 +64,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
for name, texturePath in pairs (textures) do
texTable [#texTable + 1] = {value = name, label = name, statusbar = texturePath, onclick = set_bar_texture}
end
table.sort (texTable, function (t1, t2) return t1.label < t2.label end)
table.sort (texTable, function(t1, t2) return t1.label < t2.label end)
--> options table
local options = {
@@ -74,7 +74,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
{
type = "toggle",
get = function() return Details.event_tracker.enabled end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.event_tracker.enabled = not Details.event_tracker.enabled
Details:LoadFramesForBroadcastTools()
end,
@@ -86,7 +86,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
{
type = "toggle",
get = function() return Details.event_tracker.frame.locked end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.event_tracker.frame.locked = not Details.event_tracker.frame.locked
Details:UpdateEventTrackerFrame()
end,
@@ -98,7 +98,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
{
type = "toggle",
get = function() return Details.event_tracker.frame.show_title end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.event_tracker.frame.show_title = not Details.event_tracker.frame.show_title
Details:UpdateEventTrackerFrame()
end,
@@ -112,7 +112,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
get = function()
return {Details.event_tracker.frame.backdrop_color[1], Details.event_tracker.frame.backdrop_color[2], Details.event_tracker.frame.backdrop_color[3], Details.event_tracker.frame.backdrop_color[4]}
end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local color = Details.event_tracker.frame.backdrop_color
color[1], color[2], color[3], color[4] = r, g, b, a
Details:UpdateEventTrackerFrame()
@@ -134,7 +134,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
{
type = "range",
get = function() return Details.event_tracker.line_height end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.event_tracker.line_height = value
Details:UpdateEventTrackerFrame()
end,
@@ -157,7 +157,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
get = function()
return {Details.event_tracker.line_color[1], Details.event_tracker.line_color[2], Details.event_tracker.line_color[3], Details.event_tracker.line_color[4]}
end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local color = Details.event_tracker.line_color
color[1], color[2], color[3], color[4] = r, g, b, a
Details:UpdateEventTrackerFrame()
@@ -170,7 +170,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
{
type = "range",
get = function() return Details.event_tracker.font_size end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.event_tracker.font_size = value
Details:UpdateEventTrackerFrame()
end,
@@ -186,7 +186,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
get = function()
return {Details.event_tracker.font_color[1], Details.event_tracker.font_color[2], Details.event_tracker.font_color[3], Details.event_tracker.font_color[4]}
end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local color = Details.event_tracker.font_color
color[1], color[2], color[3], color[4] = r, g, b, a
Details:UpdateEventTrackerFrame()
@@ -264,13 +264,13 @@ function Details:CreateEventTrackerFrame(parent, name)
local left_resize, right_resize = DF:CreateResizeGrips (f)
left_resize:SetScript ("OnMouseDown", function (self)
left_resize:SetScript ("OnMouseDown", function(self)
if (not f.resizing and not _detalhes.event_tracker.frame.locked) then
f.resizing = true
f:StartSizing ("bottomleft")
end
end)
left_resize:SetScript ("OnMouseUp", function (self)
left_resize:SetScript ("OnMouseUp", function(self)
if (f.resizing) then
f.resizing = false
f:StopMovingOrSizing()
@@ -278,13 +278,13 @@ function Details:CreateEventTrackerFrame(parent, name)
_detalhes.event_tracker.frame.height = f:GetHeight()
end
end)
right_resize:SetScript ("OnMouseDown", function (self)
right_resize:SetScript ("OnMouseDown", function(self)
if (not f.resizing and not _detalhes.event_tracker.frame.locked) then
f.resizing = true
f:StartSizing ("bottomright")
end
end)
right_resize:SetScript ("OnMouseUp", function (self)
right_resize:SetScript ("OnMouseUp", function(self)
if (f.resizing) then
f.resizing = false
f:StopMovingOrSizing()
@@ -293,7 +293,7 @@ function Details:CreateEventTrackerFrame(parent, name)
end
end)
f:SetScript ("OnSizeChanged", function (self)
f:SetScript ("OnSizeChanged", function(self)
end)
@@ -306,7 +306,7 @@ function Details:CreateEventTrackerFrame(parent, name)
local header_size = 20
--> on tick script
local lineOnTick = function (self, deltaTime)
local lineOnTick = function(self, deltaTime)
--> when this event occured on combat log
local gameTime = self.GameTime
@@ -331,7 +331,7 @@ function Details:CreateEventTrackerFrame(parent, name)
end
--> create a line on the scroll frame
local scroll_createline = function (self, index)
local scroll_createline = function(self, index)
local line = CreateFrame ("frame", "$parentLine" .. index, self,"BackdropTemplate")
line:EnableMouse (false)
@@ -412,7 +412,7 @@ function Details:CreateEventTrackerFrame(parent, name)
local ABILITYTABLE_ISENEMY = 9
local ABILITYTABLE_TARGETSERIAL = 10
local get_spec_or_class = function (serial, name)
local get_spec_or_class = function(serial, name)
local class
local spec = _detalhes.cached_specs [serial]
if (not spec) then
@@ -430,7 +430,7 @@ function Details:CreateEventTrackerFrame(parent, name)
return spec, class
end
local get_player_icon = function (spec, class)
local get_player_icon = function(spec, class)
if (spec) then
return [[Interface\AddOns\Details\images\spec_icons_normal]], unpack (_detalhes.class_specs_coords [spec])
elseif (class) then
@@ -440,7 +440,7 @@ function Details:CreateEventTrackerFrame(parent, name)
end
end
local add_role_and_class_color = function (player_name, player_serial)
local add_role_and_class_color = function(player_name, player_serial)
--> get the actor object
local actor = _detalhes.tabela_vigente[1]:GetActor (player_name)
@@ -492,7 +492,7 @@ function Details:CreateEventTrackerFrame(parent, name)
return availableSpace
end
local shrink_string = function (fontstring, size)
local shrink_string = function(fontstring, size)
local text = fontstring:GetText()
local loops = 20
while (fontstring:GetStringWidth() > size and loops > 0) do
@@ -505,7 +505,7 @@ function Details:CreateEventTrackerFrame(parent, name)
end
--refresh the scroll frame
local scroll_refresh = function (self, data, offset, total_lines)
local scroll_refresh = function(self, data, offset, total_lines)
local textSize = get_text_size()
@@ -529,7 +529,7 @@ function Details:CreateEventTrackerFrame(parent, name)
end
if (ability [ABILITYTABLE_SPELLTYPE] == SPELLTYPE_COOLDOWN) then
local spellName, _, spellIcon = GetSpellInfo (ability [ABILITYTABLE_SPELLID])
local spellName, _, spellIcon = GetSpellInfo(ability [ABILITYTABLE_SPELLID])
line.RightIcon:SetTexture (spellIcon)
line.RightIcon:SetTexCoord (.06, .94, .06, .94)
@@ -545,7 +545,7 @@ function Details:CreateEventTrackerFrame(parent, name)
line.ActionIcon:SetTexCoord (0, 0.125, 0, 1)
elseif (ability [ABILITYTABLE_SPELLTYPE] == SPELLTYPE_OFFENSIVE) then
local spellName, _, spellIcon = GetSpellInfo (ability [ABILITYTABLE_SPELLID])
local spellName, _, spellIcon = GetSpellInfo(ability [ABILITYTABLE_SPELLID])
line.RightIcon:SetTexture (spellIcon)
line.RightIcon:SetTexCoord (.06, .94, .06, .94)
line.RightText:SetText (spellName)
@@ -554,7 +554,7 @@ function Details:CreateEventTrackerFrame(parent, name)
line.ActionIcon:SetTexCoord (0.127, 0.25, 0, 1)
elseif (ability [ABILITYTABLE_SPELLTYPE] == SPELLTYPE_INTERRUPT) then
local spellNameInterrupted, _, spellIconInterrupted = GetSpellInfo (ability [ABILITYTABLE_EXTRASPELLID])
local spellNameInterrupted, _, spellIconInterrupted = GetSpellInfo(ability [ABILITYTABLE_EXTRASPELLID])
line.RightIcon:SetTexture (spellIconInterrupted)
line.RightIcon:SetTexCoord (.06, .94, .06, .94)
line.RightText:SetText (spellNameInterrupted)
@@ -563,7 +563,7 @@ function Details:CreateEventTrackerFrame(parent, name)
line.ActionIcon:SetTexCoord (0.251, 0.375, 0, 1)
elseif (ability [ABILITYTABLE_SPELLTYPE] == SPELLTYPE_CROWDCONTROL) then
local spellName, _, spellIcon = GetSpellInfo (ability [ABILITYTABLE_SPELLID])
local spellName, _, spellIcon = GetSpellInfo(ability [ABILITYTABLE_SPELLID])
line.RightIcon:SetTexture (spellIcon)
line.RightIcon:SetTexCoord (.06, .94, .06, .94)
@@ -612,7 +612,7 @@ function Details:CreateEventTrackerFrame(parent, name)
scrollframe:SetPoint ("bottomright", f, "bottomright", 0, 0)
--> update line - used by 'UpdateWorldTrackerLines' function
local update_line = function (line)
local update_line = function(line)
--> get the line index
local index = line.Index
@@ -730,20 +730,20 @@ function Details:CreateEventTrackerFrame(parent, name)
local OBJECT_TYPE_ENEMY = 0x00000040
--> combat parser
local is_player = function (flag)
local is_player = function(flag)
if (not flag) then
return false
end
return bit.band (flag, OBJECT_TYPE_PLAYER) ~= 0
end
local is_enemy = function (flag)
local is_enemy = function(flag)
if (not flag) then
return false
end
return bit.band (flag, OBJECT_TYPE_ENEMY) ~= 0
end
combatLog:SetScript ("OnEvent", function (self, event)
combatLog:SetScript ("OnEvent", function(self, event)
local time, token, hidding, caster_serial, caster_name, caster_flags, caster_flags2, target_serial, target_name, target_flags, target_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool = CombatLogGetCurrentEventInfo()
local added = false
+30 -30
View File
@@ -200,8 +200,8 @@ function Details:OpenForge()
{name = L["STRING_FORGE_HEADER_FLAG"], width = 100, type = "entry", func = no_func},
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
fill_fillrows = function (index, self)
fill_gettotal = function(self) return #self.module.data end,
fill_fillrows = function(index, self)
local data = self.module.data [index]
if (data) then
return {
@@ -283,8 +283,8 @@ function Details:OpenForge()
{name = L["STRING_FORGE_HEADER_FLAG"], width = 100, type = "entry", func = no_func},
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
fill_fillrows = function (index, self)
fill_gettotal = function(self) return #self.module.data end,
fill_fillrows = function(index, self)
local data = self.module.data [index]
if (data) then
return {
@@ -351,8 +351,8 @@ function Details:OpenForge()
{name = L["STRING_FORGE_HEADER_FLAG"], width = 100, type = "entry", func = no_func},
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
fill_fillrows = function (index, self)
fill_gettotal = function(self) return #self.module.data end,
fill_fillrows = function(index, self)
local data = self.module.data [index]
if (data) then
return {
@@ -382,21 +382,21 @@ function Details:OpenForge()
end
end
local spell_open_aura_creator = function (row)
local spell_open_aura_creator = function(row)
local data = all_modules [1].data [row]
local spellid = data[1]
local spellname, _, spellicon = GetSpellInfo (spellid)
local spellname, _, spellicon = GetSpellInfo(spellid)
Details:OpenAuraPanel (spellid, spellname, spellicon, data[3])
end
local spell_encounter_open_aura_creator = function (row)
local spell_encounter_open_aura_creator = function(row)
local data = all_modules [2].data [row]
local spellID = data[1]
local encounterID = data [2]
local enemyName = data [3]
local encounterName = data [4]
local spellname, _, spellicon = GetSpellInfo (spellID)
local spellname, _, spellicon = GetSpellInfo(spellID)
Details:OpenAuraPanel (spellID, spellname, spellicon, encounterID)
end
@@ -464,7 +464,7 @@ function Details:OpenForge()
if (can_add ) then
if (filter_name ~= "") then
local spellName = GetSpellInfo (spellID)
local spellName = GetSpellInfo(spellID)
if (spellName) then
spellName = lower (spellName)
if (not spellName:find (lower_FilterSpellName)) then
@@ -497,8 +497,8 @@ function Details:OpenForge()
----{name = L["STRING_FORGE_HEADER_CREATEAURA"], width = 86, type = "button", func = spell_open_aura_creator, icon = [[Interface\AddOns\WeakAuras\Media\Textures\icon]], notext = true, iconalign = "center"},
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
fill_fillrows = function (index, self)
fill_gettotal = function(self) return #self.module.data end,
fill_fillrows = function(index, self)
local data = self.module.data [index]
if (data) then
local events = ""
@@ -509,7 +509,7 @@ function Details:OpenForge()
end
events = events:sub (1, #events - 3)
end
local spellName, _, spellIcon = GetSpellInfo (data[1])
local spellName, _, spellIcon = GetSpellInfo(data[1])
local classColor = RAID_CLASS_COLORS [data[2]] and RAID_CLASS_COLORS [data[2]].colorStr or "FFFFFFFF"
return {
index,
@@ -599,7 +599,7 @@ function Details:OpenForge()
if (can_add ) then
if (filter_name ~= "") then
local spellName = GetSpellInfo (spellID)
local spellName = GetSpellInfo(spellID)
if (spellName) then
spellName = lower (spellName)
if (not spellName:find (lower_FilterSpellName)) then
@@ -643,8 +643,8 @@ function Details:OpenForge()
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
fill_fillrows = function (index, self)
fill_gettotal = function(self) return #self.module.data end,
fill_fillrows = function(index, self)
local data = self.module.data [index]
if (data) then
@@ -745,8 +745,8 @@ function Details:OpenForge()
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
fill_fillrows = function (index, self)
fill_gettotal = function(self) return #self.module.data end,
fill_fillrows = function(index, self)
local data = self.module.data[index]
if (data) then
local npcId = data[1]
@@ -768,12 +768,12 @@ function Details:OpenForge()
-----------------------------------------------
local dbm_open_aura_creator = function (row)
local dbm_open_aura_creator = function(row)
local data = all_modules [4].data [row]
local spellname, spellicon, _
if (type (data [7]) == "number") then
spellname, _, spellicon = GetSpellInfo (data [7])
spellname, _, spellicon = GetSpellInfo(data [7])
else
if (data [7]) then
local spellid = data[7]:gsub ("ej", "")
@@ -862,8 +862,8 @@ function Details:OpenForge()
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
fill_fillrows = function (index, self)
fill_gettotal = function(self) return #self.module.data end,
fill_fillrows = function(index, self)
local data = self.module.data [index]
if (data) then
local encounter_id = data.id
@@ -874,7 +874,7 @@ function Details:OpenForge()
local spellName, _, spellIcon
if (abilityID) then
if (abilityID > 0) then
spellName, _, spellIcon = GetSpellInfo (abilityID)
spellName, _, spellIcon = GetSpellInfo(abilityID)
end
end
@@ -897,7 +897,7 @@ function Details:OpenForge()
-----------------------------------------------
local bw_open_aura_creator = function (row)
local bw_open_aura_creator = function(row)
local data = all_modules [5].data [row]
@@ -909,7 +909,7 @@ function Details:OpenForge()
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = DetailsFramework.EncounterJournal.EJ_GetSectionInfo (abs (spellid))
spellname, spellicon = title, abilityIcon
else
spellname, _, spellicon = GetSpellInfo (spellid)
spellname, _, spellicon = GetSpellInfo(spellid)
end
Details:OpenAuraPanel (data [2], spellname, spellicon, data.id, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = data [2], text = "Next " .. spellname .. " In", text_size = 72, icon = spellicon})
@@ -993,8 +993,8 @@ function Details:OpenForge()
--{name = L["STRING_FORGE_HEADER_CREATEAURA"], width = 120, type = "button", func = bw_open_aura_creator, icon = [[Interface\AddOns\WeakAuras\Media\Textures\icon]], notext = true, iconalign = "center"},
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
fill_fillrows = function (index, self)
fill_gettotal = function(self) return #self.module.data end,
fill_fillrows = function(index, self)
local data = self.module.data [index]
if (data) then
local encounter_id = data.id
@@ -1005,7 +1005,7 @@ function Details:OpenForge()
local spellName, _, spellIcon
if (abilityID) then
if (abilityID > 0) then
spellName, _, spellIcon = GetSpellInfo (abilityID)
spellName, _, spellIcon = GetSpellInfo(abilityID)
end
end
@@ -1029,7 +1029,7 @@ function Details:OpenForge()
local select_module = function (a, b, module_number)
local select_module = function(a, b, module_number)
if (current_module ~= module_number) then
local module = all_modules [current_module]
+8 -8
View File
@@ -49,29 +49,29 @@ function Details.OpenMacrosWindow()
local macrosAvailable = Details.MacroList
local OnEnterMacroButton = function (self)
local OnEnterMacroButton = function(self)
self:SetBackdropColor (unpack (scrollbox_line_backdrop_color_onenter))
end
local onLeaveMacroButton = function (self)
local onLeaveMacroButton = function(self)
self:SetBackdropColor (unpack (scrollbox_line_backdrop_color))
end
local updateMacroLine = function (self, index, title, desc, macroText)
local updateMacroLine = function(self, index, title, desc, macroText)
self.Title:SetText (title)
self.Desc:SetText (desc)
self.MacroTextEntry:SetText (macroText)
end
local textEntryOnFocusGained = function (self)
local textEntryOnFocusGained = function(self)
self:HighlightText()
end
local textEntryOnFocusLost = function (self)
local textEntryOnFocusLost = function(self)
self:HighlightText (0, 0)
end
local refreshMacroScrollbox = function (self, data, offset, totalLines)
local refreshMacroScrollbox = function(self, data, offset, totalLines)
for i = 1, totalLines do
local index = i + offset
local macro = macrosAvailable [index]
@@ -82,7 +82,7 @@ function Details.OpenMacrosWindow()
end
end
local macroListCreateLine = function (self, index)
local macroListCreateLine = function(self, index)
--create a new line
local line = CreateFrame ("button", "$parentLine" .. index, self,"BackdropTemplate")
@@ -132,7 +132,7 @@ function Details.OpenMacrosWindow()
macroScrollbox:SetBackdropColor (0, 0, 0, 0)
macroScrollbox:SetBackdropBorderColor (0, 0, 0, 1)
f.MacroScrollbox = macroScrollbox
DF:ReskinSlider (macroScrollbox)
DF:ReskinSlider(macroScrollbox)
macroScrollbox.__background:Hide()
+955 -971
View File
File diff suppressed because it is too large Load Diff
+41 -44
View File
@@ -1,11 +1,10 @@
local Details = _G.Details
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local g = Details.gump
local Details = _G.Details
local Loc = LibStub("AceLocale-3.0"):GetLocale( "Details" )
local gump = Details.gump
local _
function Details:OpenNewsWindow(textToShow, dumpValues, keeptext)
Details.latest_news_saw = Details.userversion
local newsFrame = Details:CreateOrOpenNewsWindow()
@@ -15,30 +14,30 @@ function Details:OpenNewsWindow(textToShow, dumpValues, keeptext)
newsFrame:Show()
return
end
if (textToShow and type (textToShow) == "table") then
DetailsNewsWindowLower:SetSize (450, 5000)
DetailsNewsWindowSlider:SetMinMaxValues (0, 5000)
DetailsNewsWindowText:SetHeight (5000)
local s = ""
for _, text in ipairs (textToShow) do
if (type (text) == "string" or type (text) == "number") then
s = s .. text .. "\n"
DetailsNewsWindowLower:SetSize(450, 5000)
DetailsNewsWindowSlider:SetMinMaxValues(0, 5000)
DetailsNewsWindowText:SetHeight(5000)
local returnString = ""
for _, text in ipairs(textToShow) do
if (type(text) == "string" or type(text) == "number") then
returnString = returnString .. text .. "\n"
end
end
if (dumpValues) then
s = Details.table.dump (textToShow)
returnString = Details.table.dump(textToShow)
end
if (keeptext) then
newsFrame:Text ((DetailsNewsWindowText:GetText() or "") .. "\n\n" .. s)
newsFrame:Text((DetailsNewsWindowText:GetText() or "") .. "\n\n" .. returnString)
else
if (dumpValues) then
newsFrame.DumpTableFrame:SetText (s)
newsFrame.DumpTableFrame:SetText (returnString)
else
newsFrame:Text (s)
newsFrame:Text (returnString)
end
end
else
@@ -62,10 +61,8 @@ end
function Details:CreateOrOpenNewsWindow()
local frame = _G.DetailsNewsWindow
if (not frame) then
--build news frame
if (not frame) then
frame = DetailsFramework:CreateSimplePanel(UIParent, 480, 560, "Details! Damage Meter " .. Details.version, "DetailsNewsWindow", panel_options, db)
tinsert(UISpecialFrames, "DetailsNewsWindow")
frame:SetPoint("left", UIParent, "left", 10, 0)
@@ -83,30 +80,30 @@ function Details:CreateOrOpenNewsWindow()
frame.imageFrame.texture = frame.imageFrame:CreateTexture(nil, "overlay")
frame.imageFrame.texture:SetPoint("topleft", frame.imageFrame, "topleft")
local dumpFrame = g:CreateTextEntry(frame, function()end, 500, 612, "DumpTable", "$parentDumpTable")
dumpFrame.editbox:SetMultiLine (true)
local dumpFrame = gump:CreateTextEntry(frame, function()end, 500, 612, "DumpTable", "$parentDumpTable")
dumpFrame.editbox:SetMultiLine(true)
dumpFrame:SetPoint("topleft", frame, "topleft", 8, -68)
dumpFrame:SetBackdrop(nil)
dumpFrame.editbox:SetBackdrop(nil)
dumpFrame.editbox:SetJustifyH("left")
dumpFrame.editbox:SetJustifyV("top")
frame.DumpTableFrame = dumpFrame
local frame_upper = CreateFrame("scrollframe", nil, frame, "BackdropTemplate")
local frame_lower = CreateFrame("frame", "DetailsNewsWindowLower", frame_upper, "BackdropTemplate")
frame_lower:SetSize (450, 2000)
frame_upper:SetPoint ("topleft", frame, "topleft", 10, -30)
frame_upper:SetWidth(445)
frame_upper:SetHeight(500)
frame_upper:SetBackdrop({
frame.DumpTableFrame = dumpFrame
local frameUpper = CreateFrame("scrollframe", nil, frame, "BackdropTemplate")
local frameLower = CreateFrame("frame", "DetailsNewsWindowLower", frameUpper, "BackdropTemplate")
frameLower:SetSize (450, 2000)
frameUpper:SetPoint ("topleft", frame, "topleft", 10, -30)
frameUpper:SetWidth(445)
frameUpper:SetHeight(500)
frameUpper:SetBackdrop({
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
tile = true, tileSize = 16,
insets = {left = 1, right = 1, top = 0, bottom = 1},})
frame_upper:SetBackdropColor (.1, .1, .1, .3)
frame_upper:SetScrollChild (frame_lower)
frameUpper:SetBackdropColor (.1, .1, .1, .3)
frameUpper:SetScrollChild (frameLower)
local slider = CreateFrame ("slider", "DetailsNewsWindowSlider", frame, "BackdropTemplate")
slider.bg = slider:CreateTexture (nil, "background")
@@ -120,15 +117,15 @@ function Details:CreateOrOpenNewsWindow()
slider:SetThumbTexture (slider.thumb)
slider:SetOrientation ("vertical");
slider:SetSize (16, 499)
slider:SetPoint ("topleft", frame_upper, "topright")
slider:SetPoint ("topleft", frameUpper, "topright")
slider:SetMinMaxValues (0, 2000)
slider:SetValue(0)
slider:SetScript("OnValueChanged", function (self)
frame_upper:SetVerticalScroll (self:GetValue())
slider:SetScript("OnValueChanged", function(self)
frameUpper:SetVerticalScroll (self:GetValue())
end)
frame_upper:EnableMouseWheel (true)
frame_upper:SetScript("OnMouseWheel", function (self, delta)
frameUpper:EnableMouseWheel (true)
frameUpper:SetScript("OnMouseWheel", function(self, delta)
local current = slider:GetValue()
if (IsShiftKeyDown() and (delta > 0)) then
slider:SetValue(0)
@@ -142,8 +139,8 @@ function Details:CreateOrOpenNewsWindow()
end)
--> text box
local texto = frame_lower:CreateFontString("DetailsNewsWindowText", "overlay", "GameFontNormal")
texto:SetPoint("topleft", frame_lower, "topleft")
local texto = frameLower:CreateFontString("DetailsNewsWindowText", "overlay", "GameFontNormal")
texto:SetPoint("topleft", frameLower, "topleft")
texto:SetJustifyH("left")
texto:SetJustifyV("top")
texto:SetTextColor(1, 1, 1)
File diff suppressed because it is too large Load Diff
+20 -20
View File
@@ -42,13 +42,13 @@ function Details.OpenPlaterIntegrationWindow()
--> anchor text function
local anchor_names = {"Top Left", "Left", "Bottom Left", "Bottom", "Bottom Right", "Right", "Top Right", "Top", "Center", "Inner Left", "Inner Right", "Inner Top", "Inner Bottom"}
local build_anchor_side_table = function (member)
local build_anchor_side_table = function(member)
local t = {}
for i = 1, 13 do
tinsert (t, {
label = anchor_names[i],
value = i,
onclick = function (_, _, value)
onclick = function(_, _, value)
Details.plater [member].side = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -67,7 +67,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "toggle",
get = function() return Details.plater.realtime_dps_enabled end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_enabled = value
Details:RefreshPlaterIntegration()
@@ -87,7 +87,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.realtime_dps_size end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_size = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -106,7 +106,7 @@ function Details.OpenPlaterIntegrationWindow()
local color = Details.plater.realtime_dps_color
return {color [1], color [2], color [3], color [4]}
end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local color = Details.plater.realtime_dps_color
color[1], color[2], color[3], color[4] = r, g, b, a
if (Plater) then
@@ -121,7 +121,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "toggle",
get = function() return Details.plater.realtime_dps_shadow end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_shadow = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -143,7 +143,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.realtime_dps_anchor.x end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_anchor.x = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -159,7 +159,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.realtime_dps_anchor.y end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_anchor.y = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -179,7 +179,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "toggle",
get = function() return Details.plater.realtime_dps_player_enabled end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_player_enabled = value
Details:RefreshPlaterIntegration()
@@ -199,7 +199,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.realtime_dps_player_size end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_player_size = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -218,7 +218,7 @@ function Details.OpenPlaterIntegrationWindow()
local color = Details.plater.realtime_dps_player_color
return {color [1], color [2], color [3], color [4]}
end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local color = Details.plater.realtime_dps_player_color
color[1], color[2], color[3], color[4] = r, g, b, a
if (Plater) then
@@ -233,7 +233,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "toggle",
get = function() return Details.plater.realtime_dps_player_shadow end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_player_shadow = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -255,7 +255,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.realtime_dps_player_anchor.x end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_player_anchor.x = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -271,7 +271,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.realtime_dps_player_anchor.y end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_player_anchor.y = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -291,7 +291,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "toggle",
get = function() return Details.plater.damage_taken_enabled end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.damage_taken_enabled = value
Details:RefreshPlaterIntegration()
@@ -311,7 +311,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.damage_taken_size end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.damage_taken_size = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -330,7 +330,7 @@ function Details.OpenPlaterIntegrationWindow()
local color = Details.plater.damage_taken_color
return {color [1], color [2], color [3], color [4]}
end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local color = Details.plater.damage_taken_color
color[1], color[2], color[3], color[4] = r, g, b, a
if (Plater) then
@@ -345,7 +345,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "toggle",
get = function() return Details.plater.damage_taken_shadow end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.damage_taken_shadow = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -367,7 +367,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.damage_taken_anchor.x end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.damage_taken_anchor.x = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -383,7 +383,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.damage_taken_anchor.y end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.damage_taken_anchor.y = value
if (Plater) then
Plater.UpdateAllPlates()
File diff suppressed because it is too large Load Diff
+57 -25
View File
@@ -1,10 +1,10 @@
local Details = _G.Details
local DF = _G.DetailsFramework
local detailsFramework = _G.DetailsFramework
local breakdownWindowPlayerList = {}
local unpack = _G.unpack
local unpack = table.unpack or unpack
local C_Timer = _G.C_Timer
local tinsert = _G.tinsert
@@ -15,16 +15,17 @@
local scrollbox_line_backdrop_color_selected = {.6, .6, .1, 0.7}
local scrollbox_line_backdrop_color_highlight = {.9, .9, .9, 0.5}
local player_scroll_size = {180, 288}
function breakdownWindowPlayerList.CreatePlayerListFrame()
local f = _G.DetailsPlayerDetailsWindow
local refreshPlayerList = function(self, data, offset, totalLines)
--update the scroll
local topResult = data[1]
if (topResult) then
topResult = topResult.total
end
for i = 1, totalLines do
local index = i + offset
local playerObject = data[index]
@@ -36,20 +37,20 @@
end
end
end
local lineOnClick = function(self)
if (self.playerObject ~= Details:GetPlayerObjectFromBreakdownWindow()) then
Details:OpenPlayerBreakdown(Details:GetActiveWindowFromBreakdownWindow(), self.playerObject)
f.playerScrollBox:Refresh()
end
end
local lineOnEnter = function(self)
self:SetBackdropColor(unpack(scrollbox_line_backdrop_color_highlight))
self.specIcon:SetBlendMode("ADD")
self.roleIcon:SetBlendMode("ADD")
end
local lineOnLeave = function(self)
if (self.isSelected) then
self:SetBackdropColor(unpack(scrollbox_line_backdrop_color_selected))
@@ -78,7 +79,6 @@
self.specIcon:SetTexCoord(.1, .9, .1, .9)
else
local specIcon, L, R, T, B = Details:GetSpecIcon(self.playerObject.spec, false)
local specId, specName, specDescription, specIconId, specClass
if (specIcon) then
self.specIcon:SetTexture(specIcon)
@@ -87,7 +87,7 @@
if (DetailsFramework.IsTimewalkWoW()) then
specRole = "NONE"
else
specId, specName, specDescription, specIconId, specRole, specClass = _G.GetSpecializationInfoByID(self.playerObject.spec)
specRole = select(5, _G.GetSpecializationInfoByID(self.playerObject.spec))
end
else
self.specIcon:SetTexture("")
@@ -106,14 +106,14 @@
else
self.roleIcon:SetTexture("")
end
--do not show the role icon
self.roleIcon:SetTexture("")
--set the player name
self.playerName:SetText(Details:GetOnlyName(self.playerObject.nome))
self.rankText:SetText(self.index)
--set the player class name
self.className:SetText(string.lower(_G.UnitClass(self.playerObject.nome) or self.playerObject:Class()))
@@ -124,6 +124,21 @@
self.totalStatusBar:SetValue(self.playerObject.total)
end
--get a Details! window
local lowerInstanceId = Details:GetLowerInstanceNumber()
local fontFile
local fontSize
local fontOutline
if (lowerInstanceId) then
local instance = Details:GetInstance(lowerInstanceId)
if (instance) then
fontFile = instance.row_info.font_face
fontSize = instance.row_info.font_size
fontOutline = instance.row_info.textL_outline
end
end
local createPlayerLine = function(self, index)
--create a new line
local line = _G.CreateFrame("button", "$parentLine" .. index, self, "BackdropTemplate")
@@ -144,18 +159,29 @@
local specIcon = line:CreateTexture("$parentSpecIcon", "artwork")
specIcon:SetSize(player_line_height, player_line_height)
specIcon:SetAlpha(0.71)
local roleIcon = line:CreateTexture("$parentRoleIcon", "overlay")
roleIcon:SetSize((player_line_height-2) / 2, (player_line_height-2) / 2)
roleIcon:SetAlpha(0.71)
local playerName = DF:CreateLabel(line, "", "GameFontNormal")
local playerName = detailsFramework:CreateLabel(line, "", 11, "white", "GameFontNormal")
if (fontFile) then
playerName.fontface = fontFile
end
if (fontSize) then
playerName.fontsize = fontSize
end
if (fontOutline) then
playerName.outline = fontOutline
end
playerName.textcolor = {1, 1, 1, .9}
playerName.textsize = 11
local className = DF:CreateLabel(line, "", "GameFontNormal")
local className = detailsFramework:CreateLabel(line, "", "GameFontNormal")
className.textcolor = {.95, .8, .2, 0}
className.textsize = 9
local rankText = DF:CreateLabel(line, "", "GameFontNormal")
local rankText = detailsFramework:CreateLabel(line, "", "GameFontNormal")
rankText.textcolor = {.3, .3, .3, .7}
rankText.textsize = 13
@@ -184,9 +210,9 @@
return line
end
local playerScroll = DF:CreateScrollBox(f, "$parentPlayerScrollBox", refreshPlayerList, {}, player_scroll_size[1] + 22, player_scroll_size[2], scrollbox_lines, player_line_height)
DF:ReskinSlider (playerScroll)
local playerScroll = detailsFramework:CreateScrollBox(f, "$parentPlayerScrollBox", refreshPlayerList, {}, player_scroll_size[1] + 22, player_scroll_size[2], scrollbox_lines, player_line_height)
detailsFramework:ReskinSlider(playerScroll)
playerScroll.ScrollBar:ClearAllPoints()
playerScroll.ScrollBar:SetPoint("topright", playerScroll, "topright", -2, -17)
playerScroll.ScrollBar:SetPoint("bottomright", playerScroll, "bottomright", -2, 17)
@@ -196,12 +222,12 @@
playerScroll:SetBackdropColor(0, 0, 0, 0.2)
playerScroll:SetBackdropBorderColor(0, 0, 0, 1)
f.playerScrollBox = playerScroll
--create the scrollbox lines
for i = 1, scrollbox_lines do
playerScroll:CreateLine(createPlayerLine)
end
local classIds = {
WARRIOR = 1,
PALADIN = 2,
@@ -221,21 +247,23 @@
function breakdownWindowPlayerList.BuildPlayerList()
local segment = Details:GetCombatFromBreakdownWindow()
local playerTable = {}
if (segment) then
local displayType = Details:GetDisplayTypeFromBreakdownWindow()
local containerType = displayType == 1 and DETAILS_ATTRIBUTE_DAMAGE or DETAILS_ATTRIBUTE_HEAL
local container = segment:GetContainer(containerType)
for index, playerObject in container:ListActors() do
if (playerObject:IsPlayer()) then
local unitClassID = classIds [playerObject:Class()] or 13
local unitName = playerObject:Name()
local playerPosition = (((unitClassID or 0) + 128) ^ 4) + tonumber (string.byte (unitName, 1) .. "" .. string.byte (unitName, 2))
local playerPosition = (((unitClassID or 0) + 128) ^ 4) + tonumber (string.byte(unitName, 1) .. "" .. string.byte(unitName, 2))
tinsert(playerTable, {playerObject, playerPosition, playerObject.total})
end
end
end
table.sort(playerTable, DF.SortOrder3)
table.sort(playerTable, detailsFramework.SortOrder3)
local resultTable = {}
for i = 1, #playerTable do
@@ -263,5 +291,9 @@
end)
end
breakdownWindowPlayerList.CreatePlayerListFrame()
function Details.PlayerBreakdown.CreatePlayerListFrame()
if (not Details.PlayerBreakdown.playerListFrameCreated) then
breakdownWindowPlayerList.CreatePlayerListFrame()
Details.PlayerBreakdown.playerListFrameCreated = true
end
end
+1 -1
View File
@@ -48,7 +48,7 @@ function Details:OpenProfiler()
--> get the new profile name
local current_profile = Details:GetCurrentProfileName()
local on_select_profile = function (_, _, profilename)
local on_select_profile = function(_, _, profilename)
if (profilename ~= Details:GetCurrentProfileName()) then
Details:ApplyProfile (profilename)
if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown()) then
+2 -2
View File
@@ -37,7 +37,7 @@ local textentry = DF:NewSpecialLuaEditorEntry (panel, scrollWidth, 555, "editbox
textentry:SetPoint ("topleft", panel, "topleft", 10, y)
DF:ApplyStandardBackdrop (textentry)
DF:SetFontSize (textentry.editbox, 14)
DF:ReskinSlider (textentry.scroll)
DF:ReskinSlider(textentry.scroll)
local arg1_button = DF:NewButton (panel, nil, "$parentButton1", nil, 80, 20, function() textentry.editbox:Insert ("{data1}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "1"), 1)
local arg2_button = DF:NewButton (panel, nil, "$parentButton2", nil, 80, 20, function() textentry.editbox:Insert ("{data2}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "2"), 1)
@@ -157,7 +157,7 @@ local function ColorSelection ( self, ColorCode )
self:HighlightText( Start, #ColorCode + ( #Replacement - #Selection ) + #COLOR_END + End );
end
local color_func = function (_, r, g, b, a)
local color_func = function(_, r, g, b, a)
local hex = Details:hex (a*255)..Details:hex (r*255)..Details:hex (g*255)..Details:hex (b*255)
ColorSelection ( textentry.editbox, "|c" .. hex)
end
+3 -3
View File
@@ -42,7 +42,7 @@ function Details.OpenRunCodeWindow()
code_editor.editbox:SetBackdrop (nil)
code_editor:SetBackdrop (nil)
DF:ReskinSlider (code_editor.scroll)
DF:ReskinSlider(code_editor.scroll)
if (not code_editor.__background) then
code_editor.__background = code_editor:CreateTexture (nil, "background")
@@ -74,7 +74,7 @@ function Details.OpenRunCodeWindow()
errortext_label:SetPoint ("left", errortext_frame, "left", 3, 0)
code_editor.NextCodeCheck = 0.33
code_editor:HookScript ("OnUpdate", function (self, deltaTime)
code_editor:HookScript ("OnUpdate", function(self, deltaTime)
code_editor.NextCodeCheck = code_editor.NextCodeCheck - deltaTime
if (code_editor.NextCodeCheck < 0) then
@@ -97,7 +97,7 @@ function Details.OpenRunCodeWindow()
end)
--> script selector
local on_select_CodeType_option = function (self, fixedParameter, value)
local on_select_CodeType_option = function(self, fixedParameter, value)
--> set the current editing code type
f.EditingCode = Details.RunCodeTypes [value].Value
f.EditingCodeKey = Details.RunCodeTypes [value].ProfileKey
+3 -3
View File
@@ -103,7 +103,7 @@ function Details:ScrollDamage()
end
end
local lineOnEnter = function (self)
local lineOnEnter = function(self)
if (self.IsCritical) then
self:SetBackdropColor(unpack(backdrop_color_is_critical_on_enter))
else
@@ -119,7 +119,7 @@ function Details:ScrollDamage()
end
end
local lineOnLeave = function (self)
local lineOnLeave = function(self)
if (self.IsCritical) then
self:SetBackdropColor(unpack(backdrop_color_is_critical))
else
@@ -207,7 +207,7 @@ function Details:ScrollDamage()
local combatLogReader = CreateFrame("frame")
local playerSerial = UnitGUID("player")
combatLogReader:SetScript("OnEvent", function (self)
combatLogReader:SetScript("OnEvent", function(self)
local timew, token, hidding, sourceSerial, sourceName, sourceFlag, sourceFlag2, targetSerial, targetName, targetFlag, targetFlag2, spellID, spellName, spellType, amount, overKill, school, resisted, blocked, absorbed, isCritical = CombatLogGetCurrentEventInfo()
if (sourceSerial == playerSerial) then
if (token == "SPELL_DAMAGE" or token == "SPELL_PERIODIC_DAMAGE" or token == "RANGE_DAMAGE" or token == "DAMAGE_SHIELD") then
+14 -14
View File
@@ -263,7 +263,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
--> report results
function f.BuildReport()
if (f.LatestResourceTable) then
local reportFunc = function (IsCurrent, IsReverse, AmtLines)
local reportFunc = function(IsCurrent, IsReverse, AmtLines)
local bossName = f.select_boss.label:GetText()
local bossDiff = f.select_diff.label:GetText()
local guildName = f.select_guild.label:GetText()
@@ -363,7 +363,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
--> select raid:
local onRaidSelect = function (_, _, raid)
local onRaidSelect = function(_, _, raid)
Details.rank_window.last_raid = raid
f:UpdateDropdowns (true)
on_select()
@@ -376,7 +376,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
raid_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select boss:
local on_boss_select = function (_, _, boss)
local on_boss_select = function(_, _, boss)
on_select()
end
local build_boss_list = function()
@@ -387,7 +387,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
boss_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select difficulty:
local on_diff_select = function (_, _, diff)
local on_diff_select = function(_, _, diff)
Details.rank_window.last_difficulty = diff
on_select()
end
@@ -400,7 +400,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
diff_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select role:
local on_role_select = function (_, _, role)
local on_role_select = function(_, _, role)
on_select()
end
local build_role_list = function()
@@ -414,7 +414,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
role_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select guild:
local on_guild_select = function (_, _, guild)
local on_guild_select = function(_, _, guild)
on_select()
end
local build_guild_list = function()
@@ -425,7 +425,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
guild_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select playerbase:
local on_player_select = function (_, _, player)
local on_player_select = function(_, _, player)
on_select()
end
local build_player_list = function()
@@ -439,7 +439,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
player_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select player:
local onPlayer2Select = function (_, _, player)
local onPlayer2Select = function(_, _, player)
f.latest_player_selected = player
f:BuildPlayerTable (player)
end
@@ -551,7 +551,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
end
table.sort (bossList, function (t1, t2) return t1.label < t2.label end)
table.sort (bossList, function(t1, t2) return t1.label < t2.label end)
diff_dropdown:Refresh()
@@ -632,7 +632,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
end
table.sort (bossList, function (t1, t2) return t1.label < t2.label end)
table.sort (bossList, function(t1, t2) return t1.label < t2.label end)
boss_dropdown:Refresh()
end
@@ -690,7 +690,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
--> update graphic
if (not f.gframe) then
local onenter = function (self)
local onenter = function(self)
GameCooltip:Reset()
GameCooltip:SetType ("tooltip")
GameCooltip:Preset (2)
@@ -703,7 +703,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
GameCooltip:SetOwner (self.ball.tooltip_anchor)
GameCooltip:Show()
end
local onleave = function (self)
local onleave = function(self)
GameCooltip:Hide()
end
f.gframe = DF:CreateGFrame (f, 650, 400, 35, onenter, onleave, "gframe", "$parentGF")
@@ -795,7 +795,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
t [1] = i .. ". " .. t [1]
end
fillpanel:SetFillFunction (function (index) return sortTable [index] end)
fillpanel:SetFillFunction (function(index) return sortTable [index] end)
fillpanel:SetTotalFunction (function() return #sortTable end)
fillpanel:UpdateRows (header)
fillpanel:Refresh()
@@ -870,7 +870,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
end
fillpanel:SetFillFunction (function (index) return players [index] end)
fillpanel:SetFillFunction (function(index) return players [index] end)
fillpanel:SetTotalFunction (function() return #players end)
fillpanel:UpdateRows (header)
+8 -8
View File
@@ -98,7 +98,7 @@ do
end
end
local on_click_all_switch_button = function (self, button)
local on_click_all_switch_button = function(self, button)
if (button == "LeftButton") then
local attribute = self.attribute
local subAttribute = self.sub_attribute
@@ -175,7 +175,7 @@ do
end
end
local create_all_switch_button = function (attribute, sub_attribute, x, y)
local create_all_switch_button = function(attribute, sub_attribute, x, y)
local button = CreateFrame ("button", "DetailsAllAttributesFrame" .. attribute .. sub_attribute, allDisplaysFrame)
button:SetSize (130, 16)
button.texture = button:CreateTexture (nil, "overlay")
@@ -488,7 +488,7 @@ function Details.switch:ShowMe(instancia)
elseif (IsShiftKeyDown()) then
if (not Details.switch.segments_blocks) then
local segment_switch = function (self, button, segment)
local segment_switch = function(self, button, segment)
if (button == "LeftButton") then
Details.switch.current_instancia:TrocaTabela (segment)
Details.switch.CloseMe()
@@ -497,26 +497,26 @@ function Details.switch:ShowMe(instancia)
end
end
local hide_label = function (self)
local hide_label = function(self)
self.texture:Hide()
self.button:Hide()
self.background:Hide()
self:Hide()
end
local show_label = function (self)
local show_label = function(self)
self.texture:Show()
self.button:Show()
self.background:Show()
self:Show()
end
local on_enter = function (self)
local on_enter = function(self)
--self.MyObject.this_background:SetBlendMode ("ADD")
--self.MyObject.boss_texture:SetBlendMode ("ADD")
end
local on_leave = function (self)
local on_leave = function(self)
self.MyObject.this_background:SetBlendMode ("BLEND")
self.MyObject.boss_texture:SetBlendMode ("BLEND")
end
@@ -1078,7 +1078,7 @@ end
local scroll = CreateFrame ("scrollframe", "DetailsSwitchPanelScroll", DetailsSwitchPanel, "FauxScrollFrameTemplate")
scroll:SetAllPoints()
scroll:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 20, Details.switch.Update) end) --altura
scroll:SetScript ("OnVerticalScroll", function(self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 20, Details.switch.Update) end) --altura
scroll.ScrollBar:Hide()
scroll.ScrollBar.ScrollUpButton:Hide()
scroll.ScrollBar.ScrollDownButton:Hide()
+16 -16
View File
@@ -68,7 +68,7 @@ local text_dispell_prototype = {
["events"] = "COMBAT_LOG_EVENT_UNFILTERED, ENCOUNTER_START",
["use_spellName"] = false,
["use_spellId"] = false,
["custom"] = "function (event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)\n if (event == \"COMBAT_LOG_EVENT_UNFILTERED\") then\n \n if ((token == \"SPELL_DISPEL\" or token == \"SPELL_STOLEN\") and extraSpellID == 159947) then\n aura_env.dispelled = aura_env.dispelled + 1\n aura_env.dispels_by [who_name] = (aura_env.dispels_by [who_name] or 0) + 1\n \n aura_env.text = aura_env.text .. \"|cffd2e8ff\" .. who_name .. \" (\" .. aura_env.dispels_by [who_name] .. \") \".. \"|r\\n\"\n \n if (select (2, aura_env.text:gsub (\"\\n\", \"\")) == 9) then\n aura_env.text = aura_env.text:gsub (\".-\\n\", \"\", 1)\n end\n return true\n end \n else\n aura_env.text = \"\"\n aura_env.success = 0\n aura_env.dispelled = 0\n wipe (aura_env.dispels_by)\n return true \n end\nend",
["custom"] = "function(event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)\n if (event == \"COMBAT_LOG_EVENT_UNFILTERED\") then\n \n if ((token == \"SPELL_DISPEL\" or token == \"SPELL_STOLEN\") and extraSpellID == 159947) then\n aura_env.dispelled = aura_env.dispelled + 1\n aura_env.dispels_by [who_name] = (aura_env.dispels_by [who_name] or 0) + 1\n \n aura_env.text = aura_env.text .. \"|cffd2e8ff\" .. who_name .. \" (\" .. aura_env.dispels_by [who_name] .. \") \".. \"|r\\n\"\n \n if (select (2, aura_env.text:gsub (\"\\n\", \"\")) == 9) then\n aura_env.text = aura_env.text:gsub (\".-\\n\", \"\", 1)\n end\n return true\n end \n else\n aura_env.text = \"\"\n aura_env.success = 0\n aura_env.dispelled = 0\n wipe (aura_env.dispels_by)\n return true \n end\nend",
["spellIds"] = {
},
["use_message"] = true,
@@ -176,7 +176,7 @@ local text_interrupt_prototype = {
},
["use_spellName"] = false,
["use_spellId"] = false,
["custom"] = "function (evento, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)\n \n if (evento == \"COMBAT_LOG_EVENT_UNFILTERED\") then\n \n if (token == \"SPELL_CAST_SUCCESS\" and spellid == 165416) then\n aura_env.success = aura_env.success + 1\n aura_env.text = aura_env.text .. \"SUCCESS! (\" .. aura_env.success .. \")\\n\"\n \n return true\n \n elseif (token == \"SPELL_INTERRUPT\" and extraSpellID == 165416) then\n aura_env.interrupted = aura_env.interrupted + 1\n aura_env.text = aura_env.text .. who_name .. \" (\" .. aura_env.interrupted .. \") \".. \"\\n\"\n return true\n end\n else\n aura_env.text = \"\"\n aura_env.success = 0\n aura_env.interrupted = 0\n return true \n end\n \nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
["custom"] = "function(evento, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)\n \n if (evento == \"COMBAT_LOG_EVENT_UNFILTERED\") then\n \n if (token == \"SPELL_CAST_SUCCESS\" and spellid == 165416) then\n aura_env.success = aura_env.success + 1\n aura_env.text = aura_env.text .. \"SUCCESS! (\" .. aura_env.success .. \")\\n\"\n \n return true\n \n elseif (token == \"SPELL_INTERRUPT\" and extraSpellID == 165416) then\n aura_env.interrupted = aura_env.interrupted + 1\n aura_env.text = aura_env.text .. who_name .. \" (\" .. aura_env.interrupted .. \") \".. \"\\n\"\n return true\n end\n else\n aura_env.text = \"\"\n aura_env.success = 0\n aura_env.interrupted = 0\n return true \n end\n \nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
["events"] = "COMBAT_LOG_EVENT_UNFILTERED, ENCOUNTER_START",
["use_message"] = true,
["unevent"] = "timed",
@@ -1457,7 +1457,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
new_aura = _detalhes.table.copy ({}, text_interrupt_prototype)
new_aura.trigger.custom = [[
function (event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
function(event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
if (token == "SPELL_CAST_SUCCESS" and spellid == @spellid) then
aura_env.success = aura_env.success + 1
@@ -1502,7 +1502,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
new_aura = _detalhes.table.copy ({}, text_dispell_prototype)
new_aura.trigger.custom = [[
function (event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
function(event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
if ((token == "SPELL_DISPEL" or token == "SPELL_STOLEN") and extraSpellID == @spellid) then
aura_env.dispelled = aura_env.dispelled + 1
@@ -1958,7 +1958,7 @@ local empty_other_values = {}
function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, triggertype, auratype, other_values)
if (not spellname) then
spellname = select (1, GetSpellInfo (spellid))
spellname = select (1, GetSpellInfo(spellid))
end
wipe (empty_other_values)
@@ -2008,7 +2008,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
LibWindow.MakeDraggable (f)
LibWindow.SavePosition (f)
f:SetScript ("OnMouseDown", function (self, button)
f:SetScript ("OnMouseDown", function(self, button)
if (button == "RightButton") then
f:Hide()
end
@@ -2059,7 +2059,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
f.name = name_textentry
--aura type
local on_select_aura_type = function (_, _, aura_type)
local on_select_aura_type = function(_, _, aura_type)
if (f.UpdateLabels) then
f:UpdateLabels()
end
@@ -2090,7 +2090,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
local AuraTypeBorderColor = {.3, .3, .3, 0.5}
local AuraTypeBorderSelectedColor = {1, 1, 1, 0.4}
local OnSelectAuraType = function (self, fixedParam, auraType, noUpdate)
local OnSelectAuraType = function(self, fixedParam, auraType, noUpdate)
if (type (auraType) == "number") then
if (auraType == 1) then
@@ -2156,7 +2156,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
--trigger list
--target
local on_select_aura_trigger = function (_, _, aura_trigger)
local on_select_aura_trigger = function(_, _, aura_trigger)
if (f.UpdateLabels) then
f:UpdateLabels()
end
@@ -2204,7 +2204,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
{name = "Spell Dispell", value = 42},
}
local SetTriggerState = function (triggerID)
local SetTriggerState = function(triggerID)
for i = 1, #triggerList do
triggerList[i].checkBox:SetValue (false)
if (triggerList[i].value == triggerID) then
@@ -2216,7 +2216,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
f.SetTriggerState = SetTriggerState
f.TriggerList = triggerList
local OnChangeTriggerState = function (self, triggerID, state)
local OnChangeTriggerState = function(self, triggerID, state)
SetTriggerState (triggerID)
aura_on:SetValue (triggerID)
@@ -2276,7 +2276,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
--aura icon
local icon_label = fw:CreateLabel (f, "Icon: ", nil, nil, "GameFontNormal")
local icon_button_func = function (texture)
local icon_button_func = function(texture)
f.IconButton.icon.texture = texture
end
local icon_pick_button = fw:NewButton (f, nil, "$parentIconButton", "IconButton", 20, 20, function() fw:IconPick (icon_button_func, true) end)
@@ -2305,7 +2305,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
stack_slider.tooltip = "Minimum amount of stacks to trigger the aura."
--sound effect
local play_sound = function (self, fixedParam, file)
local play_sound = function(self, fixedParam, file)
if (type (file) == "table") then
PlaySoundFile (file.sound_path, "Master")
else
@@ -2313,10 +2313,10 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
end
end
local sort = function (t1, t2)
local sort = function(t1, t2)
return t1.name < t2.name
end
local titlecase = function (first, rest)
local titlecase = function(first, rest)
return first:upper()..rest:lower()
end
local iconsize = {14, 14}
@@ -2473,7 +2473,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
local folder_texcoord = {435/512, 469/512, 189/512, 241/512}
local folder_iconsize = {14, 14}
local sort_func = function (t1, t2) return t1.label < t2.label end
local sort_func = function(t1, t2) return t1.label < t2.label end
local weakauras_folder_options = function()
local t = {}
+17 -17
View File
@@ -141,7 +141,7 @@ function _detalhes:OpenWelcomeWindow()
local f = CreateFrame ("frame")
local got = false
f:SetScript ("OnUpdate", function (self, elapsed)
f:SetScript ("OnUpdate", function(self, elapsed)
if (not got and not InCombatLockdown()) then
local r = math.random
for i = 1, 2500000 do
@@ -295,7 +295,7 @@ local window_openned_at = time()
skins_image:SetTexCoord (0, 0.41796875, 0, 0.259765625) --0, 0, 214 133
--skin
local onSelectSkin = function (_, _, skin_name)
local onSelectSkin = function(_, _, skin_name)
local instance1 = _detalhes:GetInstance (1)
if (instance1 and instance1:IsEnabled()) then
instance1:ChangeSkin (skin_name)
@@ -340,7 +340,7 @@ local window_openned_at = time()
local allAlphabetCheckBoxes = {}
local allAlphabetLabels = {}
local onSelectAlphabet = function (self, fixedParameter, value)
local onSelectAlphabet = function(self, fixedParameter, value)
if (not value) then
self:SetValue (true)
@@ -488,7 +488,7 @@ local window_openned_at = time()
local buttonWidth = 160
-- create second window button
local new_window = function (self)
local new_window = function(self)
if (#_detalhes.tabela_instancias == 1) then
local newwindow = _detalhes:CreateInstance (true)
newwindow.baseframe:SetPoint ("topleft", _detalhes.tabela_instancias[1].baseframe, "topright", 50, 0)
@@ -510,7 +510,7 @@ local window_openned_at = time()
-- window color
window.editing_window = nil
local windowcolor_callback = function (button, r, g, b, a)
local windowcolor_callback = function(button, r, g, b, a)
local instance = window.editing_window
if (instance.menu_alpha.enabled and a ~= instance.color[4]) then
@@ -562,7 +562,7 @@ local window_openned_at = time()
window.BarHeightSlider:SetPoint ("left", window.BarHeightLabel, "right", 2, 0)
window.BarHeightSlider:SetTemplate (g:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"))
window.BarHeightSlider:SetHook ("OnValueChange", function (self, _, amount)
window.BarHeightSlider:SetHook ("OnValueChange", function(self, _, amount)
local instance1 = Details:GetInstance (1)
local instance2 = Details:GetInstance (2)
@@ -582,7 +582,7 @@ local window_openned_at = time()
window.TextSizeSlider:SetPoint ("left", window.TextSizeLabel, "right", 2, 0)
window.TextSizeSlider:SetTemplate (g:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"))
window.TextSizeSlider:SetHook ("OnValueChange", function (self, _, amount)
window.TextSizeSlider:SetHook ("OnValueChange", function(self, _, amount)
local instance1 = Details:GetInstance (1)
local instance2 = Details:GetInstance (2)
@@ -595,7 +595,7 @@ local window_openned_at = time()
end)
--font
local onSelectFont = function (_, instance, fontName)
local onSelectFont = function(_, instance, fontName)
local instance1 = Details:GetInstance (1)
local instance2 = Details:GetInstance (2)
@@ -613,7 +613,7 @@ local window_openned_at = time()
for name, fontPath in pairs (fontObjects) do
fontTable[#fontTable+1] = {value = name, label = name, icon = font_select_icon, texcoord = font_select_texcoord, onclick = onSelectFont, font = fontPath, descfont = name, desc = Loc ["STRING_MUSIC_DETAILS_ROBERTOCARLOS"]}
end
table.sort (fontTable, function (t1, t2) return t1.label < t2.label end)
table.sort (fontTable, function(t1, t2) return t1.label < t2.label end)
return fontTable
end
@@ -633,7 +633,7 @@ local window_openned_at = time()
window.ShowPercentCheckBox:SetFixedParameter (1)
window.ShowPercentCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.ShowPercentCheckBox.OnSwitch = function (self, fixedParameter, value)
window.ShowPercentCheckBox.OnSwitch = function(self, fixedParameter, value)
local instance1 = Details:GetInstance (1)
local instance2 = Details:GetInstance (2)
@@ -995,7 +995,7 @@ local window_openned_at = time()
window.updatespeedSlider:SetTemplate (g:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"))
window.updatespeedSlider:SetThumbSize (50)
window.updatespeedSlider.useDecimals = true
local updateColor = function (slider, value)
local updateColor = function(slider, value)
if (value < 1) then
slider.amt:SetTextColor (1, value, 0)
elseif (value > 1) then
@@ -1005,7 +1005,7 @@ local window_openned_at = time()
end
end
window.updatespeedSlider:SetHook("OnValueChange", function (self, _, amount)
window.updatespeedSlider:SetHook("OnValueChange", function(self, _, amount)
Details:SetWindowUpdateSpeed(amount)
updateColor(self, amount)
end)
@@ -1023,7 +1023,7 @@ local window_openned_at = time()
--
g:NewSwitch (window, _, "$parentAnimateSlider", "animateSlider", 60, 20, _, _, _detalhes.use_row_animations) -- ltext, rtext, defaultv
window.animateSlider:SetPoint ("left",window.animateLabel, "right", 2, 0)
window.animateSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue (false, true)
window.animateSlider.OnSwitch = function(self, _, value) --> slider, fixedValue, sliderValue (false, true)
_detalhes:SetUseAnimations (value)
end
@@ -1038,7 +1038,7 @@ local window_openned_at = time()
--
g:NewSwitch (window, _, "$parentDpsHpsSlider", "DpsHpsSlider", 60, 20, _, _, _detalhes:GetInstance(1).row_info.fast_ps_update) -- ltext, rtext, defaultv
window.DpsHpsSlider:SetPoint ("left",window.DpsHpsLabel, "right", 2, 0)
window.DpsHpsSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue (false, true)
window.DpsHpsSlider.OnSwitch = function(self, _, value) --> slider, fixedValue, sliderValue (false, true)
_detalhes:GetInstance(1):FastPSUpdate (value)
end
@@ -1053,7 +1053,7 @@ local window_openned_at = time()
--
-- g:NewSlider (window, _, "$parentSlider", "segmentsSlider", 120, 20, 1, 25, 1, _detalhes.segments_amount) -- min, max, step, defaultv
-- window.segmentsSlider:SetPoint ("left", window.segmentsLabel, "right", 2, 0)
-- window.segmentsSlider:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue
-- window.segmentsSlider:SetHook ("OnValueChange", function(self, _, amount) --> slider, fixedValue, sliderValue
-- _detalhes.segments_amount = math.floor (amount)
-- end)
-- window.segmentsSlider.tooltip = Loc ["STRING_WELCOME_22"]
@@ -1283,7 +1283,7 @@ local window_openned_at = time()
bg_string:SetPoint ("right", bookmark_frame, "right", 0, 0)
bg_string:SetPoint ("center", bmf_string, "center", 0, 0)
bookmark_frame:SetScript ("OnMouseDown", function (self, button)
bookmark_frame:SetScript ("OnMouseDown", function(self, button)
if (button == "RightButton") then
_detalhes.switch:ShowMe (instance1)
self:Hide()
@@ -1375,7 +1375,7 @@ local window_openned_at = time()
micro_image1:SetTexCoord (326/512, 1, 85/512, 185/512)
local tooltip_frame = CreateFrame ("frame", nil, window)
tooltip_frame:SetScript ("OnShow", function (self)
tooltip_frame:SetScript ("OnShow", function(self)
_detalhes.tabela_historico:resetar()
created_test_bars = 0