You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1567 lines
66 KiB

4 years ago
local _detalhes = _G._detalhes
3 years ago
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
4 years ago
local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
local g = _detalhes.gump
local _
function _detalhes:OpenWelcomeWindow()
GameCooltip:Close()
local window = _G.DetailsWelcomeWindow
if (not window) then
--on first run, sincronize with guild
_detalhes.storage:DBGuildSync()
local index = 1
local pages = {}
local instance = _detalhes.tabela_instancias [1]
window = _detalhes:CreateWelcomePanel ("DetailsWelcomeWindow", UIParent)
3 years ago
window:SetPoint("center", UIParent, "center", -200, 0)
window:SetBackdropColor(0, 0, 0, 0.75)
window:SetWidth(612)
window:SetHeight(315)
window:SetMovable(true)
window:SetScript("OnMouseDown", function() window:StartMoving() end)
window:SetScript("OnMouseUp", function() window:StopMovingOrSizing() end)
window:SetScript("OnHide", function()
4 years ago
_detalhes.tabela_historico:resetar()
if (DetailsFramework.IsClassicWow()) then
local new_instance = Details:GetWindow (1)
new_instance.row_info.use_spec_icons = false
new_instance.row_info.icon_file = [[Interface\AddOns\Details\images\classes_small]]
new_instance:SetBarSpecIconSettings (false)
end
end)
3 years ago
local rodape_bg = window:CreateTexture(nil, "artwork")
rodape_bg:SetPoint("bottomleft", window, "bottomleft", 11, 12)
rodape_bg:SetPoint("bottomright", window, "bottomright", -11, 12)
rodape_bg:SetTexture([[Interface\Tooltips\UI-Tooltip-Background]])
rodape_bg:SetHeight(25)
rodape_bg:SetVertexColor(0, 0, 0, 1)
local logotipo = window:CreateTexture(nil, "overlay")
logotipo:SetPoint("topleft", window, "topleft", 16, -20)
logotipo:SetTexture([[Interface\Addons\Details\images\logotipo]])
logotipo:SetTexCoord(0.07421875, 0.73828125, 0.51953125, 0.890625)
logotipo:SetWidth(186)
logotipo:SetHeight(50)
local cancel = CreateFrame("Button", nil, window)
cancel:SetWidth(22)
cancel:SetHeight(22)
cancel:SetPoint("bottomleft", window, "bottomleft", 12, 14)
cancel:SetFrameLevel(window:GetFrameLevel()+1)
cancel:SetPushedTexture([[Interface\Buttons\UI-GroupLoot-Pass-Down]])
cancel:SetHighlightTexture([[Interface\Buttons\UI-GROUPLOOT-PASS-HIGHLIGHT]])
cancel:SetNormalTexture([[Interface\Buttons\UI-GroupLoot-Pass-Up]])
cancel:SetScript("OnClick", function() window:Hide() end)
cancel:GetNormalTexture():SetDesaturated(true)
4 years ago
cancel:Disable()
3 years ago
local cancelText = cancel:CreateFontString(nil, "overlay", "GameFontNormal")
cancelText:SetTextColor(1, 1, 1)
cancelText:SetPoint("left", cancel, "right", 2, 0)
cancelText:SetText(Loc ["STRING_WELCOME_69"])
local forward = CreateFrame("button", nil, window)
forward:SetWidth(26)
forward:SetHeight(26)
forward:SetPoint("bottomright", window, "bottomright", -14, 13)
forward:SetFrameLevel(window:GetFrameLevel()+1)
forward:SetPushedTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Down]])
forward:SetHighlightTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Up]])
forward:SetNormalTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Up]])
forward:SetDisabledTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Disabled]])
local backward = CreateFrame("button", nil, window)
backward:SetWidth(26)
backward:SetHeight(26)
backward:SetPoint("bottomright", window, "bottomright", -38, 13)
backward:SetPushedTexture([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Down]])
backward:SetHighlightTexture([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Up]])
backward:SetNormalTexture([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Up]])
backward:SetDisabledTexture([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled]])
forward:SetScript("OnClick", function()
4 years ago
if (index < #pages) then
3 years ago
for _, widget in ipairs(pages [index]) do
4 years ago
widget:Hide()
end
index = index + 1
3 years ago
for _, widget in ipairs(pages [index]) do
4 years ago
widget:Show()
end
if (index == #pages) then
forward:Disable()
end
backward:Enable()
end
end)
3 years ago
backward:SetScript("OnClick", function()
4 years ago
if (index > 1) then
3 years ago
for _, widget in ipairs(pages [index]) do
4 years ago
widget:Hide()
end
index = index - 1
3 years ago
for _, widget in ipairs(pages [index]) do
4 years ago
widget:Show()
end
if (index == 1) then
backward:Disable()
end
forward:Enable()
end
end)
function _detalhes:WelcomeSetLoc()
local instance = _detalhes.tabela_instancias [1]
instance.baseframe:ClearAllPoints()
3 years ago
instance.baseframe:SetPoint("left", DetailsWelcomeWindow, "right", 10, 0)
4 years ago
DetailsWelcomeWindow.SetLocTimer = nil
end
3 years ago
DetailsWelcomeWindow.SetLocTimer = _detalhes:ScheduleTimer("WelcomeSetLoc", 12)
4 years ago
--/script local f=CreateFrame("frame");local g=false;f:SetScript("OnUpdate",function(s,e)if not g then local r=math.random for i=1,2500000 do local a=r(1,1000000);a=a+1 end g=true else print(string.format("cpu: %.3f",e));f:SetScript("OnUpdate",nil)end end)
function _detalhes:CalcCpuPower()
3 years ago
local f = CreateFrame("frame")
4 years ago
local got = false
3 years ago
f:SetScript("OnUpdate", function(self, elapsed)
4 years ago
if (not got and not InCombatLockdown()) then
local r = math.random
for i = 1, 2500000 do
local a = r (1, 1000000)
a = a + 1
end
got = true
elseif (not InCombatLockdown()) then
3 years ago
--print("process time:", elapsed)
4 years ago
if (elapsed < 0.295) then
_detalhes.use_row_animations = true
_detalhes.update_speed = 0.30
elseif (elapsed < 0.375) then
_detalhes.use_row_animations = true
_detalhes.update_speed = 0.40
elseif (elapsed < 0.475) then
_detalhes.use_row_animations = true
_detalhes.update_speed = 0.5
elseif (elapsed < 0.525) then
_detalhes.update_speed = 0.5
end
3 years ago
--overriting the results
4 years ago
_detalhes.update_speed = 0.3
_detalhes.use_row_animations = true
3 years ago
DetailsWelcomeWindowSliderUpdateSpeed.MyObject:SetValue(_detalhes.update_speed)
DetailsWelcomeWindowAnimateSlider.MyObject:SetValue(_detalhes.use_row_animations)
4 years ago
3 years ago
f:SetScript("OnUpdate", nil)
4 years ago
end
end)
end
--deprecated
3 years ago
--_detalhes:ScheduleTimer("CalcCpuPower", 10)
4 years ago
--detect ElvUI
--[=[ --deprecated
local ElvUI = _G.ElvUI
if (ElvUI) then
--active elvui skin
local instance = _detalhes.tabela_instancias [1]
if (instance and instance.ativa) then
if (instance.skin ~= "ElvUI Frame Style") then
instance:ChangeSkin ("ElvUI Frame Style")
end
end
--save standard
local savedObject = {}
3 years ago
for key, value in pairs(instance) do
4 years ago
if (_detalhes.instance_defaults [key] ~= nil) then
3 years ago
if (type(value) == "table") then
savedObject [key] = Details.CopyTable(value)
4 years ago
else
savedObject [key] = value
end
end
end
_detalhes.standard_skin = savedObject
_detalhes:ApplyPDWSkin ("ElvUI")
3 years ago
--_detalhes:SetTooltipBackdrop("Details BarBorder 3", 14, {0, 0, 0, 1})
4 years ago
end
--]=]
-- frame alert
3 years ago
local frame_alert = CreateFrame("frame", nil, window)
frame_alert:SetPoint("topright", window)
4 years ago
function _detalhes:StopPlayStretchAlert()
frame_alert.alert.animIn:Stop()
frame_alert.alert.animOut:Play()
_detalhes.stopwelcomealert = nil
end
3 years ago
frame_alert.alert = CreateFrame("frame", "DetailsWelcomeWindowAlert", UIParent, "ActionBarButtonSpellActivationAlert")
frame_alert.alert:SetFrameStrata("FULLSCREEN")
4 years ago
frame_alert.alert:Hide()
local window_openned_at = time()
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3 years ago
--page 1
4 years ago
3 years ago
--introduction
4 years ago
3 years ago
local angel = window:CreateTexture(nil, "border")
angel:SetPoint("bottomright", window, "bottomright")
angel:SetTexture([[Interface\TUTORIALFRAME\UI-TUTORIALFRAME-SPIRITREZ]])
angel:SetTexCoord(0.162109375, 0.591796875, 0, 1)
angel:SetWidth(442)
angel:SetHeight(256)
angel:SetAlpha(.2)
4 years ago
3 years ago
local texto1 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto1:SetPoint("topleft", window, "topleft", 13, -220)
texto1:SetText(Loc ["STRING_WELCOME_1"])
texto1:SetJustifyH("left")
4 years ago
pages [#pages+1] = {texto1, angel}
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3 years ago
--Skins Page page 2
4 years ago
--SKINS
3 years ago
local bg55 = window:CreateTexture(nil, "overlay")
bg55:SetTexture([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
bg55:SetPoint("bottomright", window, "bottomright", -10, 10)
bg55:SetHeight(125*3)
bg55:SetWidth(89*3)
bg55:SetAlpha(.05)
bg55:SetTexCoord(1, 0, 0, 1)
4 years ago
3 years ago
local texto55 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto55:SetPoint("topleft", window, "topleft", 20, -80)
texto55:SetText(Loc ["STRING_WELCOME_42"])
4 years ago
3 years ago
local texto555 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto555:SetText(Loc ["STRING_WELCOME_45"])
texto555:SetTextColor(1, 1, 1, 1)
4 years ago
3 years ago
local changemind = g:NewLabel(window, _, "$parentChangeMind55Label", "changemind55Label", Loc ["STRING_WELCOME_2"], "GameFontNormal", 9, "orange")
window.changemind55Label:SetPoint("center", window, "center")
window.changemind55Label:SetPoint("bottom", window, "bottom", 0, 19)
4 years ago
window.changemind55Label.align = "|"
3 years ago
local texto_appearance = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto_appearance:SetPoint("topleft", window, "topleft", 30, -110)
texto_appearance:SetText(Loc ["STRING_WELCOME_43"])
texto_appearance:SetWidth(460)
texto_appearance:SetHeight(100)
texto_appearance:SetJustifyH("left")
4 years ago
texto_appearance:SetJustifyV ("top")
3 years ago
texto_appearance:SetTextColor(1, 1, 1, 1)
local skins_image = window:CreateTexture(nil, "overlay")
skins_image:SetTexture([[Interface\Addons\Details\images\icons2]])
skins_image:SetPoint("topright", window, "topright", -50, -24)
skins_image:SetWidth(214*0.7)
skins_image:SetHeight(133*0.7)
skins_image:SetTexCoord(0, 0.41796875, 0, 0.259765625) --0, 0, 214 133
4 years ago
--skin
3 years ago
local onSelectSkin = function(_, _, skin_name)
local instance1 = _detalhes:GetInstance(1)
4 years ago
if (instance1 and instance1:IsEnabled()) then
instance1:ChangeSkin (skin_name)
3 years ago
window.FontDropdown:Select(instance1.row_info.font_face)
window.BarHeightSlider:SetValue(instance1.row_info.height)
window.TextSizeSlider:SetValue(instance1.row_info.font_size)
window.ShowPercentCheckBox:SetValue(instance1.row_info.textR_show_data [3])
4 years ago
end
3 years ago
local instance2 = _detalhes:GetInstance(2)
4 years ago
if (instance2 and instance2:IsEnabled()) then
instance2:ChangeSkin (skin_name)
end
end
local buildSkinMenu = function()
local skinOptions = {}
3 years ago
for skin_name, skin_table in pairs(_detalhes.skins) do
4 years ago
skinOptions [#skinOptions+1] = {value = skin_name, label = skin_name, onclick = onSelectSkin, icon = "Interface\\GossipFrame\\TabardGossipIcon", desc = skin_table.desc}
end
return skinOptions
end
3 years ago
local instance1 = _detalhes:GetInstance(1)
4 years ago
local skin_dropdown = g:NewDropDown (window, _, "$parentSkinDropdown", "skinDropdown", 160, 20, buildSkinMenu, instance1.skin)
3 years ago
skin_dropdown:SetTemplate(g:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
4 years ago
skin_dropdown.tooltip = Loc ["STRING_WELCOME_58"]
3 years ago
local skin_label = g:NewLabel(window, _, "$parentSkinLabel", "skinLabel", Loc ["STRING_OPTIONS_INSTANCE_SKIN"] .. ":", "GameFontNormal")
skin_dropdown:SetPoint("left", skin_label, "right", 2)
skin_label:SetPoint("topleft", window, "topleft", 30, -133)
4 years ago
3 years ago
--alphabet selection
4 years ago
3 years ago
local texto_alphabet = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto_alphabet:SetPoint("topleft", window, "topleft", 30, -110)
texto_alphabet:SetText(Loc ["STRING_WELCOME_73"]) --"Select the Alphabet or Region:"
texto_alphabet:SetJustifyH("left")
4 years ago
texto_alphabet:SetJustifyV ("top")
3 years ago
texto_alphabet:SetTextColor(1, 1, 1)
texto_alphabet:SetPoint("topleft", skin_label.widget, "bottomleft", 0, -20)
4 years ago
local allAlphabetCheckBoxes = {}
local allAlphabetLabels = {}
3 years ago
local onSelectAlphabet = function(self, fixedParameter, value)
4 years ago
if (not value) then
3 years ago
self:SetValue(true)
4 years ago
return
end
3 years ago
for index, checkBox in ipairs(allAlphabetCheckBoxes) do
4 years ago
if (checkBox ~= self) then
3 years ago
checkBox:SetValue(false)
4 years ago
end
end
3 years ago
local instance1 = Details:GetInstance(1)
local instance2 = Details:GetInstance(2)
4 years ago
_detalhes.tabela_historico:resetar()
if (fixedParameter == 1) then --latin
if (instance1 and instance1:IsEnabled()) then
instance1:SetBarTextSettings (nil, "Accidental Presidency")
end
if (instance2 and instance2:IsEnabled()) then
instance2:SetBarTextSettings (nil, "Accidental Presidency")
end
3 years ago
window.FontDropdown:Select("Accidental Presidency")
4 years ago
_detalhes:CreateTestBars ("en")
elseif (fixedParameter == 2) then --russia
if (instance1 and instance1:IsEnabled()) then
instance1:SetBarTextSettings (nil, "Arial Narrow")
end
if (instance2 and instance2:IsEnabled()) then
instance2:SetBarTextSettings (nil, "Arial Narrow")
end
3 years ago
window.FontDropdown:Select("Arial Narrow")
4 years ago
_detalhes:CreateTestBars ("ru")
elseif (fixedParameter == 3) then --china
if (instance1 and instance1:IsEnabled()) then
instance1:SetBarTextSettings (nil, "AR CrystalzcuheiGBK Demibold")
end
if (instance2 and instance2:IsEnabled()) then
instance2:SetBarTextSettings (nil, "AR CrystalzcuheiGBK Demibold")
end
3 years ago
window.FontDropdown:Select("AR CrystalzcuheiGBK Demibold")
4 years ago
_detalhes:CreateTestBars ("cn")
elseif (fixedParameter == 4) then --korea
if (instance1 and instance1:IsEnabled()) then
instance1:SetBarTextSettings (nil, "2002")
end
if (instance2 and instance2:IsEnabled()) then
instance2:SetBarTextSettings (nil, "2002")
end
3 years ago
window.FontDropdown:Select("2002")
4 years ago
_detalhes:CreateTestBars ("ko")
elseif (fixedParameter == 5) then --taiwan
if (instance1 and instance1:IsEnabled()) then
instance1:SetBarTextSettings (nil, "AR CrystalzcuheiGBK Demibold")
end
if (instance2 and instance2:IsEnabled()) then
instance2:SetBarTextSettings (nil, "AR CrystalzcuheiGBK Demibold")
end
3 years ago
window.FontDropdown:Select("AR CrystalzcuheiGBK Demibold")
4 years ago
_detalhes:CreateTestBars ("tw")
end
end
--Latin Alphabet
3 years ago
g:NewLabel(window, _, "$parentLatinAlphabetLabel", "LatinAlphabetLabel", Loc["STRING_WELCOME_74"], "GameFontHighlightLeft")
4 years ago
g:NewSwitch (window, _, "$parentLatinAlphabetCheckBox", "LatinAlphabetCheckBox", 20, 20, _, _, true)
window.LatinAlphabetCheckBox:SetAsCheckBox()
3 years ago
window.LatinAlphabetCheckBox:SetFixedParameter(1)
window.LatinAlphabetCheckBox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
4 years ago
window.LatinAlphabetCheckBox.OnSwitch = onSelectAlphabet
3 years ago
window.LatinAlphabetLabel:SetPoint("left", window.LatinAlphabetCheckBox, "right", 2, 0)
4 years ago
3 years ago
tinsert(allAlphabetCheckBoxes, window.LatinAlphabetCheckBox)
tinsert(allAlphabetLabels, window.LatinAlphabetLabel)
4 years ago
--Russian
3 years ago
g:NewLabel(window, _, "$parentCyrillicAlphabetLabel", "CyrillicAlphabetLabel", Loc["STRING_WELCOME_75"], "GameFontHighlightLeft")
4 years ago
g:NewSwitch (window, _, "$parentCyrillicAlphabetCheckBox", "CyrillicAlphabetCheckBox", 20, 20, _, _, false)
window.CyrillicAlphabetCheckBox:SetAsCheckBox()
3 years ago
window.CyrillicAlphabetCheckBox:SetFixedParameter(2)
window.CyrillicAlphabetCheckBox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
4 years ago
window.CyrillicAlphabetCheckBox.OnSwitch = onSelectAlphabet
3 years ago
window.CyrillicAlphabetLabel:SetPoint("left", window.CyrillicAlphabetCheckBox, "right", 2, 0)
tinsert(allAlphabetCheckBoxes, window.CyrillicAlphabetCheckBox)
tinsert(allAlphabetLabels, window.CyrillicAlphabetLabel)
4 years ago
--Chinese
3 years ago
g:NewLabel(window, _, "$parentChinaAlphabetLabel", "ChinaAlphabetLabel", Loc["STRING_WELCOME_76"], "GameFontHighlightLeft")
4 years ago
g:NewSwitch (window, _, "$parentChinaCheckBox", "ChinaCheckBox", 20, 20, _, _, false)
window.ChinaCheckBox:SetAsCheckBox()
3 years ago
window.ChinaCheckBox:SetFixedParameter(3)
window.ChinaCheckBox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
4 years ago
window.ChinaCheckBox.OnSwitch = onSelectAlphabet
3 years ago
window.ChinaAlphabetLabel:SetPoint("left", window.ChinaCheckBox, "right", 2, 0)
tinsert(allAlphabetCheckBoxes, window.ChinaCheckBox)
tinsert(allAlphabetLabels, window.ChinaAlphabetLabel)
4 years ago
--Korea
3 years ago
g:NewLabel(window, _, "$parentKoreanAlphabetLabel", "KoreanAlphabetLabel", Loc["STRING_WELCOME_77"], "GameFontHighlightLeft")
4 years ago
g:NewSwitch (window, _, "$parentKoreanCheckBox", "KoreanCheckBox", 20, 20, _, _, false)
window.KoreanCheckBox:SetAsCheckBox()
3 years ago
window.KoreanCheckBox:SetFixedParameter(4)
window.KoreanCheckBox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
4 years ago
window.KoreanCheckBox.OnSwitch = onSelectAlphabet
3 years ago
window.KoreanAlphabetLabel:SetPoint("left", window.KoreanCheckBox, "right", 2, 0)
tinsert(allAlphabetCheckBoxes, window.KoreanCheckBox)
tinsert(allAlphabetLabels, window.KoreanAlphabetLabel)
4 years ago
--Taiwan
3 years ago
g:NewLabel(window, _, "$parentTaiwanAlphabetLabel", "TaiwanAlphabetLabel", Loc["STRING_WELCOME_78"], "GameFontHighlightLeft")
4 years ago
g:NewSwitch (window, _, "$parentTaiwanCheckBox", "TaiwanCheckBox", 20, 20, _, _, false)
window.TaiwanCheckBox:SetAsCheckBox()
3 years ago
window.TaiwanCheckBox:SetFixedParameter(5)
window.TaiwanCheckBox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
4 years ago
window.TaiwanCheckBox.OnSwitch = onSelectAlphabet
3 years ago
window.TaiwanAlphabetLabel:SetPoint("left", window.TaiwanCheckBox, "right", 2, 0)
tinsert(allAlphabetCheckBoxes, window.TaiwanCheckBox)
tinsert(allAlphabetLabels, window.TaiwanAlphabetLabel)
4 years ago
3 years ago
window.LatinAlphabetCheckBox:SetPoint("topleft", texto_alphabet, "bottomleft", 0, -10)
window.CyrillicAlphabetCheckBox:SetPoint("topleft", window.LatinAlphabetCheckBox, "bottomleft", 0, -2)
window.ChinaCheckBox:SetPoint("topleft", window.CyrillicAlphabetCheckBox, "bottomleft", 0, -2)
window.KoreanCheckBox:SetPoint("topleft", texto_alphabet, "bottomleft", 175, -10)
window.TaiwanCheckBox:SetPoint("topleft", window.KoreanCheckBox, "bottomleft", 0, -2)
4 years ago
3 years ago
--buttons
4 years ago
local padding = -4
local buttonWidth = 160
-- create second window button
3 years ago
local new_window = function(self)
4 years ago
if (#_detalhes.tabela_instancias == 1) then
local newwindow = _detalhes:CreateInstance (true)
3 years ago
newwindow.baseframe:SetPoint("topleft", _detalhes.tabela_instancias[1].baseframe, "topright", 50, 0)
newwindow.baseframe:SetPoint("bottomleft", _detalhes.tabela_instancias[1].baseframe, "bottomright", 50, 0)
4 years ago
newwindow:SaveMainWindowPosition()
newwindow:RestoreMainWindowPosition()
end
self.MyObject:Disable()
end
3 years ago
local create_window_button = g:CreateButton(window, new_window, buttonWidth, 20, Loc["STRING_WELCOME_79"])
create_window_button:SetTemplate(g:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
4 years ago
create_window_button:SetIcon ([[Interface\FriendsFrame\UI-FriendsList-Large-Up]], nil, nil, nil, {5/32, 26/32, 6/32, 26/32}, nil, 4, 2)
3 years ago
create_window_button:SetPoint("topright", window, "topright", -100, -137)
4 years ago
if (#_detalhes.tabela_instancias == 2) then
create_window_button:Disable()
end
-- window color
window.editing_window = nil
3 years ago
local windowcolor_callback = function(button, r, g, b, a)
4 years ago
local instance = window.editing_window
if (instance.menu_alpha.enabled and a ~= instance.color[4]) then
3 years ago
_detalhes:Msg(Loc ["STRING_OPTIONS_MENU_ALPHAWARNING"])
4 years ago
instance:InstanceColor (r, g, b, instance.menu_alpha.onleave, nil, true)
if (_detalhes.options_group_edit) then
3 years ago
for _, this_instance in ipairs(instance:GetInstanceGroup()) do
4 years ago
if (this_instance ~= instance) then
this_instance:InstanceColor (r, g, b, instance.menu_alpha.onleave, nil, true)
end
end
end
return
end
instance:InstanceColor (r, g, b, a, nil, true)
if (_detalhes.options_group_edit) then
3 years ago
for _, this_instance in ipairs(instance:GetInstanceGroup()) do
4 years ago
if (this_instance ~= instance) then
this_instance:InstanceColor (r, g, b, a, nil, true)
end
end
end
3 years ago
local instance2 = _detalhes:GetInstance(2)
4 years ago
if (instance2 and instance2:IsEnabled()) then
instance2:InstanceColor (r, g, b, a, nil, true)
end
end
local change_color = function()
3 years ago
window.editing_window = _detalhes:GetInstance(1)
local r, g, b, a = unpack(window.editing_window.color)
4 years ago
_detalhes.gump:ColorPick (window, r, g, b, a, windowcolor_callback)
end
3 years ago
local window_color = g:CreateButton(window, change_color, buttonWidth, 20, Loc ["STRING_OPTIONS_CHANGECOLOR"])
window_color:SetTemplate(g:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
window_color:SetPoint("topleft", create_window_button, "bottomleft", 0, padding)
4 years ago
window_color:SetIcon ([[Interface\AddOns\Details\images\icons]], 14, 14, nil, {434/512, 466/512, 277/512, 307/512}, nil, 4, 2)
--bar height
3 years ago
g:NewLabel(window, _, "$parentBarHeightLabel", "BarHeightLabel", Loc ["STRING_OPTIONS_BAR_HEIGHT"] .. ":", "GameFontNormal")
window.BarHeightLabel:SetPoint("topleft", window_color, "bottomleft", 0, -4 + padding)
4 years ago
--
g:NewSlider (window, _, "$parentBarHeightSpeed", "BarHeightSlider", 160, 20, 8, 24, 1, 14) --parent, container, name, member, w, h, min, max, step, defaultv
3 years ago
window.BarHeightSlider:SetPoint("left", window.BarHeightLabel, "right", 2, 0)
window.BarHeightSlider:SetTemplate(g:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE"))
4 years ago
3 years ago
window.BarHeightSlider:SetHook("OnValueChange", function(self, _, amount)
local instance1 = Details:GetInstance(1)
local instance2 = Details:GetInstance(2)
4 years ago
if (instance1 and instance1:IsEnabled()) then
instance1:SetBarSettings (amount)
end
if (instance2 and instance2:IsEnabled()) then
instance2:SetBarSettings (amount)
end
end)
--text size
3 years ago
g:NewLabel(window, _, "$parentTextSizeLabel", "TextSizeLabel", Loc ["STRING_OPTIONS_TEXT_SIZE"] .. ":", "GameFontNormal")
window.TextSizeLabel:SetPoint("topleft", window.BarHeightLabel, "bottomleft", 0, -4 + padding)
4 years ago
--
g:NewSlider (window, _, "$parentTextSizeSpeed", "TextSizeSlider", 160, 20, 10, 20, 1, 14) --parent, container, name, member, w, h, min, max, step, defaultv
3 years ago
window.TextSizeSlider:SetPoint("left", window.TextSizeLabel, "right", 2, 0)
window.TextSizeSlider:SetTemplate(g:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE"))
4 years ago
3 years ago
window.TextSizeSlider:SetHook("OnValueChange", function(self, _, amount)
local instance1 = Details:GetInstance(1)
local instance2 = Details:GetInstance(2)
4 years ago
if (instance1 and instance1:IsEnabled()) then
instance1:SetBarTextSettings (amount)
end
if (instance2 and instance2:IsEnabled()) then
instance2:SetBarTextSettings (amount)
end
end)
--font
3 years ago
local onSelectFont = function(_, instance, fontName)
local instance1 = Details:GetInstance(1)
local instance2 = Details:GetInstance(2)
4 years ago
if (instance1 and instance1:IsEnabled()) then
instance1:SetBarTextSettings (nil, fontName)
end
if (instance2 and instance2:IsEnabled()) then
instance2:SetBarTextSettings (nil, fontName)
end
end
local buildFontMenu = function()
local fontObjects = SharedMedia:HashTable ("font")
local fontTable = {}
3 years ago
for name, fontPath in pairs(fontObjects) do
4 years ago
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
3 years ago
table.sort (fontTable, function(t1, t2) return t1.label < t2.label end)
4 years ago
return fontTable
end
3 years ago
local instance1 = _detalhes:GetInstance(1)
4 years ago
local font_dropdown = g:NewDropDown (window, _, "$parentFontDropdown", "FontDropdown", 160, 20, buildFontMenu, instance1.row_info.font_face)
3 years ago
font_dropdown:SetTemplate(g:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
4 years ago
font_dropdown.tooltip = Loc ["STRING_WELCOME_58"]
3 years ago
local font_label = g:NewLabel(window, _, "$parentFontLabel", "FontLabel", Loc ["STRING_OPTIONS_TEXT_FONT"], "GameFontNormal")
font_dropdown:SetPoint("left", font_label, "right", 2)
font_label:SetPoint("topleft", window.TextSizeLabel, "bottomleft", 0, -4 + padding)
4 years ago
--show percent
3 years ago
g:NewLabel(window, _, "$parentShowPercentLabel", "ShowPercentLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_PERCENT"], "GameFontNormal")
4 years ago
g:NewSwitch (window, _, "$parentShowPercentCheckBox", "ShowPercentCheckBox", 20, 20, _, _, false)
window.ShowPercentCheckBox:SetAsCheckBox()
3 years ago
window.ShowPercentCheckBox:SetFixedParameter(1)
window.ShowPercentCheckBox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
4 years ago
3 years ago
window.ShowPercentCheckBox.OnSwitch = function(self, fixedParameter, value)
local instance1 = Details:GetInstance(1)
local instance2 = Details:GetInstance(2)
4 years ago
if (instance1 and instance1:IsEnabled()) then
instance1:SetBarRightTextSettings (nil, nil, value)
if (not value) then
instance1:SetBarRightTextSettings (nil, nil, nil, nil, "NONE")
else
instance1:SetBarRightTextSettings (nil, nil, nil, nil, ",")
end
end
if (instance2 and instance2:IsEnabled()) then
instance2:SetBarRightTextSettings (nil, nil, value)
if (not value) then
instance2:SetBarRightTextSettings (nil, nil, nil, nil, "NONE")
else
instance2:SetBarRightTextSettings (nil, nil, nil, nil, ",")
end
end
end
3 years ago
window.ShowPercentLabel:SetPoint("topleft", font_label.widget, "bottomleft", 0, -4 + padding)
window.ShowPercentCheckBox:SetPoint("left", window.ShowPercentLabel, "right", 2, 0)
4 years ago
local created_test_bars = 0
3 years ago
local skins_frame_alert = CreateFrame("frame", nil, window)
4 years ago
skins_frame_alert:Hide()
3 years ago
skins_frame_alert:SetScript("OnShow", function()
4 years ago
if (created_test_bars < 2) then
_detalhes:CreateTestBars()
created_test_bars = created_test_bars + 1
end
if (DetailsWelcomeWindow.SetLocTimer) then
3 years ago
_detalhes:CancelTimer(DetailsWelcomeWindow.SetLocTimer)
4 years ago
DetailsWelcomeWindow.SetLocTimer = nil
_detalhes:WelcomeSetLoc()
end
end)
pages [#pages+1] = {skins_frame_alert, bg55, texto55, texto_alphabet, texto555, skins_image, changemind, texto_appearance, font_label, font_dropdown, skin_dropdown, skin_label, create_window_button, window_color, window.BarHeightLabel, window.BarHeightSlider, window.TextSizeLabel, window.TextSizeSlider, window.ShowPercentLabel, window.ShowPercentCheckBox}
3 years ago
for i, widget in ipairs(allAlphabetCheckBoxes) do
tinsert(pages [#pages], widget)
4 years ago
end
3 years ago
for i, widget in ipairs(allAlphabetLabels) do
tinsert(pages [#pages], widget)
4 years ago
end
3 years ago
for _, widget in ipairs(pages[#pages]) do
4 years ago
widget:Hide()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3 years ago
--numeral system page 3
4 years ago
3 years ago
local numeral_image = window:CreateTexture(nil, "overlay")
numeral_image:SetTexture([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
numeral_image:SetPoint("bottomright", window, "bottomright", -10, 10)
numeral_image:SetHeight(125*3)--125
numeral_image:SetWidth(89*3)--82
numeral_image:SetAlpha(.05)
numeral_image:SetTexCoord(1, 0, 0, 1)
g:NewLabel(window, _, "$parentChangeMindNumeralLabel", "changemindNumeralLabel", Loc ["STRING_WELCOME_2"], "GameFontNormal", 9, "orange")
window.changemindNumeralLabel:SetPoint("center", window, "center")
window.changemindNumeralLabel:SetPoint("bottom", window, "bottom", 0, 19)
4 years ago
window.changemindNumeralLabel.align = "|"
3 years ago
local texto2Numeral = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto2Numeral:SetPoint("topleft", window, "topleft", 20, -80)
texto2Numeral:SetText(Loc ["STRING_NUMERALSYSTEM_DESC"] .. ":")
4 years ago
--numeral 1 - western
3 years ago
g:NewLabel(window, _, "$parentWesternNumbersLabel", "WesternNumbersLabel", Loc ["STRING_NUMERALSYSTEM_ARABIC_WESTERN"] .. ": " .. Loc ["STRING_NUMERALSYSTEM_ARABIC_WESTERN_DESC"], "GameFontHighlightLeft")
4 years ago
local WesternNumbersCheckbox = g:NewSwitch (window, _, "WesternNumbersCheckbox", "WesternNumbersCheckbox", 20, 20, _, _, true)
WesternNumbersCheckbox:SetAsCheckBox()
3 years ago
WesternNumbersCheckbox:SetFixedParameter(1)
WesternNumbersCheckbox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
WesternNumbersCheckbox:SetPoint("topleft", window, "topleft", 40, -130)
window.WesternNumbersLabel:SetPoint("left", WesternNumbersCheckbox, "right", 2, 0)
4 years ago
--numeral 2 asian
3 years ago
g:NewLabel(window, _, "$parentAsianNumbersLabel", "AsianNumbersLabel", Loc ["STRING_NUMERALSYSTEM_MYRIAD_EASTASIA"] .. ": " .. Loc ["STRING_NUMERALSYSTEM_ARABIC_MYRIAD_EASTASIA"], "GameFontHighlightLeft")
4 years ago
local AsianNumbersCheckbox = g:NewSwitch (window, _, "AsianNumbersCheckbox", "AsianNumbersCheckbox", 20, 20, _, _, true)
AsianNumbersCheckbox:SetAsCheckBox()
3 years ago
AsianNumbersCheckbox:SetFixedParameter(2)
AsianNumbersCheckbox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
AsianNumbersCheckbox:SetPoint("topleft", window, "topleft", 40, -200)
window.AsianNumbersLabel:SetPoint("left", AsianNumbersCheckbox, "right", 2, 0)
4 years ago
--western on clicks
WesternNumbersCheckbox.OnSwitch = function()
3 years ago
WesternNumbersCheckbox:SetValue(true)
AsianNumbersCheckbox:SetValue(false)
4 years ago
_detalhes.numerical_system = 1
_detalhes:SelectNumericalSystem()
end
--asian on click
AsianNumbersCheckbox.OnSwitch = function()
3 years ago
AsianNumbersCheckbox:SetValue(true)
WesternNumbersCheckbox:SetValue(false)
4 years ago
_detalhes.numerical_system = 2
_detalhes:SelectNumericalSystem()
end
3 years ago
local sword_icon2 = window:CreateTexture(nil, "overlay")
sword_icon2:SetTexture([[Interface\Addons\Details\images\icons2]])
sword_icon2:SetPoint("topright", window, "topright", -30, -10)
sword_icon2:SetSize(128*1.4, 64*1.4)
sword_icon2:SetTexCoord(330/512, 509/512, 437/512, 509/512)
sword_icon2:SetDrawLayer("overlay", 2)
local thedude2 = window:CreateTexture(nil, "overlay")
--thedude2:SetTexture([[Interface\TUTORIALFRAME\UI-TutorialFrame-TheDude]])
thedude2:SetPoint("bottomright", sword_icon, "bottomleft", 70, 19)
thedude2:SetWidth(128*1.0)
thedude2:SetHeight(128*1.0)
thedude2:SetTexCoord(0, 1, 0, 1)
thedude2:SetDrawLayer("overlay", 3)
local NumeralType1_text = window:CreateFontString(nil, "overlay", "GameFontNormal")
NumeralType1_text:SetText("1K = 1.000 |cFFFFCC00| |r10K = 10.000 |cFFFFCC00| |r100K = 100.000 |cFFFFCC00| |r1M = 1.000.000")
NumeralType1_text:SetWidth(500)
NumeralType1_text:SetHeight(40)
NumeralType1_text:SetJustifyH("left")
4 years ago
NumeralType1_text:SetJustifyV ("top")
3 years ago
NumeralType1_text:SetTextColor(.8, .8, .8, 1)
NumeralType1_text:SetPoint("topleft", window, "topleft", 40, -150)
4 years ago
3 years ago
local NumeralType2_text = window:CreateFontString(nil, "overlay", "GameFontNormal")
4 years ago
local asian1K, asian10K, asian1B = _detalhes.gump:GetAsianNumberSymbols()
local asianNumerals = "1" .. asian1K .. " = 1.000 \n1" .. asian10K .. " = 10.000 \n10" .. asian10K .. " = 100.000 \n100" .. asian10K .. " = 1.000.000"
3 years ago
--if region is western it'll be using Korean symbols, set a font on the dropdown so it won't show ?????
4 years ago
local clientRegion = _detalhes.gump:GetClientRegion()
if (clientRegion == "western" or clientRegion == "russia") then
3 years ago
_detalhes.gump:SetFontFace (NumeralType2_text, _detalhes.gump:GetBestFontForLanguage("koKR"))
4 years ago
else
_detalhes.gump:SetFontFace (NumeralType2_text, _detalhes.gump:GetBestFontForLanguage())
end
3 years ago
--set the text
NumeralType2_text:SetText(asianNumerals)
4 years ago
3 years ago
NumeralType2_text:SetWidth(500)
NumeralType2_text:SetHeight(80)
NumeralType2_text:SetJustifyH("left")
4 years ago
NumeralType2_text:SetJustifyV ("top")
3 years ago
NumeralType2_text:SetTextColor(.8, .8, .8, 1)
NumeralType2_text:SetPoint("topleft", window, "topleft", 40, -220)
if (_detalhes.numerical_system == 1) then --west
WesternNumbersCheckbox:SetValue(true)
AsianNumbersCheckbox:SetValue(false)
elseif (_detalhes.numerical_system == 2) then --east
WesternNumbersCheckbox:SetValue(false)
AsianNumbersCheckbox:SetValue(true)
4 years ago
end
pages [#pages+1] = {thedude2, sword_icon2, numeral_image, texto2Numeral, NumeralType1_text, NumeralType2_text, window.changemindNumeralLabel, window.AsianNumbersLabel, AsianNumbersCheckbox, window.WesternNumbersLabel, WesternNumbersCheckbox}
3 years ago
for _, widget in ipairs(pages[#pages]) do
4 years ago
widget:Hide()
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3 years ago
--page 4
4 years ago
-- DPS effective or active
3 years ago
local ampulheta = window:CreateTexture(nil, "overlay")
ampulheta:SetTexture([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
ampulheta:SetPoint("bottomright", window, "bottomright", -10, 10)
ampulheta:SetHeight(125*3)--125
ampulheta:SetWidth(89*3)--82
ampulheta:SetAlpha(.05)
ampulheta:SetTexCoord(1, 0, 0, 1)
g:NewLabel(window, _, "$parentChangeMind2Label", "changemind2Label", Loc ["STRING_WELCOME_2"], "GameFontNormal", 9, "orange")
window.changemind2Label:SetPoint("center", window, "center")
window.changemind2Label:SetPoint("bottom", window, "bottom", 0, 19)
4 years ago
window.changemind2Label.align = "|"
3 years ago
local texto2 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto2:SetPoint("topleft", window, "topleft", 20, -80)
texto2:SetText(Loc ["STRING_WELCOME_3"])
4 years ago
--chronometer checkbox
3 years ago
g:NewLabel(window, _, "$parentChronometerLabel", "ChronometerLabel", Loc ["STRING_WELCOME_4"], "GameFontHighlightLeft")
4 years ago
local chronometer = g:NewSwitch (window, _, "WelcomeWindowChronometer", "WelcomeWindowChronometer", 20, 20, _, _, true)
chronometer:SetAsCheckBox()
3 years ago
chronometer:SetFixedParameter(1)
chronometer:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.ChronometerLabel:SetPoint("left", chronometer, "right", 2, 0)
4 years ago
--continuouses checkbox
3 years ago
g:NewLabel(window, _, "$parentContinuousLabel", "ContinuousLabel", Loc ["STRING_WELCOME_5"], "GameFontHighlightLeft")
4 years ago
local continuous = g:NewSwitch (window, _, "WelcomeWindowContinuous", "WelcomeWindowContinuous", 20, 20, _, _, true)
continuous:SetAsCheckBox()
3 years ago
continuous:SetFixedParameter(1)
continuous:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.ContinuousLabel:SetPoint("left", continuous, "right", 2, 0)
4 years ago
--on clkich chronomoeter checkbox
chronometer.OnSwitch = function()
3 years ago
chronometer:SetValue(true)
continuous:SetValue(false)
4 years ago
_detalhes.time_type = 1
end
--on click continuous check box
continuous.OnSwitch = function()
3 years ago
continuous:SetValue(true)
chronometer:SetValue(false)
4 years ago
_detalhes.time_type = 2
end
3 years ago
chronometer:SetPoint("topleft", window, "topleft", 40, -130)
continuous:SetPoint("topleft", window, "topleft", 40, -200)
local sword_icon = window:CreateTexture(nil, "overlay")
sword_icon:SetTexture([[Interface\TUTORIALFRAME\UI-TutorialFrame-AttackCursor]])
sword_icon:SetPoint("topright", window, "topright", -15, -30)
sword_icon:SetWidth(64*1.4)
sword_icon:SetHeight(64*1.4)
sword_icon:SetTexCoord(1, 0, 0, 1)
sword_icon:SetDrawLayer("overlay", 2)
local thedude = window:CreateTexture(nil, "overlay")
thedude:SetTexture([[Interface\TUTORIALFRAME\UI-TutorialFrame-TheDude]])
thedude:SetPoint("bottomright", sword_icon, "bottomleft", 70, 19)
thedude:SetWidth(128*1.0)
thedude:SetHeight(128*1.0)
thedude:SetTexCoord(0, 1, 0, 1)
thedude:SetDrawLayer("overlay", 3)
local chronometer_text = window:CreateFontString(nil, "overlay", "GameFontNormal")
chronometer_text:SetText(Loc ["STRING_WELCOME_6"])
chronometer_text:SetWidth(360)
chronometer_text:SetHeight(40)
chronometer_text:SetJustifyH("left")
4 years ago
chronometer_text:SetJustifyV ("top")
3 years ago
chronometer_text:SetTextColor(.8, .8, .8, 1)
chronometer_text:SetPoint("topleft", window.ChronometerLabel.widget, "topright", 20, 0)
local continuous_text = window:CreateFontString(nil, "overlay", "GameFontNormal")
continuous_text:SetText(Loc ["STRING_WELCOME_7"])
continuous_text:SetWidth(340)
continuous_text:SetHeight(40)
continuous_text:SetJustifyH("left")
4 years ago
continuous_text:SetJustifyV ("top")
3 years ago
continuous_text:SetTextColor(.8, .8, .8, 1)
continuous_text:SetPoint("topleft", window.ContinuousLabel.widget, "topright", 20, 0)
4 years ago
3 years ago
if (_detalhes.time_type == 1) then --chronometer
chronometer:SetValue(true)
continuous:SetValue(false)
elseif (_detalhes.time_type == 2) then --continuous
chronometer:SetValue(false)
continuous:SetValue(true)
4 years ago
end
3 years ago
local pleasewait = window:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
pleasewait:SetPoint("bottomright", forward, "topright")
4 years ago
3 years ago
local free_frame3 = CreateFrame("frame", nil, window)
4 years ago
function _detalhes:FreeTutorialFrame3()
if (window_openned_at+10 > time()) then
pleasewait:Show()
forward:Disable()
3 years ago
pleasewait:SetText("wait... " .. window_openned_at + 10 - time())
4 years ago
else
pleasewait:Hide()
3 years ago
pleasewait:SetText("")
4 years ago
forward:Enable()
3 years ago
_detalhes:CancelTimer(window.free_frame3_schedule)
4 years ago
window.free_frame3_schedule = nil
end
end
3 years ago
free_frame3:SetScript("OnShow", function()
4 years ago
if (window_openned_at-10 > time()) then
forward:Disable()
if (window.free_frame3_schedule) then
3 years ago
_detalhes:CancelTimer(window.free_frame3_schedule)
4 years ago
window.free_frame3_schedule = nil
end
window.free_frame3_schedule = _detalhes:ScheduleRepeatingTimer ("FreeTutorialFrame3", 1)
end
end)
3 years ago
free_frame3:SetScript("OnHide", function()
4 years ago
if (window.free_frame3_schedule) then
3 years ago
_detalhes:CancelTimer(window.free_frame3_schedule)
4 years ago
window.free_frame3_schedule = nil
3 years ago
pleasewait:SetText("")
4 years ago
pleasewait:Hide()
end
end)
pages [#pages+1] = {pleasewait, free_frame3, thedude, sword_icon, ampulheta, texto2, chronometer, continuous, chronometer_text, continuous_text, window.changemind2Label, window.ContinuousLabel, window.ChronometerLabel}
3 years ago
for _, widget in ipairs(pages[#pages]) do
4 years ago
widget:Hide()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3 years ago
--page 4
4 years ago
-- UPDATE SPEED
3 years ago
local bg = window:CreateTexture(nil, "overlay")
bg:SetTexture([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
bg:SetPoint("bottomright", window, "bottomright", -10, 10)
bg:SetHeight(125*3)--125
bg:SetWidth(89*3)--82
bg:SetAlpha(.05)
bg:SetTexCoord(1, 0, 0, 1)
g:NewLabel(window, _, "$parentChangeMind4Label", "changemind4Label", Loc ["STRING_WELCOME_11"], "GameFontNormal", 9, "orange")
window.changemind4Label:SetPoint("center", window, "center")
window.changemind4Label:SetPoint("bottom", window, "bottom", 0, 19)
4 years ago
window.changemind4Label.align = "|"
3 years ago
local texto4 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto4:SetPoint("topleft", window, "topleft", 20, -80)
texto4:SetText(Loc ["STRING_WELCOME_41"])
local interval_text = window:CreateFontString(nil, "overlay", "GameFontNormal")
interval_text:SetText(Loc ["STRING_WELCOME_12"])
interval_text:SetWidth(460)
interval_text:SetHeight(40)
interval_text:SetJustifyH("left")
4 years ago
interval_text:SetJustifyV ("top")
3 years ago
interval_text:SetTextColor(1, 1, 1, .9)
interval_text:SetPoint("topleft", window, "topleft", 30, -110)
local dance_text = window:CreateFontString(nil, "overlay", "GameFontNormal")
dance_text:SetText("") --loc removed
dance_text:SetWidth(460)
dance_text:SetHeight(40)
dance_text:SetJustifyH("left")
4 years ago
dance_text:SetJustifyV ("top")
3 years ago
dance_text:SetTextColor(1, 1, 1, 1)
dance_text:SetPoint("topleft", window, "topleft", 30, -175)
4 years ago
--------------- Update Speed
3 years ago
g:NewLabel(window, _, "$parentUpdateSpeedLabel", "updatespeedLabel", Loc ["STRING_OPTIONS_WINDOWSPEED"] .. ":", "GameFontNormal")
window.updatespeedLabel:SetPoint(31, -150)
4 years ago
--
g:NewSlider (window, _, "$parentSliderUpdateSpeed", "updatespeedSlider", 160, 20, 0.050, 3, 0.050, _detalhes.update_speed, true) --parent, container, name, member, w, h, min, max, step, defaultv
3 years ago
window.updatespeedSlider:SetPoint("left", window.updatespeedLabel, "right", 2, 0)
window.updatespeedSlider:SetTemplate(g:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE"))
4 years ago
window.updatespeedSlider:SetThumbSize (50)
window.updatespeedSlider.useDecimals = true
3 years ago
local updateColor = function(slider, value)
4 years ago
if (value < 1) then
3 years ago
slider.amt:SetTextColor(1, value, 0)
4 years ago
elseif (value > 1) then
3 years ago
slider.amt:SetTextColor(-(value-3), 1, 0)
4 years ago
else
3 years ago
slider.amt:SetTextColor(1, 1, 0)
4 years ago
end
end
3 years ago
window.updatespeedSlider:SetHook("OnValueChange", function(self, _, amount)
4 years ago
Details:SetWindowUpdateSpeed(amount)
updateColor(self, amount)
end)
updateColor(window.updatespeedSlider, _detalhes.update_speed)
3 years ago
window.updatespeedSlider:SetHook("OnEnter", function()
4 years ago
return true
end)
window.updatespeedSlider.tooltip = Loc ["STRING_WELCOME_15"]
--------------- Animate Rows
3 years ago
g:NewLabel(window, _, "$parentAnimateLabel", "animateLabel", Loc ["STRING_OPTIONS_ANIMATEBARS"] .. ":", "GameFontNormal")
window.animateLabel:SetPoint(31, -170)
4 years ago
--
g:NewSwitch (window, _, "$parentAnimateSlider", "animateSlider", 60, 20, _, _, _detalhes.use_row_animations) -- ltext, rtext, defaultv
3 years ago
window.animateSlider:SetPoint("left",window.animateLabel, "right", 2, 0)
window.animateSlider.OnSwitch = function(self, _, value) --slider, fixedValue, sliderValue (false, true)
4 years ago
_detalhes:SetUseAnimations (value)
end
3 years ago
window.animateSlider:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
4 years ago
window.animateSlider:SetAsCheckBox()
--window.animateSlider.tooltip = Loc ["STRING_WELCOME_17"] --removed
--------------- Fast Hps/Dps Updates
--[
3 years ago
g:NewLabel(window, _, "$parentDpsHpsLabel", "DpsHpsLabel", Loc ["STRING_WELCOME_63"] .. ":", "GameFontNormal")
window.DpsHpsLabel:SetPoint(31, -190)
4 years ago
--
g:NewSwitch (window, _, "$parentDpsHpsSlider", "DpsHpsSlider", 60, 20, _, _, _detalhes:GetInstance(1).row_info.fast_ps_update) -- ltext, rtext, defaultv
3 years ago
window.DpsHpsSlider:SetPoint("left",window.DpsHpsLabel, "right", 2, 0)
window.DpsHpsSlider.OnSwitch = function(self, _, value) --slider, fixedValue, sliderValue (false, true)
4 years ago
_detalhes:GetInstance(1):FastPSUpdate (value)
end
3 years ago
window.DpsHpsSlider:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
4 years ago
window.DpsHpsSlider:SetAsCheckBox()
--window.DpsHpsSlider.tooltip = Loc ["STRING_WELCOME_64"]
--]]
--------------- Max Segments
3 years ago
-- g:NewLabel(window, _, "$parentSliderLabel", "segmentsLabel", Loc ["STRING_WELCOME_21"] .. ":", "GameFontNormal")
-- window.segmentsLabel:SetPoint(31, -210)
4 years ago
--
-- g:NewSlider (window, _, "$parentSlider", "segmentsSlider", 120, 20, 1, 25, 1, _detalhes.segments_amount) -- min, max, step, defaultv
3 years ago
-- window.segmentsSlider:SetPoint("left", window.segmentsLabel, "right", 2, 0)
-- window.segmentsSlider:SetHook("OnValueChange", function(self, _, amount) --slider, fixedValue, sliderValue
-- _detalhes.segments_amount = math.floor(amount)
4 years ago
-- end)
-- window.segmentsSlider.tooltip = Loc ["STRING_WELCOME_22"]
--------------
3 years ago
local mech_icon = window:CreateTexture(nil, "overlay")
mech_icon:SetTexture([[Interface\Vehicles\UI-Vehicles-Endcap-Alliance]])
mech_icon:SetPoint("topright", window, "topright", -15, -15)
mech_icon:SetWidth(128*0.9)
mech_icon:SetHeight(128*0.9)
mech_icon:SetAlpha(0.8)
local mech_icon2 = window:CreateTexture(nil, "overlay")
mech_icon2:SetTexture([[Interface\Vehicles\UI-Vehicles-Trim-Alliance]])
mech_icon2:SetPoint("topright", window, "topright", -10, -151)
mech_icon2:SetWidth(128*1.0)
mech_icon2:SetHeight(128*0.6)
mech_icon2:SetAlpha(0.6)
mech_icon2:SetTexCoord(0, 1, 40/128, 1)
mech_icon2:SetDrawLayer("overlay", 2)
4 years ago
3 years ago
local update_frame_alert = CreateFrame("frame", nil, window)
update_frame_alert:SetScript("OnShow", function()
4 years ago
_detalhes.tabela_historico:resetar()
created_test_bars = 0
_detalhes.zone_type = "pvp"
_detalhes:EntrarEmCombate()
_detalhes:StartTestBarUpdate()
if (created_test_bars < 2) then
_detalhes:CreateTestBars()
created_test_bars = created_test_bars + 1
end
3 years ago
local instance = _detalhes:GetInstance(1)
4 years ago
instance:SetMode (3)
end)
3 years ago
update_frame_alert:SetScript("OnHide", function()
4 years ago
_detalhes:StopTestBarUpdate()
_detalhes.parser_functions:ZONE_CHANGED_NEW_AREA()
_detalhes:SairDoCombate()
instance:SetMode (2)
end)
----------------
-- window.segmentsLabel, window.segmentsSlider,
pages [#pages+1] = {update_frame_alert, mech_icon2, mech_icon, bg, texto4, interval_text, dance_text, window.updatespeedLabel, window.updatespeedSlider, window.animateLabel, window.animateSlider, window.changemind4Label, window.DpsHpsLabel, window.DpsHpsSlider}
3 years ago
for _, widget in ipairs(pages[#pages]) do
4 years ago
widget:Hide()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3 years ago
--page 6
4 years ago
-- stretcher
3 years ago
local bg6 = window:CreateTexture(nil, "overlay")
bg6:SetTexture([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
bg6:SetPoint("bottomright", window, "bottomright", -10, 10)
bg6:SetHeight(125*3)--125
bg6:SetWidth(89*3)--82
bg6:SetAlpha(.1)
bg6:SetTexCoord(1, 0, 0, 1)
4 years ago
3 years ago
local texto5 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto5:SetPoint("topleft", window, "topleft", 20, -80)
texto5:SetText(Loc ["STRING_WELCOME_26"])
local texto_stretch = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto_stretch:SetPoint("topleft", window, "topleft", 181, -105)
texto_stretch:SetText(Loc ["STRING_WELCOME_27"])
texto_stretch:SetWidth(310)
texto_stretch:SetHeight(100)
texto_stretch:SetJustifyH("left")
4 years ago
texto_stretch:SetJustifyV ("top")
3 years ago
texto_stretch:SetTextColor(1, 1, 1, 1)
4 years ago
3 years ago
local stretch_image = window:CreateTexture(nil, "overlay")
stretch_image:SetTexture([[Interface\Addons\Details\images\icons]])
stretch_image:SetPoint("right", texto_stretch, "left", -12, 0)
stretch_image:SetWidth(144)
stretch_image:SetHeight(61)
stretch_image:SetTexCoord(0.716796875, 1, 0.876953125, 1)
4 years ago
3 years ago
local stretch_frame_alert = CreateFrame("frame", nil, window)
stretch_frame_alert:SetScript("OnHide", function()
4 years ago
_detalhes:StopPlayStretchAlert()
end)
3 years ago
stretch_frame_alert:SetScript("OnShow", function()
local instance = _detalhes:GetInstance(1)
_detalhes.OnEnterMainWindow(instance)
instance.baseframe.button_stretch:SetAlpha(1)
frame_alert.alert:SetPoint("topleft", instance.baseframe.button_stretch, "topleft", -20, 6)
frame_alert.alert:SetPoint("bottomright", instance.baseframe.button_stretch, "bottomright", 20, -14)
4 years ago
frame_alert.alert.animOut:Stop()
frame_alert.alert.animIn:Play()
if (_detalhes.stopwelcomealert) then
3 years ago
_detalhes:CancelTimer(_detalhes.stopwelcomealert)
4 years ago
end
3 years ago
_detalhes.stopwelcomealert = _detalhes:ScheduleTimer("StopPlayStretchAlert", 30)
4 years ago
end)
pages [#pages+1] = {bg6, texto5, stretch_image, texto_stretch, stretch_frame_alert}
3 years ago
for _, widget in ipairs(pages[#pages]) do
4 years ago
widget:Hide()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3 years ago
--page 7
4 years ago
-- window button
3 years ago
local bg6 = window:CreateTexture(nil, "overlay")
bg6:SetTexture([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
bg6:SetPoint("bottomright", window, "bottomright", -10, 10)
bg6:SetHeight(125*3)--125
bg6:SetWidth(89*3)--82
bg6:SetAlpha(.1)
bg6:SetTexCoord(1, 0, 0, 1)
4 years ago
3 years ago
local texto6 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto6:SetPoint("topleft", window, "topleft", 20, -80)
texto6:SetText(Loc ["STRING_WELCOME_28"])
local texto_instance_button = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto_instance_button:SetPoint("topleft", window, "topleft", 25, -105)
texto_instance_button:SetText(Loc ["STRING_WELCOME_29"])
texto_instance_button:SetWidth(270)
texto_instance_button:SetHeight(100)
texto_instance_button:SetJustifyH("left")
4 years ago
texto_instance_button:SetJustifyV ("top")
3 years ago
texto_instance_button:SetTextColor(1, 1, 1, 1)
4 years ago
3 years ago
local instance_button_image = window:CreateTexture(nil, "overlay")
instance_button_image:SetTexture([[Interface\Addons\Details\images\icons]])
instance_button_image:SetPoint("topright", window, "topright", -16, -70)
instance_button_image:SetWidth(198)
instance_button_image:SetHeight(141)
instance_button_image:SetTexCoord(0.328125, 0.71484375, 0.724609375, 1)
4 years ago
3 years ago
local instance_frame_alert = CreateFrame("frame", nil, window)
instance_frame_alert:SetScript("OnHide", function()
4 years ago
_detalhes:StopPlayStretchAlert()
end)
3 years ago
instance_frame_alert:SetScript("OnShow", function()
local instance = _detalhes:GetInstance(1)
4 years ago
3 years ago
frame_alert.alert:SetPoint("topleft", instance.baseframe.cabecalho.modo_selecao.widget, "topleft", -8, 6)
frame_alert.alert:SetPoint("bottomright", instance.baseframe.cabecalho.modo_selecao.widget, "bottomright", 8, -6)
4 years ago
frame_alert.alert.animOut:Stop()
frame_alert.alert.animIn:Play()
if (_detalhes.stopwelcomealert) then
3 years ago
_detalhes:CancelTimer(_detalhes.stopwelcomealert)
4 years ago
end
3 years ago
_detalhes.stopwelcomealert = _detalhes:ScheduleTimer("StopPlayStretchAlert", 30)
4 years ago
end)
pages [#pages+1] = {bg6, texto6, instance_button_image, texto_instance_button, instance_frame_alert}
3 years ago
for _, widget in ipairs(pages[#pages]) do
4 years ago
widget:Hide()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3 years ago
--page 8
4 years ago
-- bookmark
3 years ago
local bg7 = window:CreateTexture(nil, "overlay")
bg7:SetTexture([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
bg7:SetPoint("bottomright", window, "bottomright", -10, 10)
bg7:SetHeight(125*3)--125
bg7:SetWidth(89*3)--82
bg7:SetAlpha(.1)
bg7:SetTexCoord(1, 0, 0, 1)
4 years ago
3 years ago
local texto7 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto7:SetPoint("topleft", window, "topleft", 20, -80)
texto7:SetText(Loc ["STRING_WELCOME_30"])
local texto_shortcut = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto_shortcut:SetPoint("topleft", window, "topleft", 25, -105)
texto_shortcut:SetText(Loc ["STRING_WELCOME_31"])
texto_shortcut:SetWidth(290)
texto_shortcut:SetHeight(160)
texto_shortcut:SetJustifyH("left")
4 years ago
texto_shortcut:SetJustifyV ("top")
3 years ago
texto_shortcut:SetTextColor(1, 1, 1, 1)
local shortcut_image2 = window:CreateTexture(nil, "overlay")
shortcut_image2:SetTexture([[Interface\Addons\Details\images\icons]])
shortcut_image2:SetPoint("topright", window, "topright", -22, -87)
shortcut_image2:SetWidth(165)
shortcut_image2:SetHeight(119)
shortcut_image2:SetTexCoord(2/512, 167/512, 306/512, 425/512)
4 years ago
3 years ago
local instance1 = _detalhes:GetInstance(1)
4 years ago
3 years ago
local bookmark_frame = CreateFrame("frame", "WelcomeBookmarkFrame", window,"BackdropTemplate")
bookmark_frame:SetPoint("topleft", instance1.baseframe, "topleft")
bookmark_frame:SetPoint("bottomright", instance1.baseframe, "bottomright")
bookmark_frame:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 64})
bookmark_frame:SetBackdropColor(0, 0, 0, 0.8)
4 years ago
3 years ago
local desc_anchor_topleft = _detalhes.gump:NewImage(bookmark_frame, [[Interface\AddOns\Details\images\options_window]], 75, 106, "artwork", {0.19921875, 0.2724609375, 0.6796875, 0.783203125}, "descAnchorBottomLeftImage", "$parentDescAnchorBottomLeftImage") --204 696 279 802
desc_anchor_topleft:SetPoint("topleft", bookmark_frame, "topleft", -5, 5)
4 years ago
3 years ago
local desc_anchor_bottomleft = _detalhes.gump:NewImage(bookmark_frame, [[Interface\AddOns\Details\images\options_window]], 75, 106, "artwork", {0.2724609375, 0.19921875, 0.783203125, 0.6796875}, "descAnchorTopLeftImage", "$parentDescAnchorTopLeftImage") --204 696 279 802
desc_anchor_bottomleft:SetPoint("bottomright", bookmark_frame, "bottomright", 5, -5)
4 years ago
3 years ago
local bmf_string = bookmark_frame:CreateFontString("overlay", nil, "GameFontNormal")
bmf_string:SetPoint("center", bookmark_frame, "center")
bmf_string:SetText(Loc ["STRING_WELCOME_65"])
4 years ago
3 years ago
local bg_string = _detalhes.gump:NewImage(bookmark_frame, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-RecentHeader]], 256, 32, "border", {0, 1, 0, 23/32})
bg_string:SetPoint("left", bookmark_frame, "left", 0, 0)
bg_string:SetPoint("right", bookmark_frame, "right", 0, 0)
bg_string:SetPoint("center", bmf_string, "center", 0, 0)
4 years ago
3 years ago
bookmark_frame:SetScript("OnMouseDown", function(self, button)
4 years ago
if (button == "RightButton") then
3 years ago
_detalhes.switch:ShowMe(instance1)
4 years ago
self:Hide()
end
end)
pages [#pages+1] = {bg7, texto7, shortcut_image2, texto_shortcut, bookmark_frame}
3 years ago
for _, widget in ipairs(pages[#pages]) do
4 years ago
widget:Hide()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3 years ago
--page 9
4 years ago
-- group windows
3 years ago
local bg77 = window:CreateTexture(nil, "overlay")
bg77:SetTexture([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
bg77:SetPoint("bottomright", window, "bottomright", -10, 10)
bg77:SetHeight(125*3)--125
bg77:SetWidth(89*3)--82
bg77:SetAlpha(.1)
bg77:SetTexCoord(1, 0, 0, 1)
4 years ago
3 years ago
local texto77 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto77:SetPoint("topleft", window, "topleft", 20, -80)
texto77:SetText(Loc ["STRING_WELCOME_32"])
local texto_snap = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto_snap:SetPoint("topleft", window, "topleft", 25, -101)
texto_snap:SetText(Loc ["STRING_WELCOME_66"])
texto_snap:SetWidth(160)
texto_snap:SetHeight(110)
texto_snap:SetJustifyH("left")
4 years ago
texto_snap:SetJustifyV ("top")
3 years ago
texto_snap:SetTextColor(1, 1, 1, 1)
4 years ago
local fonte, _, flags = texto_snap:GetFont()
texto_snap:SetFont(fonte, 11, flags)
4 years ago
3 years ago
local snap_image1 = window:CreateTexture(nil, "overlay")
snap_image1:SetTexture([[Interface\Addons\Details\images\icons]])
snap_image1:SetPoint("topright", window, "topright", -12, -95)
snap_image1:SetWidth(310)
snap_image1:SetHeight(102)
snap_image1:SetTexCoord(0, 0.60546875, 191/512, 293/512)
4 years ago
3 years ago
local group_frame_alert = CreateFrame("frame", nil, window)
group_frame_alert:SetScript("OnShow", function()
4 years ago
_detalhes.tabela_historico:resetar()
created_test_bars = 0
end)
pages [#pages+1] = {bg77, texto77, snap_image1, texto_snap, group_frame_alert}
3 years ago
for _, widget in ipairs(pages[#pages]) do
4 years ago
widget:Hide()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3 years ago
--page 10
4 years ago
-- tooltip shift alt ctrl
3 years ago
local bg88 = window:CreateTexture(nil, "overlay")
bg88:SetTexture([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
bg88:SetPoint("bottomright", window, "bottomright", -10, 10)
bg88:SetHeight(125*3)--125
bg88:SetWidth(89*3)--82
bg88:SetAlpha(.1)
bg88:SetTexCoord(1, 0, 0, 1)
4 years ago
3 years ago
local texto88 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto88:SetPoint("topleft", window, "topleft", 20, -80)
texto88:SetText(Loc ["STRING_WELCOME_34"])
4 years ago
3 years ago
local texto_micro_display = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto_micro_display:SetPoint("topleft", window, "topleft", 25, -101)
texto_micro_display:SetText(Loc ["STRING_WELCOME_67"])
texto_micro_display:SetWidth(300)
texto_micro_display:SetHeight(110)
texto_micro_display:SetJustifyH("left")
4 years ago
texto_micro_display:SetJustifyV ("top")
3 years ago
texto_micro_display:SetTextColor(1, 1, 1, 1)
4 years ago
3 years ago
local micro_image1 = window:CreateTexture(nil, "overlay")
micro_image1:SetTexture([[Interface\Addons\Details\images\icons]])
micro_image1:SetPoint("topright", window, "topright", -15, -70)
micro_image1:SetWidth(186)
micro_image1:SetHeight(100)
micro_image1:SetTexCoord(326/512, 1, 85/512, 185/512)
4 years ago
3 years ago
local tooltip_frame = CreateFrame("frame", nil, window)
tooltip_frame:SetScript("OnShow", function(self)
4 years ago
_detalhes.tabela_historico:resetar()
created_test_bars = 0
3 years ago
local current_combat = _detalhes:GetCombat("current")
4 years ago
local actors_classes = CLASS_SORT_ORDER
local total_damage = 0
local total_heal = 0
local joe = current_combat[1]:PegarCombatente ("0x0000000000001", "Joe", 0x114, true)
joe.grupo = true
3 years ago
joe.classe = actors_classes [math.random(1, #actors_classes)]
4 years ago
joe.total = 7500000
joe.total_without_pet = 7500000
3 years ago
joe.damage_taken = math.random(100000, 600000)
joe.friendlyfire_total = math.random(100000, 600000)
4 years ago
total_damage = total_damage + joe.total
--local joe_death = current_combat[4]:PegarCombatente (0x0000000000000, joe.nome, 0x114, true)
--joe_death.grupo = true
--joe_death.classe = joe.classe
--local esta_morte = {{true, 96648, 100000, time(), 0, "Lady Holenna"}, {true, 96648, 100000, time()-52, 100000, "Lady Holenna"}, {true, 96648, 100000, time()-86, 200000, "Lady Holenna"}, {true, 96648, 100000, time()-101, 300000, "Lady Holenna"}, {false, 55296, 400000, time()-54, 400000, "King Djoffrey"}, {true, 14185, 0, time()-59, 400000, "Lady Holenna"}, {false, 87351, 400000, time()-154, 400000, "King Djoffrey"}, {false, 56236, 400000, time()-158, 400000, "King Djoffrey"} }
--local t = {esta_morte, time(), joe.nome, joe.classe, 400000, "52m 12s", ["dead"] = true}
3 years ago
--table.insert(current_combat.last_events_tables, #current_combat.last_events_tables+1, t)
4 years ago
rawset(_detalhes.spellcache, 300000, {"A Gun in Your Hand", 300000, [[Interface\ICONS\INV_Legendary_Gun]]})
rawset(_detalhes.spellcache, 300001, {"Shot", 300001, [[Interface\ICONS\INV_Archaeology_Ogres_HarGunn_Eye]]})
rawset(_detalhes.spellcache, 300002, {"Mexico Travel", 300002, [[Interface\ICONS\Achievement_Dungeon_Gundrak_Normal]]})
rawset(_detalhes.spellcache, 300003, {"Rope", 300003, [[Interface\ICONS\Creatureportrait_RopeLadder01]]})
rawset(_detalhes.spellcache, 300004, {"A Guitar Solo", 300004, [[Interface\ICONS\INV_Staff_2h_DraenorDungeon_C_05]]})
rawset(_detalhes.spellcache, 300005, {"Watchtower", 300005, [[Interface\ICONS\Achievement_BG_DefendXtowers_AV]]})
rawset(_detalhes.spellcache, 300006, {"Oh! Hey There!", 300006, [[Interface\ICONS\Spell_Shadow_SummonSuccubus]]})
rawset(_detalhes.spellcache, 300007, {"I'm an Ability!", 300007, [[Interface\ICONS\Spell_Nature_Polymorph]]})
4 years ago
joe.targets ["My Old Lady"] = 3500000
joe.targets ["My Self"] = 2000000
joe.targets ["Another Man"] = 1000001
joe.targets ["Another Random Guy"] = 1000001
joe.spells:PegaHabilidade (300000, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300000].total = 4500000
joe.spells:PegaHabilidade (300001, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300001].total = 1000001
joe.spells:PegaHabilidade (300002, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300002].total = 1000001
joe.spells:PegaHabilidade (300003, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300003].total = 2000000
joe.spells:PegaHabilidade (300004, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300004].total = 4100000
joe.spells:PegaHabilidade (300005, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300005].total = 1000003
joe.spells:PegaHabilidade (300006, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300006].total = 800000
joe.spells:PegaHabilidade (300007, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300007].total = 700000
--current_combat.start_time = time()-360
current_combat.start_time = GetTime() - 360
--current_combat.end_time = time()
current_combat.end_time = GetTime()
current_combat.totals_grupo [1] = total_damage
current_combat.totals [1] = total_damage
3 years ago
for _, instance in ipairs(_detalhes.tabela_instancias) do
4 years ago
if (instance:IsEnabled()) then
instance:InstanceReset()
end
end
_detalhes:GetInstance(1):SetDisplay (0, 1, 1)
local bar1 = _detalhes:GetInstance(1):GetRow(1)
3 years ago
frame_alert.alert:SetPoint("topleft", bar1, "topleft", -60, 8)
frame_alert.alert:SetPoint("bottomright", bar1, "bottomright", 60, -10)
4 years ago
frame_alert.alert.animOut:Stop()
frame_alert.alert.animIn:Play()
if (_detalhes.stopwelcomealert) then
3 years ago
_detalhes:CancelTimer(_detalhes.stopwelcomealert)
4 years ago
end
3 years ago
_detalhes.stopwelcomealert = _detalhes:ScheduleTimer("StopPlayStretchAlert", 2)
4 years ago
end)
3 years ago
tooltip_frame:SetScript("OnHide", function()
4 years ago
_detalhes:StopPlayStretchAlert()
end)
pages [#pages+1] = {bg88, texto88, micro_image1, texto_micro_display, tooltip_frame}
3 years ago
for _, widget in ipairs(pages[#pages]) do
4 years ago
widget:Hide()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3 years ago
--page 11
4 years ago
3 years ago
local bg11 = window:CreateTexture(nil, "overlay")
bg11:SetTexture([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
bg11:SetPoint("bottomright", window, "bottomright", -10, 10)
bg11:SetHeight(125*3)--125
bg11:SetWidth(89*3)--82
bg11:SetAlpha(.1)
bg11:SetTexCoord(1, 0, 0, 1)
4 years ago
3 years ago
local texto11 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto11:SetPoint("topleft", window, "topleft", 20, -80)
texto11:SetText(Loc ["STRING_WELCOME_36"])
4 years ago
3 years ago
local texto_plugins = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto_plugins:SetPoint("topleft", window, "topleft", 25, -101)
texto_plugins:SetText(Loc ["STRING_WELCOME_68"])
texto_plugins:SetWidth(220)
texto_plugins:SetHeight(110)
texto_plugins:SetJustifyH("left")
4 years ago
texto_plugins:SetJustifyV ("top")
3 years ago
texto_plugins:SetTextColor(1, 1, 1, 1)
4 years ago
--local fonte, _, flags = texto_plugins:GetFont()
--texto_plugins:SetFont(fonte, 11, flags)
4 years ago
3 years ago
local plugins_image1 = window:CreateTexture(nil, "overlay")
plugins_image1:SetTexture([[Interface\Addons\Details\images\icons2]])
plugins_image1:SetPoint("topright", window, "topright", -12, -90)
plugins_image1:SetWidth(281)
plugins_image1:SetHeight(81)
plugins_image1:SetTexCoord(216/512, 497/512, 6/512, 95/512)
4 years ago
pages [#pages+1] = {bg11, texto11, plugins_image1, texto_plugins}
3 years ago
for _, widget in ipairs(pages[#pages]) do
4 years ago
widget:Hide()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3 years ago
--page 12
4 years ago
3 years ago
local bg8 = window:CreateTexture(nil, "overlay")
bg8:SetTexture([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
bg8:SetPoint("bottomright", window, "bottomright", -10, 10)
bg8:SetHeight(125*3)--125
bg8:SetWidth(89*3)--82
bg8:SetAlpha(.1)
bg8:SetTexCoord(1, 0, 0, 1)
4 years ago
3 years ago
local texto8 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto8:SetPoint("topleft", window, "topleft", 20, -80)
texto8:SetText(Loc ["STRING_WELCOME_38"])
local texto = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto:SetPoint("topleft", window, "topleft", 25, -110)
texto:SetText(Loc ["STRING_WELCOME_39"])
texto:SetWidth(410)
texto:SetHeight(90)
texto:SetJustifyH("left")
4 years ago
texto:SetJustifyV ("top")
3 years ago
texto:SetTextColor(1, 1, 1, 1)
4 years ago
3 years ago
local final_frame = CreateFrame("frame", nil, window)
final_frame:SetSize(1, 1)
final_frame:SetPoint("center")
4 years ago
final_frame:Hide()
3 years ago
final_frame:SetScript("OnShow", function()
4 years ago
cancel:Enable()
3 years ago
cancel:GetNormalTexture():SetDesaturated(false)
4 years ago
end)
pages [#pages+1] = {bg8, texto8, texto, final_frame}
3 years ago
for _, widget in ipairs(pages[#pages]) do
4 years ago
widget:Hide()
end
------------------------------------------------------------------------------------------------------------------------------
--[[
forward:Click()
forward:Click()
forward:Click()
forward:Click()
forward:Click()
forward:Click()
forward:Click()
--forward:Click()
--forward:Click()
--forward:Click()
--]]
end
end