Files
OEVGandClaude Opus 5.5 2c58ce2aa3 Merge the ShaguTweaks Extras ClassicAPI modules into ShaguTweaks (3.7)
Bring in 27 module files from Dusk/ShaguTweaks-Extras-ClassicAPI
(8e14bb4): action bar, chat, loot, macro, merchant (Buy Em All),
minimap & world map, tooltip and unit frame modules, with their
textures. Titles are unchanged, so saved toggles carry over.

- Categories: Chat -> Chat & Social, World Map -> Minimap & World Map,
  Merchant & Auction -> Merchant; Macro is a new category.
- Texture paths point at ShaguTweaks\img.
- Not merged: Raid Frames, Bag Item Click and Bag Search Bar (Bagshui
  covers them), Auction Alt-Buy (aux covers it).
- Chat note when the old ShaguTweaks-extras addon is still enabled.
- English translation keys, notices, license copy, asset provenance,
  README, changelog and version 3.7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwusM4i1CYaHQAYixJ7
2026-11-02 21:52:53 +00:00

46 lines
1.5 KiB
Lua
Executable File

local _G = ShaguTweaks.GetGlobalEnv()
local T = ShaguTweaks.T
local hooksecurefunc = ShaguTweaks.hooksecurefunc
local module = ShaguTweaks:register({
title = T["Center Text Input Box"],
description = T["Move the chat input box to the center of the screen."],
expansions = { ["vanilla"] = true, ["tbc"] = false },
category = T["Chat & Social"],
maintainer = "@shagu (GitHub)",
enabled = nil,
})
local dodge_frames = {
MainMenuBarArtFrame, MultiBarBottomLeft, MultiBarBottomRight, PetActionBarFrame, ShapeshiftBarFrame
}
module.enable = function(self)
ChatFrameEditBox:SetWidth(300)
local function UpdateInputPosition()
local top = 0
for _, frame in ipairs(dodge_frames) do
if frame and frame:IsVisible() and frame:GetTop() then
top = math.max(top, frame:GetTop())
end
end
ChatFrameEditBox:ClearAllPoints()
ChatFrameEditBox:SetPoint("BOTTOM", UIParent, "BOTTOM", 0, top)
end
-- Other ShaguTweaks modules also post-hook UIParent_ManageFramePositions.
-- Module enable order is intentionally unordered, so install this layout
-- hook at PLAYER_ENTERING_WORLD after the normal module pass. This makes
-- the edit box position use the final actionbar/pet/stance positions.
local installer = CreateFrame("Frame", nil, UIParent)
installer:RegisterEvent("PLAYER_ENTERING_WORLD")
installer:SetScript("OnEvent", function()
hooksecurefunc("UIParent_ManageFramePositions", UpdateInputPosition)
UpdateInputPosition()
this:UnregisterAllEvents()
this:Hide()
end)
end