From 0638f7eb3f4cd594694fc5ab250aa34335de58da Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Thu, 30 Jul 2026 11:25:59 +0200 Subject: [PATCH] Add files via upload --- mods/actionbar-range-color.lua | 31 +++++++++++++++++++++++++++++++ mods/cooldown-numbers.lua | 1 + mods/hide-gryphons.lua | 1 + mods/no-toggle.lua | 2 +- mods/reduced-actionbar.lua | 1 + mods/xpbar-text.lua | 2 +- 6 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 mods/actionbar-range-color.lua diff --git a/mods/actionbar-range-color.lua b/mods/actionbar-range-color.lua new file mode 100644 index 0000000..210dbc0 --- /dev/null +++ b/mods/actionbar-range-color.lua @@ -0,0 +1,31 @@ +local _G = ShaguTweaks.GetGlobalEnv() +local T = ShaguTweaks.T +local hooksecurefunc = ShaguTweaks.hooksecurefunc + +local module = ShaguTweaks:register({ + title = T["Range Color"], + description = T["Action buttons will be colored red when out of range."], + expansions = { ["vanilla"] = true, ["tbc"] = nil }, + category = T["Action Bar"], + enabled = nil, +}) + +module.enable = function(self) + hooksecurefunc("ActionButton_OnUpdate", function(elapsed) + -- Button color based on range + if ( this.rangeTimer ) then + this.rangeTimer = this.rangeTimer - elapsed + if ( this.rangeTimer <= 0.2 ) then -- 0.1 + if ( IsActionInRange( ActionButton_GetPagedID(this)) == 0 ) then + if not this.a then + this.r,this.g,this.b,this.a = 1,.1,.1,1 -- out of range colour + end + _G[this:GetName() .. 'Icon']:SetVertexColor(this.r, this.g, this.b, this.a) + elseif IsUsableAction(ActionButton_GetPagedID(this)) then + _G[this:GetName() .. 'Icon']:SetVertexColor(1, 1, 1, 1) + end + this.rangeTimer = TOOLTIP_UPDATE_TIME + end + end + end, true) +end diff --git a/mods/cooldown-numbers.lua b/mods/cooldown-numbers.lua index 62893a4..f3f3609 100644 --- a/mods/cooldown-numbers.lua +++ b/mods/cooldown-numbers.lua @@ -9,6 +9,7 @@ local module = ShaguTweaks:register({ title = T["Cooldown Numbers"], description = T["Display the remaining duration as text on every cooldown."], expansions = { ["vanilla"] = true, ["tbc"] = true }, + category = T["Action Bar"], enabled = true, color = { r = .3, g = .3, b = .3, a = .9} }) diff --git a/mods/hide-gryphons.lua b/mods/hide-gryphons.lua index cc55e01..aeb269e 100644 --- a/mods/hide-gryphons.lua +++ b/mods/hide-gryphons.lua @@ -5,6 +5,7 @@ local module = ShaguTweaks:register({ title = T["Hide Gryphons"], description = T["Hides the gryphons left and right of the action bar."], expansions = { ["vanilla"] = true, ["tbc"] = true }, + category = T["Action Bar"], enabled = nil, }) diff --git a/mods/no-toggle.lua b/mods/no-toggle.lua index f5100ce..73f292c 100644 --- a/mods/no-toggle.lua +++ b/mods/no-toggle.lua @@ -5,7 +5,7 @@ local module = ShaguTweaks:register({ title = T["No Toggle Auto-Attack"], description = T["Keeps Auto Attack, Auto Shot, and Shoot active when re-pressed, preventing accidental cancellation."], expansions = { ["vanilla"] = true, ["tbc"] = true }, - category = T["General"], + category = T["Action Bar"], enabled = true, order = 12, }) diff --git a/mods/reduced-actionbar.lua b/mods/reduced-actionbar.lua index a3f2196..9357613 100644 --- a/mods/reduced-actionbar.lua +++ b/mods/reduced-actionbar.lua @@ -6,6 +6,7 @@ local module = ShaguTweaks:register({ title = T["Reduced Actionbar Size"], description = T["Reduces the actionbar size by removing several items such as the bag panel and microbar"], expansions = { ["vanilla"] = true, ["tbc"] = nil }, + category = T["Action Bar"], enabled = nil, }) diff --git a/mods/xpbar-text.lua b/mods/xpbar-text.lua index 723b960..36bfd0b 100644 --- a/mods/xpbar-text.lua +++ b/mods/xpbar-text.lua @@ -5,7 +5,7 @@ local module = ShaguTweaks:register({ title = T["XP Bar Text"], description = T["Always shows current XP and rested bonus percentage directly on the experience bar."], expansions = { ["vanilla"] = true, ["tbc"] = true }, - category = T["General"], + category = T["Action Bar"], enabled = true, order = 70, })