From ff11813d5e80d5769586ffe663909e49ff0de194 Mon Sep 17 00:00:00 2001 From: Zol Date: Sun, 1 Feb 2026 23:23:10 +0100 Subject: [PATCH] add rotation assist highlighting on CDM and action bars, as well as a dedicated rotation assist icon --- Localization/enUS.lua | 36 ++ Modules/uCDM/uCDM.lua | 44 ++ Modules/uCDM/uCDM.xml | 5 +- Modules/uCDM/uCDM_Options.lua | 634 +++++++++++++++++++- Modules/uCDM/uCDM_RotationAssist.lua | 861 +++++++++++++++++++++++++++ 5 files changed, 1578 insertions(+), 2 deletions(-) create mode 100644 Modules/uCDM/uCDM_RotationAssist.lua diff --git a/Localization/enUS.lua b/Localization/enUS.lua index ba3aadc..0848db2 100644 --- a/Localization/enUS.lua +++ b/Localization/enUS.lua @@ -387,3 +387,39 @@ L["INDEX"] = "Index" L["DISPLAY_ORDER_DESC"] = "Display order (lower = earlier)" L["VIEWER"] = "Viewer" L["ASSIGN_ENTRY_TO_VIEWER_DESC"] = "Assign entry to viewer" + +L["ROTATION_ASSIST"] = "Rotation Assist" +L["ROTATION_ASSIST_DESC"] = "Highlight the next recommended ability using Blizzard's Assisted Combat system" +L["CDM_HIGHLIGHT"] = "CDM Highlight" +L["CDM_HIGHLIGHT_DESC"] = "Show a colored border on CDM icons matching the next recommended spell" +L["ACTION_BAR_HIGHLIGHT"] = "Action Bar Highlight" +L["ACTION_BAR_HIGHLIGHT_DESC"] = "Show a colored border on action bar buttons matching the next recommended spell" +L["ROTATION_ASSIST_BUTTON"] = "Rotation Assist Button" +L["ROTATION_ASSIST_BUTTON_DESC"] = "Show a standalone icon displaying the next recommended spell" +L["HIGHLIGHT_COLOR"] = "Highlight Color" +L["HIGHLIGHT_COLOR_DESC"] = "Color of the rotation assist highlight border" +L["HIGHLIGHT_THICKNESS"] = "Highlight Thickness" +L["HIGHLIGHT_THICKNESS_DESC"] = "Thickness of the highlight border in pixels" +L["VISIBILITY_MODE"] = "Visibility" +L["VISIBILITY_MODE_DESC"] = "When to show the rotation assist button" +L["VISIBILITY_ALWAYS"] = "Always" +L["VISIBILITY_COMBAT"] = "In Combat" +L["VISIBILITY_HOSTILE"] = "Hostile Target" +L["LOCK_POSITION"] = "Lock Position" +L["LOCK_POSITION_DESC"] = "Lock the button position (unlock to drag)" +L["BUTTON_SIZE"] = "Button Size" +L["BUTTON_SIZE_DESC"] = "Size of the rotation assist button" +L["FRAME_STRATA"] = "Frame Strata" +L["FRAME_STRATA_DESC"] = "Frame stacking layer" +L["SHOW_BORDER"] = "Show Border" +L["SHOW_BORDER_DESC"] = "Show a border around the button" +L["SHOW_GCD_SWIPE"] = "Show GCD Swipe" +L["SHOW_GCD_SWIPE_DESC"] = "Show global cooldown animation on the button" +L["SHOW_KEYBIND"] = "Show Keybind" +L["SHOW_KEYBIND_DESC"] = "Show the spell's keybind on the button" +L["HIGHLIGHT_STYLE"] = "Highlight Style" +L["HIGHLIGHT_STYLE_DESC"] = "How the highlighted icon is displayed" +L["STYLE_BORDER"] = "Border" +L["STYLE_GLOW"] = "Glow" +L["RESET_POSITION"] = "Reset Position" +L["RESET_POSITION_DESC"] = "Reset button position to default" diff --git a/Modules/uCDM/uCDM.lua b/Modules/uCDM/uCDM.lua index 58a9d81..7d9a06c 100644 --- a/Modules/uCDM/uCDM.lua +++ b/Modules/uCDM/uCDM.lua @@ -192,6 +192,49 @@ local defaults = { }, }, }, + rotationAssist = { + cdmHighlight = { + essential = { + enabled = false, + color = {r = 0, g = 1, b = 0.84, a = 0.8}, + thickness = 2, + style = "border", + }, + utility = { + enabled = false, + color = {r = 0, g = 1, b = 0.84, a = 0.8}, + thickness = 2, + style = "border", + }, + }, + actionBarHighlight = { + enabled = false, + color = {r = 0, g = 1, b = 0.84, a = 0.8}, + thickness = 2, + style = "border", + }, + button = { + enabled = false, + isLocked = true, + iconSize = 56, + visibility = "always", + frameStrata = "MEDIUM", + showBorder = true, + borderThickness = 2, + borderColor = {r = 0, g = 0, b = 0, a = 1}, + cooldownSwipeEnabled = true, + showKeybind = true, + keybindSize = 13, + keybindColor = {r = 1, g = 1, b = 1, a = 1}, + keybindPoint = "BOTTOMRIGHT", + keybindOffsetX = -2, + keybindOffsetY = 2, + anchorFrom = "CENTER", + anchorTo = "CENTER", + offsetX = 0, + offsetY = -180, + }, + }, customEntries = {}, positions = {}, } @@ -208,6 +251,7 @@ function module:OnInitialize() if self.LayoutEngine then self.LayoutEngine.Initialize() end if self.Keybinds then self.Keybinds.Initialize() end if self.Anchoring then self.Anchoring.Initialize() end + if self.RotationAssist then self.RotationAssist.Initialize() end -- Register events self:RegisterEvent("PLAYER_EQUIPMENT_CHANGED", "OnEquipmentChanged") diff --git a/Modules/uCDM/uCDM.xml b/Modules/uCDM/uCDM.xml index 55b12a6..a64166c 100644 --- a/Modules/uCDM/uCDM.xml +++ b/Modules/uCDM/uCDM.xml @@ -15,7 +15,10 @@