More visual changes for wow 11
This commit is contained in:
+24
-12
@@ -20,7 +20,7 @@ local IsPassiveSpell = IsPassiveSpell
|
||||
|
||||
--api locals
|
||||
local PixelUtil = PixelUtil or DFPixelUtil
|
||||
local version = 27
|
||||
local version = 28
|
||||
|
||||
local CONST_MENU_TYPE_MAINMENU = "main"
|
||||
local CONST_MENU_TYPE_SUBMENU = "sub"
|
||||
@@ -150,8 +150,11 @@ function DF:CreateCoolTip()
|
||||
["SubMenuIsTooltip"] = true,
|
||||
["LeftBorderSize"] = true, --offset between the left border and the left icon, default: 10 + offset
|
||||
["RightBorderSize"] = true, --offset between the right border and the right icon, default: -10 + offset
|
||||
["TopBorderSize"] = true, --offset between the top border and the top of the first line, default: -6 + offset
|
||||
["HeighMod"] = true,
|
||||
["HeighModSub"] = true,
|
||||
["TooltipFrameHeightOffset"] = true,
|
||||
["TooltipFrameHeightOffsetSub"] = true,
|
||||
["IconBlendMode"] = true,
|
||||
["IconBlendModeHover"] = true,
|
||||
["SubFollowButton"] = true,
|
||||
@@ -1832,7 +1835,8 @@ function DF:CreateCoolTip()
|
||||
end
|
||||
|
||||
--normalize height of all rows
|
||||
local heightValue = -6 + spacing + (gameCooltip.OptionsTable.ButtonsYMod or 0)
|
||||
local heightValue = (gameCooltip.OptionsTable.TopBorderSize or -6) + spacing + (gameCooltip.OptionsTable.ButtonsYMod or 0)
|
||||
|
||||
for i = 1, #LeftTextTableSub do
|
||||
local menuButton = frame2.Lines[i]
|
||||
|
||||
@@ -1861,7 +1865,7 @@ function DF:CreateCoolTip()
|
||||
|
||||
else
|
||||
menuButton:SetHeight(frame2.hHeight + (gameCooltip.OptionsTable.ButtonHeightMod or 0))
|
||||
menuButton:SetPoint("top", frame2, "top", 0, (((i-1) * frame2.hHeight) * -1) - 6 + (gameCooltip.OptionsTable.ButtonsYMod or 0) + spacing)
|
||||
menuButton:SetPoint("top", frame2, "top", 0, (((i-1) * frame2.hHeight) * -1) + (gameCooltip.OptionsTable.TopBorderSize or -6) + (gameCooltip.OptionsTable.ButtonsYMod or 0) + spacing)
|
||||
end
|
||||
|
||||
if (gameCooltip.OptionsTable.YSpacingMod and not gameCooltip.OptionsTable.IgnoreButtonAutoHeight) then
|
||||
@@ -1896,17 +1900,22 @@ function DF:CreateCoolTip()
|
||||
end
|
||||
end
|
||||
|
||||
local heightMod = gameCooltip.OptionsTable.TooltipFrameHeightOffsetSub or 0
|
||||
|
||||
if (gameCooltip.OptionsTable.FixedHeight) then
|
||||
PixelUtil.SetHeight(frame2, gameCooltip.OptionsTable.FixedHeight)
|
||||
else
|
||||
if (gameCooltip.OptionsTable.AlignAsBlizzTooltip) then
|
||||
PixelUtil.SetHeight(frame2, ((heightValue - 10) * -1) + (gameCooltip.OptionsTable.AlignAsBlizzTooltipFrameHeightOffset or 0))
|
||||
local newHeight = ((heightValue - 10) * -1) + (gameCooltip.OptionsTable.AlignAsBlizzTooltipFrameHeightOffset or 0)
|
||||
PixelUtil.SetHeight(frame2, newHeight)
|
||||
|
||||
elseif (gameCooltip.OptionsTable.IgnoreButtonAutoHeight) then
|
||||
PixelUtil.SetHeight(frame2, (heightValue + spacing) * -1)
|
||||
local newHeight = (heightValue + spacing) * -1
|
||||
PixelUtil.SetHeight(frame2, newHeight + heightMod)
|
||||
|
||||
else
|
||||
PixelUtil.SetHeight(frame2, max((frame2.hHeight * gameCooltip.Indexes) + 8 + ((gameCooltip.OptionsTable.ButtonsYMod or 0) * -1), 22))
|
||||
local newHeight = (frame2.hHeight * gameCooltip.Indexes) + 8 + ((gameCooltip.OptionsTable.ButtonsYMod or 0) * -1)
|
||||
PixelUtil.SetHeight(frame2, max(newHeight + heightMod, 22))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2073,7 +2082,8 @@ function DF:CreateCoolTip()
|
||||
end
|
||||
|
||||
--normalize height of all rows
|
||||
local heightValue = -6 + spacing + (gameCooltip.OptionsTable.ButtonsYMod or 0)
|
||||
local heightValue = (gameCooltip.OptionsTable.TopBorderSize or -6) + spacing + (gameCooltip.OptionsTable.ButtonsYMod or 0)
|
||||
|
||||
for i = 1, gameCooltip.Indexes do
|
||||
local menuButton = frame1.Lines[i]
|
||||
|
||||
@@ -2099,10 +2109,9 @@ function DF:CreateCoolTip()
|
||||
menuButton:SetHeight(height)
|
||||
menuButton:SetPoint("top", frame1, "top", 0, heightValue)
|
||||
heightValue = heightValue + (height * -1) + spacing + (gameCooltip.OptionsTable.ButtonsYMod or 0)
|
||||
|
||||
else
|
||||
menuButton:SetHeight(frame1.hHeight + (gameCooltip.OptionsTable.ButtonHeightMod or 0))
|
||||
menuButton:SetPoint("top", frame1, "top", 0, (((i-1) * frame1.hHeight) * -1) - 6 + (gameCooltip.OptionsTable.ButtonsYMod or 0) + spacing)
|
||||
menuButton:SetPoint("top", frame1, "top", 0, (((i-1) * frame1.hHeight) * -1) + (gameCooltip.OptionsTable.TopBorderSize or -6) + (gameCooltip.OptionsTable.ButtonsYMod or 0) + spacing)
|
||||
end
|
||||
|
||||
if (gameCooltip.OptionsTable.YSpacingMod and not gameCooltip.OptionsTable.IgnoreButtonAutoHeight) then
|
||||
@@ -2137,6 +2146,8 @@ function DF:CreateCoolTip()
|
||||
end
|
||||
end
|
||||
|
||||
local heightMod = gameCooltip.OptionsTable.TooltipFrameHeightOffset or 0
|
||||
|
||||
if (gameCooltip.OptionsTable.FixedHeight) then
|
||||
PixelUtil.SetHeight(frame1, gameCooltip.OptionsTable.FixedHeight)
|
||||
else
|
||||
@@ -2144,10 +2155,11 @@ function DF:CreateCoolTip()
|
||||
PixelUtil.SetHeight(frame1, ((heightValue - 10) * -1) + (gameCooltip.OptionsTable.AlignAsBlizzTooltipFrameHeightOffset or 0))
|
||||
|
||||
elseif (gameCooltip.OptionsTable.IgnoreButtonAutoHeight) then
|
||||
PixelUtil.SetHeight(frame1, (heightValue + spacing) * -1)
|
||||
|
||||
local newHeight = (heightValue + spacing) * -1
|
||||
PixelUtil.SetHeight(frame1, newHeight + heightMod)
|
||||
else
|
||||
PixelUtil.SetHeight(frame1, max((frame1.hHeight * gameCooltip.Indexes) + 8 + ((gameCooltip.OptionsTable.ButtonsYMod or 0) * -1), 22))
|
||||
local newHeight = (frame1.hHeight * gameCooltip.Indexes) + 8 + ((gameCooltip.OptionsTable.ButtonsYMod or 0) * -1)
|
||||
PixelUtil.SetHeight(frame1, max(newHeight + heightMod, 22))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+42
-8
@@ -1340,7 +1340,9 @@
|
||||
end
|
||||
end
|
||||
|
||||
local bgColor, borderColor = {0, 0, 0, 0.8}, {0, 0, 0, 0} --{0.37, 0.37, 0.37, .75}, {.30, .30, .30, .3}
|
||||
local bgColor, borderColor = {0, 0, 0, 0.8}, {0, 0, 0, 0.5} --{0.37, 0.37, 0.37, .75}, {.30, .30, .30, .3}
|
||||
local backdrop = {bgFile = [[Interface\AddOns\Details\images\background83.png]], edgeFile = [[Interface\Buttons\WHITE8X8]], tile=true,
|
||||
edgeSize = 1, tileSize = 64, insets = {left = 0, right = 0, top = 0, bottom = 0}}
|
||||
|
||||
function Details:FormatCooltipForSpells()
|
||||
local GameCooltip = GameCooltip
|
||||
@@ -1348,8 +1350,8 @@
|
||||
GameCooltip:Reset()
|
||||
GameCooltip:SetType("tooltip")
|
||||
|
||||
--GameCooltip:SetOption("StatusBarTexture", [[Interface\AddOns\Details\images\bar_background_dark_withline]])
|
||||
GameCooltip:SetOption("StatusBarTexture", [[Interface\AddOns\Details\images\bar_textures\bar_rounded]])
|
||||
GameCooltip:SetOption("StatusBarTexture", [[Interface\AddOns\Details\images\bar_background_dark_withline]])
|
||||
--GameCooltip:SetOption("StatusBarTexture", [[Interface\AddOns\Details\images\bar_textures\bar_rounded.png]])
|
||||
|
||||
GameCooltip:SetOption("TextSize", Details.tooltip.fontsize)
|
||||
GameCooltip:SetOption("TextFont", Details.tooltip.fontface)
|
||||
@@ -1358,16 +1360,21 @@
|
||||
GameCooltip:SetOption("TextShadow", Details.tooltip.fontshadow and "OUTLINE")
|
||||
GameCooltip:SetOption("TextContour", Details.tooltip.fontcontour)
|
||||
|
||||
GameCooltip:SetOption("LeftBorderSize", -0) --offset between the left border and the left icon, default: 10 + offset
|
||||
GameCooltip:SetOption("RightBorderSize", 0) --offset between the right border and the right icon, default: -10 + offset
|
||||
GameCooltip:SetOption("VerticalOffset", 5) --amount of space to leave between the top border and the first line of the tooltip, default: 0
|
||||
GameCooltip:SetOption("LeftBorderSize", -4) --offset between the left border and the left icon, default: 10 + offset
|
||||
GameCooltip:SetOption("RightBorderSize", 4) --offset between the right border and the right icon, default: -10 + offset
|
||||
GameCooltip:SetOption("TopBorderSize", -1) --offset between the right border and the right icon, default: -10 + offset
|
||||
|
||||
GameCooltip:SetOption("VerticalOffset", 5) --amount of space to offset each line from each other, default: 0, higher values = less space between
|
||||
GameCooltip:SetOption("RightTextMargin", 0) --offset between the right text to the right icon, default: -3
|
||||
GameCooltip:SetOption("AlignAsBlizzTooltip", false)
|
||||
GameCooltip:SetOption("LineHeightSizeOffset", 4)
|
||||
GameCooltip:SetOption("VerticalPadding", -4)
|
||||
GameCooltip:SetOption("YSpacingMod", -6)
|
||||
GameCooltip:SetOption("TooltipFrameHeightOffset", -6)
|
||||
--IgnoreButtonAutoHeight is true
|
||||
|
||||
GameCooltip:SetBackdrop(1, Details.cooltip_preset2_backdrop, bgColor, borderColor)
|
||||
--GameCooltip:SetBackdrop(1, Details.cooltip_preset2_backdrop, bgColor, borderColor)
|
||||
GameCooltip:SetBackdrop(1, backdrop, {1, 1, 1, 1}, borderColor)
|
||||
end
|
||||
|
||||
function Details:BuildInstanceBarTooltip(frame)
|
||||
@@ -1375,13 +1382,22 @@
|
||||
Details:FormatCooltipForSpells()
|
||||
GameCooltip:SetOption("MinWidth", max(230, self.baseframe:GetWidth()*0.98))
|
||||
|
||||
if (frame.GetActor) then
|
||||
local actor = frame:GetActor()
|
||||
if (actor) then
|
||||
local class = actor:Class()
|
||||
local classColor = RAID_CLASS_COLORS[class]
|
||||
GameCooltip:SetBackdrop(1, backdrop, classColor, borderColor)
|
||||
GameCooltip:SetColor(1, 0, 0, 0, 0.7)
|
||||
end
|
||||
end
|
||||
|
||||
local myPoint = Details.tooltip.anchor_point
|
||||
local anchorPoint = Details.tooltip.anchor_relative
|
||||
local x_Offset = Details.tooltip.anchor_offset[1]
|
||||
local y_Offset = Details.tooltip.anchor_offset[2]
|
||||
|
||||
if (Details.tooltip.anchored_to == 1) then
|
||||
|
||||
GameCooltip:SetHost(frame, myPoint, anchorPoint, x_Offset, y_Offset)
|
||||
else
|
||||
GameCooltip:SetHost(DetailsTooltipAnchor, myPoint, anchorPoint, x_Offset, y_Offset)
|
||||
@@ -1445,7 +1461,25 @@
|
||||
end
|
||||
|
||||
Details:AddRoundedCornerToTooltip()
|
||||
|
||||
GameCooltip:ShowCooltip()
|
||||
|
||||
if (not Details.GameCooltipFrame1Shadow) then
|
||||
Details.GameCooltipFrame1Shadow = GameCooltipFrame1:CreateTexture(nil, "background")
|
||||
Details.GameCooltipFrame1Shadow:SetTexture([[Interface\AddOns\Details\images\shadow_square.png]], nil, nil, "TRILINEAR")
|
||||
local offset = 4
|
||||
Details.GameCooltipFrame1Shadow:SetPoint("topleft", GameCooltipFrame1, "topleft", -offset, offset)
|
||||
Details.GameCooltipFrame1Shadow:SetPoint("bottomright", GameCooltipFrame1, "bottomright", offset, -offset)
|
||||
GameCooltipFrame1:HookScript("OnHide", function(self)
|
||||
Details.GameCooltipFrame1Shadow:Hide()
|
||||
end)
|
||||
end
|
||||
|
||||
if (Details.tooltip.show_border_shadow) then
|
||||
Details.GameCooltipFrame1Shadow:Show()
|
||||
else
|
||||
Details.GameCooltipFrame1Shadow:Hide()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
|
||||
--old small window for the end of mythic plus runs
|
||||
|
||||
if (false and Details222.MythicPlus.Level and Details222.MythicPlus.Level < 28 and not Details.user_is_patreon_supporter) then
|
||||
--create the panel
|
||||
if (not mythicDungeonFrames.ReadyFrame) then
|
||||
mythicDungeonFrames.ReadyFrame = CreateFrame("frame", "DetailsMythicDungeonReadyFrame", UIParent, "BackdropTemplate")
|
||||
local readyFrame = mythicDungeonFrames.ReadyFrame
|
||||
|
||||
local textColor = {1, 0.8196, 0, 1}
|
||||
local textSize = 11
|
||||
|
||||
local roundedCornerTemplate = {
|
||||
roundness = 6,
|
||||
color = {.1, .1, .1, 0.98},
|
||||
border_color = {.05, .05, .05, 0.834},
|
||||
}
|
||||
|
||||
detailsFramework:AddRoundedCornersToFrame(readyFrame, roundedCornerTemplate)
|
||||
|
||||
local titleLabel = DetailsFramework:CreateLabel(readyFrame, "Details! Mythic Run Completed!", 12, "yellow")
|
||||
titleLabel:SetPoint("top", readyFrame, "top", 0, -7)
|
||||
titleLabel.textcolor = textColor
|
||||
|
||||
local closeButton = detailsFramework:CreateCloseButton(readyFrame, "$parentCloseButton")
|
||||
closeButton:SetPoint("topright", readyFrame, "topright", -2, -2)
|
||||
closeButton:SetScale(1.4)
|
||||
closeButton:SetAlpha(0.823)
|
||||
|
||||
readyFrame:SetSize(255, 120)
|
||||
readyFrame:SetPoint("center", UIParent, "center", 300, 0)
|
||||
readyFrame:SetFrameStrata("LOW")
|
||||
readyFrame:EnableMouse(true)
|
||||
readyFrame:SetMovable(true)
|
||||
--DetailsFramework:ApplyStandardBackdrop(readyFrame)
|
||||
--DetailsFramework:CreateTitleBar (readyFrame, "Details! Mythic Run Completed!")
|
||||
|
||||
readyFrame:Hide()
|
||||
|
||||
--register to libwindow
|
||||
local LibWindow = LibStub("LibWindow-1.1")
|
||||
LibWindow.RegisterConfig(readyFrame, Details.mythic_plus.finished_run_frame)
|
||||
LibWindow.RestorePosition(readyFrame)
|
||||
LibWindow.MakeDraggable(readyFrame)
|
||||
LibWindow.SavePosition(readyFrame)
|
||||
|
||||
--show button
|
||||
---@type df_button
|
||||
readyFrame.ShowChartButton = DetailsFramework:CreateButton(readyFrame, function() mythicDungeonCharts.ShowChart(); readyFrame:Hide() end, 80, 20, "Show Damage Graphic")
|
||||
readyFrame.ShowChartButton:SetTemplate(DetailsFramework:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
readyFrame.ShowChartButton:SetPoint("topleft", readyFrame, "topleft", 5, -30)
|
||||
readyFrame.ShowChartButton:SetIcon([[Interface\AddOns\Details\images\icons2]], 16, 16, "overlay", {42/512, 75/512, 153/512, 187/512}, {.7, .7, .7, 1}, nil, 0, 0)
|
||||
readyFrame.ShowChartButton.textcolor = textColor
|
||||
|
||||
--disable feature check box (dont show this again)
|
||||
local on_switch_enable = function(self, _, value)
|
||||
Details.mythic_plus.show_damage_graphic = not value
|
||||
end
|
||||
|
||||
local notAgainSwitch, notAgainLabel = DetailsFramework:CreateSwitch(readyFrame, on_switch_enable, not Details.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, Loc ["STRING_MINITUTORIAL_BOOKMARK4"], DetailsFramework:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft")
|
||||
notAgainSwitch:ClearAllPoints()
|
||||
notAgainLabel:SetPoint("left", notAgainSwitch, "right", 2, 0)
|
||||
notAgainSwitch:SetPoint("bottomleft", readyFrame, "bottomleft", 5, 5)
|
||||
notAgainSwitch:SetAsCheckBox()
|
||||
notAgainLabel.textSize = textSize
|
||||
|
||||
local timeNotInCombatLabel = DetailsFramework:CreateLabel(readyFrame, "Time not in combat:", textSize, "orangered")
|
||||
timeNotInCombatLabel:SetPoint("bottomleft", notAgainSwitch, "topleft", 0, 7)
|
||||
local timeNotInCombatAmount = DetailsFramework:CreateLabel(readyFrame, "00:00", textSize, "orangered")
|
||||
timeNotInCombatAmount:SetPoint("left", timeNotInCombatLabel, "left", 130, 0)
|
||||
|
||||
local elapsedTimeLabel = DetailsFramework:CreateLabel(readyFrame, "Run Time:", textSize, textColor)
|
||||
elapsedTimeLabel:SetPoint("bottomleft", timeNotInCombatLabel, "topleft", 0, 5)
|
||||
local elapsedTimeAmount = DetailsFramework:CreateLabel(readyFrame, "00:00", textSize, textColor)
|
||||
elapsedTimeAmount:SetPoint("left", elapsedTimeLabel, "left", 130, 0)
|
||||
|
||||
readyFrame.TimeNotInCombatAmountLabel = timeNotInCombatAmount
|
||||
readyFrame.ElapsedTimeAmountLabel = elapsedTimeAmount
|
||||
end
|
||||
|
||||
mythicDungeonFrames.ReadyFrame:Show()
|
||||
|
||||
--update the run time and time not in combat
|
||||
local elapsedTime = Details222.MythicPlus.time or 1507
|
||||
mythicDungeonFrames.ReadyFrame.ElapsedTimeAmountLabel.text = DetailsFramework:IntegerToTimer(elapsedTime)
|
||||
|
||||
local overallMythicDungeonCombat = Details:GetCurrentCombat()
|
||||
if (overallMythicDungeonCombat:GetCombatType() == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL) then
|
||||
local combatTime = overallMythicDungeonCombat:GetCombatTime()
|
||||
local notInCombat = elapsedTime - combatTime
|
||||
mythicDungeonFrames.ReadyFrame.TimeNotInCombatAmountLabel.text = DetailsFramework:IntegerToTimer(notInCombat) .. " (" .. math.floor(notInCombat / elapsedTime * 100) .. "%)"
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
@@ -943,6 +943,8 @@ local default_profile = {
|
||||
|
||||
--height used on tooltips at displays such as damage taken by spell
|
||||
line_height = 17,
|
||||
|
||||
show_border_shadow = true, --from spell tooltips from the main window
|
||||
},
|
||||
|
||||
--new window system
|
||||
@@ -1451,7 +1453,7 @@ local default_global_data = {
|
||||
last_mythicrun_chart = {},
|
||||
mythicrun_chart_frame = {},
|
||||
mythicrun_chart_frame_minimized = {},
|
||||
finished_run_frame = {},
|
||||
finished_run_panel = {}, --save window position
|
||||
finished_run_frame_options = {
|
||||
orientation = "horizontal",
|
||||
grow_direction = "left",
|
||||
@@ -1861,7 +1863,7 @@ function Details:ImportProfile (profileString, newProfileName, bImportAutoRunCod
|
||||
mythicPlusSettings.last_mythicrun_chart = {}
|
||||
mythicPlusSettings.mythicrun_chart_frame = {}
|
||||
mythicPlusSettings.mythicrun_chart_frame_minimized = {}
|
||||
mythicPlusSettings.finished_run_frame = {}
|
||||
mythicPlusSettings.finished_run_panel = {}
|
||||
|
||||
--make the max amount of segments be 25
|
||||
Details.segments_amount = 25
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
Reference in New Issue
Block a user