Skip to content

Commit

Permalink
Fixing small issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Feb 17, 2022
1 parent 3381746 commit 8594fbb
Show file tree
Hide file tree
Showing 6 changed files with 191 additions and 85 deletions.
2 changes: 1 addition & 1 deletion Libs/DF/fw.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


local dversion = 286
local dversion = 287
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)

Expand Down
65 changes: 34 additions & 31 deletions Libs/DF/panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1983,50 +1983,52 @@ local SimplePanel_frame_backdrop_border_color = {0, 0, 0, 1}
--with_label was making the frame stay in place while its parent moves
--the slider was anchoring to with_label and here here were anchoring the slider again
function DF:CreateScaleBar(frame, config)
local scaleBar, text = DF:CreateSlider (frame, 120, 14, 0.6, 1.6, 0.1, config.scale, true, "ScaleBar", nil, "Scale:", DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"), DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
local scaleBar, text = DF:CreateSlider(frame, 120, 14, 0.6, 1.6, 0.1, config.scale, true, "ScaleBar", nil, "Scale:", DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"), DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
scaleBar.thumb:SetWidth(24)
scaleBar:SetValueStep(0.1)
scaleBar:SetObeyStepOnDrag(true)
scaleBar.mouseDown = false
rawset(scaleBar, "lockdown", true)

--> create a custom editbox to enter the scale from text
local editbox = CreateFrame("editbox", nil, scaleBar.widget, "BackdropTemplate")
editbox:SetSize(40, 20)
editbox:SetJustifyH("center")
editbox:SetBackdrop({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", --edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]],
tile = true, edgeSize = 8, tileSize = 5})
editbox:SetFontObject("GameFontHighlightSmall")

editbox:SetScript("OnEnterPressed", function()
editbox:ClearFocus()
editbox:Hide()
local text = editbox:GetText()
local newScale = DF.TextToFloor(text)
--create a custom editbox to enter the scale from text
local editbox = CreateFrame("editbox", nil, scaleBar.widget, "BackdropTemplate")
editbox:SetSize(40, 20)
editbox:SetJustifyH("center")
editbox:SetBackdrop({bgFile = [[Interface\ACHIEVEMENTFRAME\UI-GuildAchievement-Parchment-Horizontal-Desaturated]],
edgeFile = [[Interface\Buttons\WHITE8X8]],
tile = true, edgeSize = 1, tileSize = 64})
editbox:SetFontObject("GameFontHighlightSmall")
editbox:SetBackdropColor(0, 0, 0, 1)

editbox:SetScript("OnEditFocusGained", function()
end)

if (newScale) then
config.scale = newScale
scaleBar:SetValue(newScale)
frame:SetScale(newScale)
editbox.defaultValue = newScale
end
end)

editbox:SetScript("OnEscapePressed", function()
editbox:ClearFocus()
editbox:Hide()
editbox:SetText(editbox.defaultValue)
end)
editbox:SetScript("OnEnterPressed", function()
editbox:ClearFocus()
editbox:Hide()
local text = editbox:GetText()
local newScale = DF.TextToFloor(text)

editbox:SetScript("OnTextChanged", function()
end)
if (newScale) then
config.scale = newScale
scaleBar:SetValue(newScale)
frame:SetScale(newScale)
editbox.defaultValue = newScale
end
end)

editbox:SetScript("OnEscapePressed", function()
editbox:ClearFocus()
editbox:Hide()
editbox:SetText(editbox.defaultValue)
end)

scaleBar:SetScript("OnMouseDown", function(_, mouseButton)
if (mouseButton == "RightButton") then
editbox:Show()
editbox:SetAllPoints()
editbox:SetText(config.scale)
editbox:SetFocus(true)
editbox.defaultValue = config.scale

elseif (mouseButton == "LeftButton") then
Expand All @@ -2052,7 +2054,8 @@ function DF:CreateScaleBar(frame, config)

scaleBar:SetAlpha(0.70)
editbox.defaultValue = config.scale

editbox:SetFocus(false)
editbox:SetAutoFocus(false)
return scaleBar
end

Expand Down
2 changes: 1 addition & 1 deletion Libs/LibOpenRaid/LibOpenRaid.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

local major = "LibOpenRaid-1.0"
local CONST_LIB_VERSION = 21
local CONST_LIB_VERSION = 22
LIB_OPEN_RAID_CAN_LOAD = false

--declae the library within the LibStub
Expand Down
126 changes: 125 additions & 1 deletion Libs/LibOpenRaid/ThingsToMantain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,79 @@ if (not LIB_OPEN_RAID_CAN_LOAD) then
return
end

--localization
local gameLanguage = GetLocale()

local L = { --default localization
["STRING_EXPLOSION"] = "explosion",
["STRING_MIRROR_IMAGE"] = "Mirror Image",
["STRING_CRITICAL_ONLY"] = "critical",
["STRING_BLOOM"] = "Bloom", --lifebloom 'bloom' healing
["STRING_GLAIVE"] = "Glaive", --DH glaive toss
["STRING_MAINTARGET"] = "Main Target",
["STRING_AOE"] = "AoE", --multi targets
["STRING_SHADOW"] = "Shadow", --the spell school 'shadow'
["STRING_PHYSICAL"] = "Physical", --the spell school 'physical'
["STRING_PASSIVE"] = "Passive", --passive spell
["STRING_TEMPLAR_VINDCATION"] = "Templar's Vindication", --paladin spell
["STRING_PROC"] = "proc", --spell proc
["STRING_TRINKET"] = "Trinket", --trinket
}

if (gameLanguage == "enUS") then
--default language

elseif (gameLanguage == "deDE") then
L["STRING_EXPLOSION"] = "Explosion"
L["STRING_MIRROR_IMAGE"] = "Bilder spiegeln"
L["STRING_CRITICAL_ONLY"] = "kritisch"

elseif (gameLanguage == "esES") then
L["STRING_EXPLOSION"] = "explosión"
L["STRING_MIRROR_IMAGE"] = "Imagen de espejo"
L["STRING_CRITICAL_ONLY"] = "crítico"

elseif (gameLanguage == "esMX") then
L["STRING_EXPLOSION"] = "explosión"
L["STRING_MIRROR_IMAGE"] = "Imagen de espejo"
L["STRING_CRITICAL_ONLY"] = "crítico"

elseif (gameLanguage == "frFR") then
L["STRING_EXPLOSION"] = "explosion"
L["STRING_MIRROR_IMAGE"] = "Effet miroir"
L["STRING_CRITICAL_ONLY"] = "critique"

elseif (gameLanguage == "itIT") then
L["STRING_EXPLOSION"] = "esplosione"
L["STRING_MIRROR_IMAGE"] = "Immagine Speculare"
L["STRING_CRITICAL_ONLY"] = "critico"

elseif (gameLanguage == "koKR") then
L["STRING_EXPLOSION"] = "폭발"
L["STRING_MIRROR_IMAGE"] = "미러 이미지"
L["STRING_CRITICAL_ONLY"] = "치명타"

elseif (gameLanguage == "ptBR") then
L["STRING_EXPLOSION"] = "explosão"
L["STRING_MIRROR_IMAGE"] = "Imagem Espelhada"
L["STRING_CRITICAL_ONLY"] = "critico"

elseif (gameLanguage == "ruRU") then
L["STRING_EXPLOSION"] = "взрыв"
L["STRING_MIRROR_IMAGE"] = "Зеркальное изображение"
L["STRING_CRITICAL_ONLY"] = "критический"

elseif (gameLanguage == "zhCN") then
L["STRING_EXPLOSION"] = "爆炸"
L["STRING_MIRROR_IMAGE"] = "镜像"
L["STRING_CRITICAL_ONLY"] = "爆击"

elseif (gameLanguage == "zhTW") then
L["STRING_EXPLOSION"] = "爆炸"
L["STRING_MIRROR_IMAGE"] = "鏡像"
L["STRING_CRITICAL_ONLY"] = "致命"
end

LIB_OPEN_RAID_BLOODLUST = {
[2825] = true, --bloodlust
[32182] = true, --heroism
Expand Down Expand Up @@ -210,6 +283,7 @@ LIB_OPEN_RAID_COOLDOWNS_BY_SPEC = {
[64044] = 5, --Psychic Horror
[8122] = 5, --Psychic Scream
[205369] = 5, --Mind Bomb
[228260] = 1, --Void Erruption
},

--ROGUE
Expand Down Expand Up @@ -816,6 +890,7 @@ LIB_OPEN_RAID_COOLDOWNS_INFO = {
[15286] = {cooldown = 120, duration = 15, talent = false, charges = 1, class = "PRIEST", type = 4}, --Vampiric Embrace
[64044] = {cooldown = 45, duration = 4, talent = 21752, charges = 1, class = "PRIEST", type = 5}, --Psychic Horror
[205369] = {cooldown = 30, duration = 6, talent = 23375, charges = 1, class = "PRIEST", type = 5}, --Mind Bomb
[228260] = {cooldown = 90, duration = 15, talent = false, charges = 1, class = "PRIEST", type = 1}, --Void Erruption

--> rogue
[79140] = {cooldown = 120, duration = 20, talent = false, charges = 1, class = "ROGUE", type = 1}, --Vendetta
Expand All @@ -830,4 +905,53 @@ LIB_OPEN_RAID_COOLDOWNS_INFO = {
[199754] = {cooldown = 120, duration = 10, talent = false, charges = 1, class = "ROGUE", type = 2}, --Riposte
[343142] = {cooldown = 90, duration = 10, talent = 19250, charges = 1, class = "ROGUE", type = 5}, --Dreadblades
[121471] = {cooldown = 180, duration = 20, talent = false, charges = 1, class = "ROGUE", type = 1}, --Shadow Blades
}
}

--[=[
Spell customizations:
Many times there's spells with the same name which does different effects
In here you find a list of spells which has its name changed to give more information to the player
you may add into the list any other parameter your addon uses declaring for example 'icon = ' or 'texcoord = ' etc.
Implamentation Example:
if (LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) then
for spellId, customTable in pairs(LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) do
local name = customTable.name
if (name) then
MyCustomSpellTable[spellId] = name
end
end
end
--]=]

LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {} --default fallback

if (GetBuildInfo():match ("%d") == "1") then
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}

elseif (GetBuildInfo():match ("%d") == "2") then
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}

else
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {
[44461] = {name = GetSpellInfo(44461) .. " (" .. L["STRING_EXPLOSION"] .. ")"}, --> Living Bomb (explosion)
[59638] = {name = GetSpellInfo(59638) .. " (" .. L["STRING_MIRROR_IMAGE"] .. ")"}, --> Mirror Image's Frost Bolt (mage)
[88082] = {name = GetSpellInfo(88082) .. " (" .. L["STRING_MIRROR_IMAGE"] .. ")"}, --> Mirror Image's Fireball (mage)
[94472] = {name = GetSpellInfo(94472) .. " (" .. L["STRING_CRITICAL_ONLY"] .. ")"}, --> Atonement critical hit (priest)
[33778] = {name = GetSpellInfo(33778) .. " (" .. L["STRING_BLOOM"] .. ")"}, --lifebloom (bloom)
[121414] = {name = GetSpellInfo(121414) .. " (" .. L["STRING_GLAIVE"] .. " #1)"}, --> glaive toss (hunter)
[120761] = {name = GetSpellInfo(120761) .. " (" .. L["STRING_GLAIVE"] .. " #2)"}, --> glaive toss (hunter)
[212739] = {name = GetSpellInfo(212739) .. " (" .. L["STRING_MAINTARGET"] .. ")"}, --DK Epidemic
[215969] = {name = GetSpellInfo(215969) .. " (" .. L["STRING_AOE"] .. ")"}, --DK Epidemic
[70890] = {name = GetSpellInfo(70890) .. " (" .. L["STRING_SHADOW"] .. ")"}, --DK Scourge Strike
[55090] = {name = GetSpellInfo(55090) .. " (" .. L["STRING_PHYSICAL"] .. ")"}, --DK Scourge Strike
[49184] = {name = GetSpellInfo(49184) .. " (" .. L["STRING_MAINTARGET"] .. ")"}, --DK Howling Blast
[237680] = {name = GetSpellInfo(237680) .. " (" .. L["STRING_AOE"] .. ")"}, --DK Howling Blast
[228649] = {name = GetSpellInfo(228649) .. " (" .. L["STRING_PASSIVE"] .. ")"}, --Monk Mistweaver Blackout kick - Passive Teachings of the Monastery
[339538] = {name = GetSpellInfo(224266) .. " (" .. L["STRING_TEMPLAR_VINDCATION"] .. ")"}, --
[343355] = {name = GetSpellInfo(343355) .. " (" .. L["STRING_PROC"] .. ")"}, --shadow priest's void bold proc

--> shadowlands trinkets
[345020] = {name = GetSpellInfo(345020) .. " (" .. L["STRING_TRINKET"] .. ")"},
}
end
8 changes: 5 additions & 3 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

local version, build, date, tocversion = GetBuildInfo()

_detalhes.build_counter = 9692
_detalhes.alpha_build_counter = 9692 --if this is higher than the regular counter, use it instead
_detalhes.build_counter = 9693
_detalhes.alpha_build_counter = 9693 --if this is higher than the regular counter, use it instead
_detalhes.bcc_counter = 31
_detalhes.dont_open_news = true
_detalhes.game_version = version
Expand Down Expand Up @@ -43,6 +43,7 @@ do
Allowed nicknames on custom displays (by Flamanis).
Aligned Text Columns enabled is now default for new installs.
Fodder to the flames DH ability won't count damage done by the player on the add summoned.
Spell customization now get date from Lib-OpenRaid.
Fixed the load time for the Npc Ids panel on the spell list section.
Fixed all issues with the options panel scale.
Fixed tooltips overlap when the window is positioned at the top of the screen (fix by Flamanis).
Expand Down Expand Up @@ -274,11 +275,12 @@ do
-- /script Details:OpenPlugin ('Advanced Death Logs'); local a = Details_DeathGraphsModeEnduranceButton and Details_DeathGraphsModeEnduranceButton.MyObject:Click()
{Name = "Report What is Shown In the Window", Desc = "Report the current data shown in the window, the number 1 is the window number, replace it to report another window.", MacroText = "/script Details:FastReportWindow(1)"},
}

--> current instances of the exp (need to maintain)
_detalhes.InstancesToStoreData = { --mapId
[2296] = true, --castle narnia
[2450] = true, --sanctum of domination
[2481] = true, --sepulcher of the first ones
}

--> armazena os escudos - Shields information for absorbs
Expand Down
Loading

0 comments on commit 8594fbb

Please sign in to comment.