diff --git a/Details.toc b/Details.toc index 17921508..bfbe0416 100644 --- a/Details.toc +++ b/Details.toc @@ -1,5 +1,5 @@ ## Interface: 80100 -## Title: Details +## Title: Details! Damage Meter ## Notes: Computes detailed infos about combats. ## SavedVariables: _detalhes_global ## SavedVariablesPerCharacter: _detalhes_database diff --git a/Libs/DF/panel.lua b/Libs/DF/panel.lua index 74ad9114..e17f4a31 100644 --- a/Libs/DF/panel.lua +++ b/Libs/DF/panel.lua @@ -1030,6 +1030,8 @@ local create_panel_entry = function (self, row) editbox:SetBackdropBorderColor (1, 1, 1, 0.1) editbox.editbox.current_bordercolor = {1, 1, 1, 0.1} + editbox:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) + tinsert (row.entry_available, editbox) end diff --git a/boot.lua b/boot.lua index ba8a7837..c58fa63f 100644 --- a/boot.lua +++ b/boot.lua @@ -4,8 +4,8 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 6867 - _detalhes.alpha_build_counter = 6866 --if this is higher than the regular counter, use it instead + _detalhes.build_counter = 6873 + _detalhes.alpha_build_counter = 6873 --if this is higher than the regular counter, use it instead _detalhes.userversion = "v8.1.0." .. _detalhes.build_counter _detalhes.realversion = 135 --core version, this is used to check API version for scripts and plugins (see alias below) _detalhes.APIVersion = _detalhes.realversion --core version diff --git a/core/gears.lua b/core/gears.lua index 05ca7582..07d55cfd 100644 --- a/core/gears.lua +++ b/core/gears.lua @@ -2188,6 +2188,9 @@ function Details:DecompressData (data, dataType) local dataCompressed if (dataType == "print") then + + data = DetailsFramework:Trim (data) + dataCompressed = LibDeflate:DecodeForPrint (data) if (not dataCompressed) then Details:Msg ("couldn't decode the data.") diff --git a/core/parser.lua b/core/parser.lua index c172cd4a..770a97d5 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -206,6 +206,7 @@ local SPELLNAME_UNLIVING = GetSpellInfo (284377) --> discharge apetagonizer core local SPELLNAME_GRONG_CORE = GetSpellInfo (285660) + local SPELLNAME_GRONG_CORE_ALLIANCE = GetSpellInfo (286435) --> spells with special treatment local special_damage_spells = { @@ -428,7 +429,7 @@ --rules of specific encounters if (_current_encounter_id == 2263) then --grong --REMOVE ON 9.0 LAUNCH - if (spellid == 285660 or spellname == SPELLNAME_GRONG_CORE) then + if (spellid == 285660 or spellname == SPELLNAME_GRONG_CORE or spellid == 286435 or spellname == SPELLNAME_GRONG_CORE_ALLIANCE) then return end diff --git a/core/windows.lua b/core/windows.lua index 998e0603..6fd97464 100644 --- a/core/windows.lua +++ b/core/windows.lua @@ -4697,6 +4697,8 @@ text_box:SetPoint ("topleft", f, "topleft", 220, -40) text_box:SetBackdrop (nil) + DetailsFramework:ReskinSlider (text_box.scroll) + --background f.bg1 = f:CreateTexture (nil, "background") f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true) diff --git a/functions/link.lua b/functions/link.lua index 53a1c911..b66877ba 100644 --- a/functions/link.lua +++ b/functions/link.lua @@ -4881,7 +4881,6 @@ detailsOnDeathMenu.warningLabel:Hide() detailsOnDeathMenu:SetScript ("OnEvent", function (self, event, ...) if (event == "ENCOUNTER_END") then --event == "PLAYER_REGEN_ENABLED" or - print ("encounter ended") C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel) end end) diff --git a/gumps/janela_custom.lua b/gumps/janela_custom.lua index ffd163ed..7d2fdc4c 100644 --- a/gumps/janela_custom.lua +++ b/gumps/janela_custom.lua @@ -817,15 +817,11 @@ end end - local serialized_table = _detalhes:Serialize (export_object) - --local zip = LibStub:GetLibrary ("LibCompress"):CompressHuffman (serialized_table) - --local encoded = _detalhes._encode:Encode (zip) - local encoded = _detalhes._encode:Encode (serialized_table) + local encoded = Details:CompressData (export_object, "print") if (not custom_window.ExportBox) then local editbox = _detalhes.gump:NewTextEntry (custom_window, nil, "$parentExportBox", "ExportBox", CONST_EDITBOX_WIDTH, 20) editbox:SetPoint ("bottomleft", custom_window, "bottomleft", 10, 6) - --editbox:SetPoint ("bottomright", custom_window, "bottomright", -10, 6) editbox:SetAutoFocus (false) editbox:SetTemplate (CONST_TEXTENTRY_TEMPLATE) editbox:SetHook ("OnEditFocusLost", function() @@ -834,6 +830,16 @@ editbox:SetHook ("OnChar", function() editbox:Hide() end) + + local flashTexture = editbox:CreateTexture (nil, "overlay") + flashTexture:SetColorTexture (1, 1, 1) + flashTexture:SetAllPoints() + flashTexture:SetAlpha (0) + + local flashAnimHub = DetailsFramework:CreateAnimationHub (flashTexture) + DetailsFramework:CreateAnimation (flashAnimHub, "alpha", 1, 0.2, 0, 1) + DetailsFramework:CreateAnimation (flashAnimHub, "alpha", 2, 0.2, 1, 0) + editbox.FlashAnimation = flashAnimHub end if (custom_window.ImportBox) then @@ -847,6 +853,8 @@ custom_window.ExportBox:HighlightText() custom_window.ExportBox:SetFocus() + custom_window.ExportBox.FlashAnimation:Play() + end 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 @@ -867,26 +875,17 @@ local import = function() local text = editbox:GetText() - local decode = _detalhes._encode:Decode (text) - --local unzip = LibStub:GetLibrary ("LibCompress"):DecompressHuffman (decode) - --local deserialized_object = select (2, _detalhes:Deserialize (unzip)) + local deserialized_object = Plater.DecompressData (text, "print") - if (type (decode) ~= "string") then + if (not deserialized_object) then _detalhes:Msg (Loc ["STRING_CUSTOM_IMPORT_ERROR"]) - return + return end - local deserialized_object = select (2, _detalhes:Deserialize (decode)) - if (DetailsCustomPanel.CodeEditing) then DetailsCustomPanel:CancelFunc() end - if (type (deserialized_object) == "string") then - _detalhes:Msg (Loc ["STRING_CUSTOM_IMPORT_ERROR"]) - return - end - setmetatable (deserialized_object, _detalhes.atributo_custom) deserialized_object.__index = _detalhes.atributo_custom diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index 53a44440..045b5bf2 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -1394,14 +1394,6 @@ local menus2 = { window_icon:SetPoint (12, -12) window_icon:Hide() - --> decrease the width of menu background - --menu_background:SetSize (163, 488) - --menu_background:SetPoint ("topleft", window.widget, "topleft", 23, -78) - --menu_background:Hide() - --sub_background:SetPoint ("topleft", window.widget, "topleft", 192, -80) - --sub_background:SetPoint ("bottomright", window.widget, "bottomright", -30, 27) - --sub_background:Hide() - --> hide the dog and other stuff bigdog:Hide() window.descAnchorTopLeftImage:Hide() @@ -1421,11 +1413,6 @@ local menus2 = { --> location fillbars:SetPoint ("bottomleft", window.widget, "bottomleft", 17, 16) - --- forge_button:SetTemplate (options_button_template) --- forge_button:SetSize(120, 20) -- --- history_button:SetTemplate (options_button_template) --- history_button:SetSize(120, 20) fillbars:SetTemplate (options_button_template) fillbars:SetSize(120, 20) changelog:SetTemplate (options_button_template) @@ -1433,17 +1420,6 @@ local menus2 = { feedback_button:SetTemplate (options_button_template) feedback_button:SetSize(120, 20) - --feedback_button.textcolor = "white" - --changelog.textcolor = "white" - --fillbars.textcolor = "white" --- history_button.textcolor = "C_OptionsButtonOrange" --- forge_button.textcolor = "C_OptionsButtonOrange" - --- history_button:SetHook ("OnEnter", extra_buttons_on_enter) --- history_button:SetHook ("OnLeave", extra_buttons_on_leave) --- forge_button:SetHook ("OnEnter", extra_buttons_on_enter) --- forge_button:SetHook ("OnLeave", extra_buttons_on_leave) - feedback_button.textsize = 10 changelog.textsize = 10 fillbars.textsize = 10 @@ -1457,22 +1433,7 @@ local menus2 = { changelog_image:Hide() fillbars_image:Hide() feedback_image:Hide() - --- history_button:ClearAllPoints() --- forge_button:ClearAllPoints() - --forge_button:SetPoint ("topright", -17, -47) --- forge_button:SetPoint ("bottomleft", fillbars, "topleft", 0, 2) - --history_button:SetPoint ("right", forge_button, "left", -2, 0) --- history_button:SetPoint ("bottomleft", changelog, "topleft", 0, 2) - --forge_button:Hide() - --history_button:Hide() - --group_editing_help:ClearAllPoints() - --group_editing_help:SetPoint ("bottomleft", instances_string.widget, "topleft", -5, 2) - --group_editing:ClearAllPoints() - --group_editing:SetPoint ("left", group_editing_help, "right", 2, 0) - --DetailsOptionsWindowGroupEditingText:ClearAllPoints() - --DetailsOptionsWindowGroupEditingText:SetPoint ("left", group_editing, "right", 2, 0) DetailsOptionsWindowGroupEditingText:ClearAllPoints() DetailsOptionsWindowGroupEditingText:SetPoint ("bottomright", instances.widget, "topright", 0, 2) @@ -3098,7 +3059,7 @@ function window:CreateFrame16() if (not _detalhes:GetPlugin ("DETAILS_PLUGIN_CHART_VIEWER")) then local label = g:NewLabel (frame16, _, "$parentPluginWarningLabel", "PluginWarningLabel", Loc ["STRING_OPTIONS_CHART_PLUGINWARNING"], "GameFontNormal") local image = g:NewImage (frame16, [[Interface\DialogFrame\UI-Dialog-Icon-AlertNew]]) - label:SetPoint ("topright", frame16, "topright", -42, -15) + label:SetPoint ("topright", frame16, "topright", -42, -10) label:SetJustifyH ("left") label:SetWidth (160) image:SetPoint ("right", label, "left", -7, 0) @@ -3114,19 +3075,12 @@ function window:CreateFrame16() local big_code_editor = g:NewSpecialLuaEditorEntry (frame16, 643, 382, "bigCodeEditor", "$parentBigCodeEditor") big_code_editor:SetPoint ("topleft", frame16, "topleft", 7, -70) big_code_editor:SetFrameLevel (frame16:GetFrameLevel()+6) - big_code_editor:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], - tile = 1, tileSize = 16, edgeSize = 16, insets = {left = 5, right = 5, top = 5, bottom = 5}}) - big_code_editor:SetBackdropColor (0, 0, 0, 1) + big_code_editor:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1,tile = 1, tileSize = 16}) + DetailsFramework:ReskinSlider (big_code_editor.scroll) + big_code_editor:SetBackdropColor (0.5, 0.5, 0.5, 0.95) + big_code_editor:SetBackdropBorderColor (0, 0, 0, 1) big_code_editor:Hide() - big_code_editor:SetBackdropColor (0, 0, 0, 0.95) - local background = g:NewImage (big_code_editor, [[Interface\ARCHEOLOGY\Arch-BookCompletedLeft]]) - background:SetPoint ("topleft", big_code_editor, "topleft") - background:SetPoint ("bottomright", big_code_editor, "bottomright") - background:SetDesaturated (true) - background:SetTexCoord (1, 0, 0, 0.9) - background:SetAlpha (0.2) - local accept = function() big_code_editor:ClearFocus() if (not big_code_editor.is_export) then @@ -3185,47 +3139,39 @@ function window:CreateFrame16() frame16.userTimeCaptureFillPanel:Refresh() end - local big_code_editor2 = g:NewSpecialLuaEditorEntry (frame16, 643, 382, "exportEditor", "$parentExportEditor", true) + local big_code_editor2 = g:NewSpecialLuaEditorEntry (frame16, 643, 402, "exportEditor", "$parentExportEditor", true) big_code_editor2:SetPoint ("topleft", frame16, "topleft", 7, -70) big_code_editor2:SetFrameLevel (frame16:GetFrameLevel()+6) - big_code_editor2:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], - tile = 1, tileSize = 16, edgeSize = 16, insets = {left = 5, right = 5, top = 5, bottom = 5}}) - big_code_editor2:SetBackdropColor (0, 0, 0, 1) + big_code_editor2:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1,tile = 1, tileSize = 16}) + DetailsFramework:ReskinSlider (big_code_editor2.scroll) + big_code_editor2:SetBackdropColor (0.5, 0.5, 0.5, 0.95) + big_code_editor2:SetBackdropBorderColor (0, 0, 0, 1) big_code_editor2:Hide() - big_code_editor2:SetBackdropColor (0, 0, 0, 0.95) - local background = g:NewImage (big_code_editor2, [[Interface\ARCHEOLOGY\Arch-BookCompletedLeft]]) - background:SetPoint ("topleft", big_code_editor2, "topleft") - background:SetPoint ("bottomright", big_code_editor2, "bottomright") - background:SetDesaturated (true) - background:SetTexCoord (1, 0, 0, 0.9) - background:SetAlpha (0.2) - local close_export_box = function() big_code_editor2:ClearFocus() big_code_editor2:Hide() end - local close_export = g:NewButton (big_code_editor2, nil, "$parentClose", "closeButton", 24, 24, close_export_box, nil, nil, [[Interface\Buttons\UI-CheckBox-Check]]) + + local close_export = g:NewButton (big_code_editor2, nil, "$parentClose", "closeButton", 120, 20, close_export_box) close_export:SetPoint (10, 18) - local close_export_label = g:NewLabel (big_code_editor2, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_CLOSE"]) - close_export_label:SetPoint ("left", close_export, "right", 2, 0) + close_export:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]]) + close_export:SetText (Loc ["STRING_OPTIONS_CHART_CLOSE"]) + close_export:SetTemplate (options_button_template) local export_function = function (index) local data = _detalhes.savedTimeCaptures [index] if (data) then - - local serialized = _detalhes:Serialize (data) - local encoded = _detalhes._encode:Encode (serialized) - - --serialized = LibStub:GetLibrary ("LibCompress"):CompressLZW (serialized) - --local serialized = LibStub:GetLibrary ("LibCompress"):Compress (func) - - big_code_editor2:SetText (encoded) - - big_code_editor2:Show() - big_code_editor2.editbox:HighlightText() - big_code_editor2.editbox:SetFocus (true) - + local encoded = Details:CompressData (data, "print") + if (encoded) then + big_code_editor2:SetText (encoded) + + big_code_editor2:Show() + big_code_editor2.editbox:HighlightText() + big_code_editor2.editbox:SetFocus (true) + else + Details:Msg ("error exporting the time capture.") --localize-me + end end end @@ -3293,20 +3239,15 @@ function window:CreateFrame16() panel:Refresh() --> add panel - local addframe = g:NewPanel (frame16, nil, "$parentUserTimeCapturesAddPanel", "userTimeCaptureAddPanel", 644, 382) - addframe.backdrop = {bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], - tile = 1, tileSize = 16, edgeSize = 16, insets = {left = 3, right = 3, top = 2, bottom = 2}} + local addframe = g:NewPanel (frame16, nil, "$parentUserTimeCapturesAddPanel", "userTimeCaptureAddPanel", 644, 402) addframe:SetPoint (8, -70) addframe:SetFrameLevel (7) addframe:Hide() - - addframe:SetBackdropColor (0, 0, 0, 0.95) - local background = g:NewImage (addframe, [[Interface\ARCHEOLOGY\Arch-BookCompletedLeft]]) - background:SetPoint ("topleft", addframe, "topleft") - background:SetPoint ("bottomright", addframe, "bottomright") - background:SetDesaturated (true) - background:SetTexCoord (1, 0, 0, 0.9) - background:SetAlpha (0.2) + + addframe:SetPoint ("topleft", frame16, "topleft", 7, -70) + addframe:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1,tile = 1, tileSize = 16}) + addframe:SetBackdropColor (0.5, 0.5, 0.5, 0.95) + addframe:SetBackdropBorderColor (0, 0, 0, 1) --> name local capture_name = g:NewLabel (addframe, nil, "$parentNameLabel", "nameLabel", Loc ["STRING_OPTIONS_CHART_ADDNAME"]) @@ -3318,7 +3259,11 @@ function window:CreateFrame16() local capture_func = g:NewLabel (addframe, nil, "$parentFunctionLabel", "functionLabel", Loc ["STRING_OPTIONS_CHART_ADDCODE"]) local capture_func_entry = g:NewSpecialLuaEditorEntry (addframe.widget, 300, 200, "funcEntry", "$parentFuncEntry") capture_func_entry:SetPoint ("topleft", capture_func.widget, "topright", 2, 0) - capture_func_entry:SetSize (500, 200) + capture_func_entry:SetSize (500, 220) + capture_func_entry:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}) + capture_func_entry:SetBackdropBorderColor (0, 0, 0, 1) + capture_func_entry:SetBackdropColor (0, 0, 0, .5) + DetailsFramework:ReskinSlider (capture_func_entry.scroll) --> icon local capture_icon = g:NewLabel (addframe, nil, "$parentIconLabel", "iconLabel", Loc ["STRING_OPTIONS_CHART_ADDICON"]) @@ -3354,84 +3299,72 @@ function window:CreateFrame16() DetailsIconPickFrame:Hide() end end - local addbutton = g:NewButton (frame16, nil, "$parentAddButton", "addbutton", 100, 21, add, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_ADD"], nil, options_button_template) - --addbutton:InstallCustomTexture() + + local addbutton = g:NewButton (frame16, nil, "$parentAddButton", "addbutton", 120, 20, add, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_ADD"], nil, options_button_template) addbutton:SetPoint ("bottomright", panel, "topright", -30, 0) addbutton:SetIcon ([[Interface\PaperDollInfoFrame\Character-Plus]], 12, 12, nil, nil, nil, 4) window:CreateLineBackground2 (frame16, "addbutton", "addbutton", nil, nil, {1, 0.8, 0}, button_color_rgb) addbutton:SetTextColor (button_color_rgb) - - local left = g:NewImage (frame16, "Interface\\PaperDollInfoFrame\\PaperDollSidebarTabs", 64, 13, "artwork", {0, 1, 0, 0.05078125}) - left:SetPoint ("bottomright", addbutton, "bottomleft", 34, 0) - left:SetBlendMode ("ADD") - left:Hide() - local right = g:NewImage (frame16, "Interface\\PaperDollInfoFrame\\PaperDollSidebarTabs", 64, 13, "artwork", {0, 1, 0.0546875, 0.1015625}) - right:SetPoint ("bottomleft", addbutton, "bottomright", 0, 0) - right:SetBlendMode ("ADD") --> open import panel button - local importframe = g:NewSpecialLuaEditorEntry (frame16, 644, 382, "importEditor", "$parentImportEditor", true) + local importframe = g:NewSpecialLuaEditorEntry (frame16, 644, 402, "importEditor", "$parentImportEditor", true) local font, size, flag = importframe.editbox:GetFont() importframe.editbox:SetFont (font, 9, flag) - importframe:SetPoint ("topleft", frame16, "topleft", 8, -70) importframe:SetFrameLevel (frame16:GetFrameLevel()+6) - importframe:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], - tile = 1, tileSize = 16, edgeSize = 16, insets = {left = 5, right = 5, top = 5, bottom = 5}}) - importframe:SetBackdropColor (0, 0, 0, 1) + importframe:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1,tile = 1, tileSize = 16}) + DetailsFramework:ReskinSlider (importframe.scroll) + importframe:SetBackdropColor (0.5, 0.5, 0.5, 0.95) + importframe:SetBackdropBorderColor (0, 0, 0, 1) importframe:Hide() - importframe:SetBackdropColor (0, 0, 0, 0.95) - local background = g:NewImage (importframe, [[Interface\ARCHEOLOGY\Arch-BookCompletedLeft]]) - background:SetPoint ("topleft", importframe, "topleft") - background:SetPoint ("bottomright", importframe, "bottomright") - background:SetDesaturated (true) - background:SetTexCoord (1, 0, 0, 0.9) - background:SetAlpha (0.2) - local doimport = function() local text = importframe:GetText() - local decode = _detalhes._encode:Decode (text) - if (type (decode) ~= "string") then - _detalhes:Msg (Loc ["STRING_CUSTOM_IMPORT_ERROR"]) - return - end - - local unserialize = select (2, _detalhes:Deserialize (decode)) - - if (type (unserialize) == "table") then - if (unserialize[1] and unserialize[2] and unserialize[3] and unserialize[4] and unserialize[5]) then - local register = _detalhes:TimeDataRegister (unpack (unserialize)) - if (type (register) == "string") then - _detalhes:Msg (register) + text = DetailsFramework:Trim (text) + + local dataTable = Details:DecompressData (text, "print") + if (dataTable) then + local unserialize = dataTable + + if (type (unserialize) == "table") then + if (unserialize[1] and unserialize[2] and unserialize[3] and unserialize[4] and unserialize[5]) then + local register = _detalhes:TimeDataRegister (unpack (unserialize)) + if (type (register) == "string") then + _detalhes:Msg (register) + end + else + _detalhes:Msg (Loc ["STRING_OPTIONS_CHART_IMPORTERROR"]) end else _detalhes:Msg (Loc ["STRING_OPTIONS_CHART_IMPORTERROR"]) end + + importframe:Hide() + panel:Refresh() else - _detalhes:Msg (Loc ["STRING_OPTIONS_CHART_IMPORTERROR"]) + _detalhes:Msg (Loc ["STRING_CUSTOM_IMPORT_ERROR"]) + return end - - importframe:Hide() - panel:Refresh() end - local accept_import = g:NewButton (importframe, nil, "$parentAccept", "acceptButton", 24, 24, doimport, nil, nil, [[Interface\Buttons\UI-CheckBox-Check]]) + local accept_import = g:NewButton (importframe, nil, "$parentAccept", "acceptButton", 120, 20, doimport) + accept_import:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]]) accept_import:SetPoint (10, 18) - local accept_import_label = g:NewLabel (importframe, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_IMPORT"]) - accept_import_label:SetPoint ("left", accept_import, "right", 2, 0) + accept_import:SetText (Loc ["STRING_OPTIONS_CHART_IMPORT"]) + accept_import:SetTemplate (options_button_template) local cancelimport = function() importframe:ClearFocus() importframe:Hide() end - local cancel_changes = g:NewButton (importframe, nil, "$parentCancel", "CancelButton", 20, 20, cancelimport, nil, nil, [[Interface\PetBattles\DeadPetIcon]]) - cancel_changes:SetPoint (100, 17) - local cancel_changes_label = g:NewLabel (importframe, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_CANCEL"]) - cancel_changes_label:SetPoint ("left", cancel_changes, "right", 2, 0) + local cancel_changes = g:NewButton (importframe, nil, "$parentCancel", "CancelButton", 120, 20, cancelimport) + cancel_changes:SetIcon ([[Interface\PetBattles\DeadPetIcon]]) + cancel_changes:SetText (Loc ["STRING_OPTIONS_CHART_CANCEL"]) + cancel_changes:SetPoint (132, 18) + cancel_changes:SetTemplate (options_button_template) local import = function() importframe:Show() @@ -3446,23 +3379,15 @@ function window:CreateFrame16() DetailsIconPickFrame:Hide() end end - local importbutton = g:NewButton (frame16, nil, "$parentImportButton", "importbutton", 100, 21, import, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_IMPORT"], nil, options_button_template) - --importbutton:InstallCustomTexture() + + local importbutton = g:NewButton (frame16, nil, "$parentImportButton", "importbutton", 120, 20, import, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_IMPORT"], nil, options_button_template) importbutton:SetPoint ("right", addbutton, "left", -4, 0) importbutton:SetIcon ([[Interface\Buttons\UI-GuildButton-PublicNote-Up]], 14, 14, nil, nil, nil, 4) window:CreateLineBackground2 (frame16, "importbutton", "importbutton", nil, nil, {1, 0.8, 0}, button_color_rgb) importbutton:SetTextColor (button_color_rgb) - - local left = g:NewImage (frame16, "Interface\\PaperDollInfoFrame\\PaperDollSidebarTabs", 64, 13, "artwork", {0, 1, 0, 0.05078125}) - left:SetPoint ("bottomright", importbutton, "bottomleft", 34, 0) - left:SetBlendMode ("ADD") - local right = g:NewImage (frame16, "Interface\\PaperDollInfoFrame\\PaperDollSidebarTabs", 64, 13, "artwork", {0, 1, 0.0546875, 0.1015625}) - right:SetPoint ("bottomleft", importbutton, "bottomright", 0, 0) - right:SetBlendMode ("ADD") - right:Hide() --> close button - local closebutton = g:NewButton (addframe, nil, "$parentAddCloseButton", "addClosebutton", 100, 21, function() addframe:Hide() end, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_CLOSE"], nil, options_button_template) + local closebutton = g:NewButton (addframe, nil, "$parentAddCloseButton", "addClosebutton", 120, 20, function() addframe:Hide() end, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_CLOSE"], nil, options_button_template) --closebutton:InstallCustomTexture() --> confirm add capture @@ -3502,12 +3427,11 @@ function window:CreateFrame16() if (DetailsIconPickFrame and DetailsIconPickFrame:IsShown()) then DetailsIconPickFrame:Hide() end - addframe:Hide(); + addframe:Hide() end - local addcapturebutton = g:NewButton (addframe, nil, "$parentAddCaptureButton", "addCapturebutton", 100, 21, addcapture, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_ADD2"], nil, options_button_template) - --addcapturebutton:InstallCustomTexture() + local addcapturebutton = g:NewButton (addframe, nil, "$parentAddCaptureButton", "addCapturebutton", 120, 21, addcapture, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_ADD2"], nil, options_button_template) --> anchors local start = 25 @@ -3520,6 +3444,9 @@ function window:CreateFrame16() addcapturebutton:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]], 18, 18, nil, nil, nil, 4) closebutton:SetIcon ([[Interface\PetBattles\DeadPetIcon]], 14, 14, nil, nil, nil, 4) + addcapturebutton:SetTemplate (options_button_template) + closebutton:SetTemplate (options_button_template) + window:CreateLineBackground2 (addframe.widget, closebutton, closebutton, nil, nil, {1, 0.8, 0}, button_color_rgb) closebutton:SetTextColor (button_color_rgb) @@ -3587,31 +3514,18 @@ function window:CreateFrame15() end local panel = g:NewFillPanel (frame15, header, "$parentCustomSpellsFillPanel", "customSpellsFillPanel", 640, 382, total_lines, fill_row, false) - panel:Refresh() --> add - --> add panel local addframe = g:NewPanel (frame15, nil, "$parentCustomSpellsAddPanel", "customSpellsAddPanel", 644, 382) - addframe.backdrop = {bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], - tile = 1, tileSize = 16, edgeSize = 16, insets = {left = 3, right = 3, top = 2, bottom = 2}} - - addframe:SetPoint (8, -70) + addframe:SetPoint (8, -80) addframe:SetFrameLevel (7) - addframe:Hide() - - addframe:SetBackdropColor (0, 0, 0, 0.95) - local background = g:NewImage (addframe, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]]) - background:SetPoint ("topleft", addframe, "topleft") - background:SetPoint ("bottomright", addframe, "bottomright") - background:SetDesaturated (true) - background:SetTexCoord (1, 0, 0, 1) - background:SetAlpha (0.4) - - local desc = Loc ["STRING_OPTIONS_SPELL_SPELLID_DESC"] - local desc_spellid = g:NewLabel (addframe, nil, "$parentSpellidDescLabel", "spellidDescLabel", desc) - + addframe:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1,tile = 1, tileSize = 16}) + addframe:SetBackdropColor (0.5, 0.5, 0.5, 0.95) + addframe:SetBackdropBorderColor (0, 0, 0, 1) + addframe:Hide() + local spellid = g:NewLabel (addframe, nil, "$parentSpellidLabel", "spellidLabel", Loc ["STRING_OPTIONS_SPELL_ADDSPELLID"]) local spellname = g:NewLabel (addframe, nil, "$parentSpellnameLabel", "spellnameLabel", Loc ["STRING_OPTIONS_SPELL_ADDNAME"]) local spellicon = g:NewLabel (addframe, nil, "$parentSpelliconLabel", "spelliconLabel", Loc ["STRING_OPTIONS_SPELL_ADDICON"]) @@ -3630,9 +3544,9 @@ function window:CreateFrame15() end end local spellid_entry = g:NewSpellEntry (addframe, spellid_entry_func, 160, 20, nil, nil, "spellidEntry", "$parentSpellidEntry") + spellid_entry:SetTemplate (options_dropdown_template) spellid_entry:SetPoint ("left", spellid, "right", 2, 0) - local icon_button_func = function (texture) addframe.spellIconButton.icon.texture = texture end @@ -3642,51 +3556,9 @@ function window:CreateFrame15() icon_button:InstallCustomTexture() icon_button:SetPoint ("left", spellicon, "right", 2, 0) - local all_cached_spells = {} - - local refresh_cache = function (self) - - local offset = FauxScrollFrame_GetOffset (self) - local total = #all_cached_spells - - for index = 1, #self.lines1 do - - local label1 = self.lines1 [index] - local label2 = self.lines2 [index] - - local data = all_cached_spells [index + offset] - - if (data) then - label1.text = data [1] - label2.text = data [2] - else - label1.text = "" - label2.text = "" - end - - end - - end - local scrollframe = CreateFrame ("scrollframe", "SpellCacheBrowserFrame", addframe.widget, "FauxScrollFrameTemplate") - scrollframe:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 10, refresh_cache) end) - scrollframe:SetSize (250, 140) - scrollframe.lines1 = {} - scrollframe.lines2 = {} - scrollframe:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, edgeSize = 8, tileSize = 5}) - - for i = 1, 10 do - local label1 = g:NewLabel (scrollframe, nil, "$parentLabel1" .. i, nil) - local label2 = g:NewLabel (scrollframe, nil, "$parentLabel2" .. i, nil) - local y = (i-1) * 13 * -1 - 5 - label1:SetPoint (3, y) - label2:SetPoint (70, y) - tinsert (scrollframe.lines1, label1) - tinsert (scrollframe.lines2, label2) - end - --> close button - local closebutton = g:NewButton (addframe, nil, "$parentAddCloseButton", "addClosebutton", 100, 21, function() addframe:Hide(); table.wipe (all_cached_spells) end, nil, nil, nil, Loc ["STRING_OPTIONS_SPELL_CLOSE"], nil, options_button_template) - --closebutton:InstallCustomTexture() + local closebutton = g:NewButton (addframe, nil, "$parentAddCloseButton", "addClosebutton", 120, 20, function() addframe:Hide() end, nil, nil, nil, Loc ["STRING_OPTIONS_SPELL_CLOSE"], nil, options_button_template) + local bg = window:CreateLineBackground2 (addframe.widget, closebutton, closebutton, nil, nil, {1, 0.8, 0}, button_color_rgb) closebutton:SetTextColor (button_color_rgb) @@ -3719,10 +3591,9 @@ function window:CreateFrame15() DetailsIconPickFrame:Hide() end addframe:Hide(); - table.wipe (all_cached_spells) end - local addspellbutton = g:NewButton (addframe, nil, "$parentAddSpellButton", "addSpellbutton", 100, 21, addspell, nil, nil, nil, Loc ["STRING_OPTIONS_SPELL_ADD"], nil, options_button_template) - --addspellbutton:InstallCustomTexture() + + local addspellbutton = g:NewButton (addframe, nil, "$parentAddSpellButton", "addSpellbutton", 120, 20, addspell, nil, nil, nil, Loc ["STRING_OPTIONS_SPELL_ADD"], nil, options_button_template) local bg2 = window:CreateLineBackground2 (addframe.widget, addspellbutton, addspellbutton, nil, nil, {1, 0.8, 0}, button_color_rgb) addspellbutton:SetTextColor (button_color_rgb) bg:SetFrameLevel (bg2:GetFrameLevel()-1) @@ -3732,51 +3603,20 @@ function window:CreateFrame15() addspellbutton:SetPoint ("bottomright", addframe, "bottomright", -5, 5) closebutton:SetPoint ("right", addspellbutton, "left", -4, 0) - - desc_spellid:SetPoint (50, -30) - scrollframe:SetPoint ("topleft", addframe.widget, "topleft", 50, -110) - spellid:SetPoint (50, -285) - spellname:SetPoint (50, -310) - spellicon:SetPoint (50, -335) - - - scrollframe:Show() - - local update_cache_scroll = function() - - table.wipe (all_cached_spells) - - for spellid, t in pairs (_detalhes.spellcache) do - tinsert (all_cached_spells, {spellid, t[1]}) - end - - table.sort (all_cached_spells, function (t1, t2) local a = t1 and t1[2] or "z"; local b = t2 and t2[2] or "z"; return a < b end) - - FauxScrollFrame_Update (scrollframe, math.max (11, #all_cached_spells), 10, 12) - refresh_cache (scrollframe) - end + + spellid:SetPoint (50, -10) + spellname:SetPoint (50, -35) + spellicon:SetPoint (50, -60) --> open add panel button local add = function() - update_cache_scroll() addframe:Show() end - local addbutton = g:NewButton (frame15, nil, "$parentAddButton", "addbutton", 100, 21, add, nil, nil, nil, Loc ["STRING_OPTIONS_SPELL_ADDSPELL"], nil, options_button_template) - --addbutton:InstallCustomTexture() - + local addbutton = g:NewButton (frame15, nil, "$parentAddButton", "addbutton", 120, 20, add, nil, nil, nil, Loc ["STRING_OPTIONS_SPELL_ADDSPELL"], nil, options_button_template) window:CreateLineBackground2 (frame15, "addbutton", "addbutton", nil, nil, {1, 0.8, 0}, button_color_rgb) addbutton:SetTextColor (button_color_rgb) - - addbutton:SetPoint ("bottomright", panel, "topright", -30, 0) - + addbutton:SetPoint ("bottomright", panel, "topright", -00, 1) addbutton:SetIcon ([[Interface\PaperDollInfoFrame\Character-Plus]], 12, 12, nil, nil, nil, 4) - - local left = g:NewImage (frame15, "Interface\\PaperDollInfoFrame\\PaperDollSidebarTabs", 64, 13, "artwork", {0, 1, 0, 0.05078125}) - left:SetPoint ("bottomright", addbutton, "bottomleft", 34, 0) - left:SetBlendMode ("ADD") - local right = g:NewImage (frame15, "Interface\\PaperDollInfoFrame\\PaperDollSidebarTabs", 64, 13, "artwork", {0, 1, 0.0546875, 0.1015625}) - right:SetPoint ("bottomleft", addbutton, "bottomright", 0, 0) - right:SetBlendMode ("ADD") --> anchors @@ -5539,7 +5379,6 @@ function window:CreateFrame3() g:NewLabel (frame3, _, "$parentSaveSkinLabel", "saveSkinLabel", Loc ["STRING_OPTIONS_SAVELOAD_PNAME"], "GameFontHighlightLeft") frame3.saveStyleName:SetPoint ("left", frame3.saveSkinLabel, "right", 2) g:NewButton (frame3, _, "$parentSaveStyleButton", "saveStyle", 50, 18, saveStyleFunc, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_SAVE"], nil, options_button_template) - --frame3.saveStyle:InstallCustomTexture() window:CreateLineBackground2 (frame3, "saveStyleName", "saveSkinLabel", Loc ["STRING_OPTIONS_SAVELOAD_CREATE_DESC"]) @@ -5577,10 +5416,10 @@ function window:CreateFrame3() g:NewLabel (frame3, _, "$parentToAllStyleLabel", "toAllStyleLabel", "", "GameFontHighlightLeft") g:NewLabel (frame3, _, "$parentmakeDefaultLabel", "makeDefaultLabel", "", "GameFontHighlightLeft") - g:NewButton (frame3, _, "$parentToAllStyleButton", "applyToAll", 160, 18, applyToAll, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_APPLYTOALL"], 1, options_button_template) + g:NewButton (frame3, _, "$parentToAllStyleButton", "applyToAll", 160, 20, applyToAll, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_APPLYTOALL"], 1, options_button_template) window:CreateLineBackground2 (frame3, "applyToAll", "applyToAll", Loc ["STRING_OPTIONS_SAVELOAD_APPLYALL_DESC"], nil, {1, 0.8, 0}, button_color_rgb) - g:NewButton (frame3, _, "$parentMakeDefaultButton", "makeDefault", 160, 18, makeDefault, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_MAKEDEFAULT"], nil, options_button_template) + g:NewButton (frame3, _, "$parentMakeDefaultButton", "makeDefault", 160, 20, makeDefault, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_MAKEDEFAULT"], nil, options_button_template) window:CreateLineBackground2 (frame3, "makeDefault", "makeDefault", Loc ["STRING_OPTIONS_SAVELOAD_STD_DESC"], nil, {1, 0.8, 0}, button_color_rgb) frame3.toAllStyleLabel:SetPoint ("left", frame3.applyToAll, "left") @@ -5761,7 +5600,7 @@ function window:CreateFrame3() end - g:NewButton (frame3, _, "$parentImportButton", "ImportButton", 160, 18, import_saved, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_IMPORT"], nil, options_button_template) + g:NewButton (frame3, _, "$parentImportButton", "ImportButton", 160, 20, import_saved, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_IMPORT"], nil, options_button_template) --frame3.ImportButton:InstallCustomTexture (nil, nil, nil, nil, nil, true) frame3.ImportButton:SetIcon ([[Interface\Buttons\UI-GuildButton-PublicNote-Up]], 14, 14, nil, nil, nil, 4, 2) frame3.ImportButton:SetTextColor (button_color_rgb) @@ -11061,7 +10900,7 @@ function window:CreateFrame12() g:NewSwitch (bframe, _, "$parentToolbarSlider"..i, "toolbarPluginsSlider"..i, 60, 20, _, _, plugin_stable.enabled, nil, nil, nil, nil, options_switch_template) bframe ["toolbarPluginsSlider"..i].PluginName = absName tinsert (window.plugin_widgets, bframe ["toolbarPluginsSlider"..i]) - bframe ["toolbarPluginsSlider"..i]:SetPoint ("topleft", frame4, "topleft", 415, y+1) + bframe ["toolbarPluginsSlider"..i]:SetPoint ("topleft", frame4, "topleft", 415, y) bframe ["toolbarPluginsSlider"..i]:SetAsCheckBox() bframe ["toolbarPluginsSlider"..i].OnSwitch = function (self, _, value) plugin_stable.enabled = value @@ -11074,7 +10913,7 @@ function window:CreateFrame12() end if (pluginObject.OpenOptionsPanel) then - g:NewButton (bframe, nil, "$parentOptionsButton"..i, "OptionsButton"..i, 86, 18, pluginObject.OpenOptionsPanel, nil, nil, nil, Loc ["STRING_OPTIONS_PLUGINS_OPTIONS"], nil, options_button_template) + g:NewButton (bframe, nil, "$parentOptionsButton"..i, "OptionsButton"..i, 120, 20, pluginObject.OpenOptionsPanel, nil, nil, nil, Loc ["STRING_OPTIONS_PLUGINS_OPTIONS"], nil, options_button_template) bframe ["OptionsButton"..i]:SetPoint ("topleft", frame4, "topleft", 510, y-0) --bframe ["OptionsButton"..i]:InstallCustomTexture() diff --git a/plugins/Details_DmgRank/Details_DmgRank.lua b/plugins/Details_DmgRank/Details_DmgRank.lua deleted file mode 100644 index b48da4c1..00000000 --- a/plugins/Details_DmgRank/Details_DmgRank.lua +++ /dev/null @@ -1 +0,0 @@ -local DmgRank = nil \ No newline at end of file diff --git a/plugins/Details_DmgRank/Details_DmgRank.toc b/plugins/Details_DmgRank/Details_DmgRank.toc deleted file mode 100644 index ab0716f4..00000000 --- a/plugins/Details_DmgRank/Details_DmgRank.toc +++ /dev/null @@ -1,14 +0,0 @@ -## Interface: 80100 -## Title: Details Damage, the Game! (plugin) -## Notes: Plugin for Details -## RequiredDeps: Details -## OptionalDeps: Ace3, LibSharedMedia-3.0, LibBossIDs-1.0, LibGraph-2.0, !ClassColors - -#@no-lib-strip@ -embeds.xml -#@end-no-lib-strip@ - -enUS.lua -ptBR.lua - -Details_DmgRank.lua \ No newline at end of file diff --git a/plugins/Details_DmgRank/Libs/AceLocale-3.0/AceLocale-3.0.lua b/plugins/Details_DmgRank/Libs/AceLocale-3.0/AceLocale-3.0.lua deleted file mode 100644 index 2ecc0cb8..00000000 --- a/plugins/Details_DmgRank/Libs/AceLocale-3.0/AceLocale-3.0.lua +++ /dev/null @@ -1,137 +0,0 @@ ---- **AceLocale-3.0** manages localization in addons, allowing for multiple locale to be registered with fallback to the base locale for untranslated strings. --- @class file --- @name AceLocale-3.0 --- @release $Id: AceLocale-3.0.lua 1035 2011-07-09 03:20:13Z kaelten $ -local MAJOR,MINOR = "AceLocale-3.0", 6 - -local AceLocale, oldminor = LibStub:NewLibrary(MAJOR, MINOR) - -if not AceLocale then return end -- no upgrade needed - --- Lua APIs -local assert, tostring, error = assert, tostring, error -local getmetatable, setmetatable, rawset, rawget = getmetatable, setmetatable, rawset, rawget - --- Global vars/functions that we don't upvalue since they might get hooked, or upgraded --- List them here for Mikk's FindGlobals script --- GLOBALS: GAME_LOCALE, geterrorhandler - -local gameLocale = GetLocale() -if gameLocale == "enGB" then - gameLocale = "enUS" -end - -AceLocale.apps = AceLocale.apps or {} -- array of ["AppName"]=localetableref -AceLocale.appnames = AceLocale.appnames or {} -- array of [localetableref]="AppName" - --- This metatable is used on all tables returned from GetLocale -local readmeta = { - __index = function(self, key) -- requesting totally unknown entries: fire off a nonbreaking error and return key - rawset(self, key, key) -- only need to see the warning once, really - geterrorhandler()(MAJOR..": "..tostring(AceLocale.appnames[self])..": Missing entry for '"..tostring(key).."'") - return key - end -} - --- This metatable is used on all tables returned from GetLocale if the silent flag is true, it does not issue a warning on unknown keys -local readmetasilent = { - __index = function(self, key) -- requesting totally unknown entries: return key - rawset(self, key, key) -- only need to invoke this function once - return key - end -} - --- Remember the locale table being registered right now (it gets set by :NewLocale()) --- NOTE: Do never try to register 2 locale tables at once and mix their definition. -local registering - --- local assert false function -local assertfalse = function() assert(false) end - --- This metatable proxy is used when registering nondefault locales -local writeproxy = setmetatable({}, { - __newindex = function(self, key, value) - rawset(registering, key, value == true and key or value) -- assigning values: replace 'true' with key string - end, - __index = assertfalse -}) - --- This metatable proxy is used when registering the default locale. --- It refuses to overwrite existing values --- Reason 1: Allows loading locales in any order --- Reason 2: If 2 modules have the same string, but only the first one to be --- loaded has a translation for the current locale, the translation --- doesn't get overwritten. --- -local writedefaultproxy = setmetatable({}, { - __newindex = function(self, key, value) - if not rawget(registering, key) then - rawset(registering, key, value == true and key or value) - end - end, - __index = assertfalse -}) - ---- Register a new locale (or extend an existing one) for the specified application. --- :NewLocale will return a table you can fill your locale into, or nil if the locale isn't needed for the players --- game locale. --- @paramsig application, locale[, isDefault[, silent]] --- @param application Unique name of addon / module --- @param locale Name of the locale to register, e.g. "enUS", "deDE", etc. --- @param isDefault If this is the default locale being registered (your addon is written in this language, generally enUS) --- @param silent If true, the locale will not issue warnings for missing keys. Must be set on the first locale registered. If set to "raw", nils will be returned for unknown keys (no metatable used). --- @usage --- -- enUS.lua --- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "enUS", true) --- L["string1"] = true --- --- -- deDE.lua --- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "deDE") --- if not L then return end --- L["string1"] = "Zeichenkette1" --- @return Locale Table to add localizations to, or nil if the current locale is not required. -function AceLocale:NewLocale(application, locale, isDefault, silent) - - -- GAME_LOCALE allows translators to test translations of addons without having that wow client installed - local gameLocale = GAME_LOCALE or gameLocale - - local app = AceLocale.apps[application] - - if silent and app and getmetatable(app) ~= readmetasilent then - geterrorhandler()("Usage: NewLocale(application, locale[, isDefault[, silent]]): 'silent' must be specified for the first locale registered") - end - - if not app then - if silent=="raw" then - app = {} - else - app = setmetatable({}, silent and readmetasilent or readmeta) - end - AceLocale.apps[application] = app - AceLocale.appnames[app] = application - end - - if locale ~= gameLocale and not isDefault then - return -- nop, we don't need these translations - end - - registering = app -- remember globally for writeproxy and writedefaultproxy - - if isDefault then - return writedefaultproxy - end - - return writeproxy -end - ---- Returns localizations for the current locale (or default locale if translations are missing). --- Errors if nothing is registered (spank developer, not just a missing translation) --- @param application Unique name of addon / module --- @param silent If true, the locale is optional, silently return nil if it's not found (defaults to false, optional) --- @return The locale table for the current language. -function AceLocale:GetLocale(application, silent) - if not silent and not AceLocale.apps[application] then - error("Usage: GetLocale(application[, silent]): 'application' - No locales registered for '"..tostring(application).."'", 2) - end - return AceLocale.apps[application] -end diff --git a/plugins/Details_DmgRank/Libs/AceLocale-3.0/AceLocale-3.0.xml b/plugins/Details_DmgRank/Libs/AceLocale-3.0/AceLocale-3.0.xml deleted file mode 100644 index d69dbb13..00000000 --- a/plugins/Details_DmgRank/Libs/AceLocale-3.0/AceLocale-3.0.xml +++ /dev/null @@ -1,4 +0,0 @@ - -