BreakBB / ExtendedCharacterStats

Extended Character Stats: A WoW Classic addon
MIT License
7 stars 18 forks source link

ECS Window Positioning #324

Open Belden1 opened 1 month ago

Belden1 commented 1 month ago

Bug description

Tried to make window width bigger but it moves into the character frame

Screenshots

image

Version

v3.3.4 Classic Era

Code

On line 103 in Modules/Stats.lua, I did a "small hack", tried to do it elsewhere but nothing would work so this was my solution... I'm sure these values could be better or figure out why it grows inside instead of out, would be a good start... Funny thing is with this "hack", it grows out?

if ECS.IsSoD then
            C_Timer.After(0.3, function ()
                if EngravingFrame then
                    mainFrame:ClearAllPoints()
                    mainFrame:SetPoint("LEFT", EngravingFrame, "RIGHT", 10, 19)
                end
            end)
        else -- the hack
            C_Timer.After(0.3, function ()
                if PaperDollItemsFrame then
                    local __x = 2
                    local __y = 2
                    mainFrame:ClearAllPoints()
                    mainFrame:SetPoint("LEFT", PaperDollItemsFrame, "RIGHT", ecs.general.window.xOffset + __x, ecs.general.window.yOffset + __y)
                end
            end)
        end
    end)