Skip to content

[feat] Skin main window via ElvUI when loaded#446

Open
bootinup wants to merge 1 commit into
BreakBB:masterfrom
bootinup:feat/elvui-skinning
Open

[feat] Skin main window via ElvUI when loaded#446
bootinup wants to merge 1 commit into
BreakBB:masterfrom
bootinup:feat/elvui-skinning

Conversation

@bootinup
Copy link
Copy Markdown

Summary

Adds opt-in ElvUI skinning to the ECS main window. When ElvUI is loaded, the block calls into E:GetModule(\"Skins\") to restyle the frame; when ElvUI is absent, the block is a no-op and ECS looks exactly as it does today.

Specifically, in Modules/Stats.lua after the main frame is built:

  • S:HandleFrame(mainFrame) — applies ElvUI's frame template
  • Repositions CloseButton, title (with E.media.normFont), and configButton so they sit correctly inside the skinned frame
  • S:HandleButton on configButton and toggleButton
  • S:HandleScrollBar on mainFrame.ScrollFrame.ScrollBar
  • Adjusts ScrollFrame anchors so the content area lines up with the skinned border

The whole block is guarded by if ElvUI then ... if S then ... end end, so users without ElvUI (or with the Skins module disabled) are unaffected.

Testing

  • Tested on TBC Classic Anniversary with ElvUI loaded — main window, config button, toggle button, and scrollbar all render with the ElvUI theme; layout matches the unskinned version.
  • Tested without ElvUI on the same client — no regressions, the guard short-circuits cleanly.

I have not personally tested on Classic Era, Wrath Classic, or Retail, but the APIs used (HandleFrame, HandleButton, HandleScrollBar) are present in all ElvUI variants and the code is not gated on WOW_PROJECT_ID, so it should behave the same anywhere ECS loads.

Test plan

  • Load ECS + ElvUI on TBC Anniversary, open the ECS window, confirm skinned appearance
  • Load ECS without ElvUI, confirm unchanged appearance
  • (Optional) Smoke test on Classic Era / Wrath / Retail with ElvUI

@bootinup
Copy link
Copy Markdown
Author

Here's what the window looks like with the skinning enabled (TBC Anniversary):

ECS with ElvUI skinning enabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant