WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   FauxScrollFrameTemplate source code (https://www.wowinterface.com/forums/showthread.php?t=59547)

Benalish 04-01-23 05:31 PM

FauxScrollFrameTemplate source code
 
Hello. Where I can find FauxScrollFrameTemplate source code? I'd like to know which the Button Up and Button Down textures are, and if there is a way to know all the WoW UI textures.

Can you help me?

Fizzlemizz 04-01-23 06:16 PM

Export all the UI code and textures for your viewing pleasure.

For the scroll button textures,
Code:

UP = {
        Normal = "Interface\\Buttons\\UI-ScrollBar-ScrollUpButton-Up",
        Pushed = "Interface\\Buttons\\UI-ScrollBar-ScrollUpButton-Down",
        Disabled = "Interface\\Buttons\\UI-ScrollBar-ScrollUpButton-Disabled",
        Highlight = "Interface\\Buttons\\UI-ScrollBar-ScrollUpButton-Highlight",
},
DOWN = {
        Normal = "Interface\\Buttons\\UI-ScrollBar-ScrollDownButton-Up",
        Pushed = "Interface\\Buttons\\UI-ScrollBar-ScrollDownButton-Down",
        Disabled = "Interface\\Buttons\\UI-ScrollBar-ScrollDownButton-Disabled",
        Highlight = "Interface\\Buttons\\UI-ScrollBar-ScrollDownButton-Highlight",
},


Benalish 04-02-23 08:18 AM

Very well! I extrated the BlizzardInterfaceCode. Now, where I can find the FauxScrollFrameTemplate related file?

Fizzlemizz 04-02-23 08:53 AM

Find a search tool and look for
Code:

name="FauxScrollFrameTemplate
or Interface\SharedXML\SecureUIPanelTemplates.xml and SecureUIPanelTemplates.lua

But it inherits other templates that interhit other templates ... so it's a bit of a hunt to bring it all together (like many things in the Blizzard UI)

Benalish 04-03-23 04:02 AM

I'm so interested in the FauxScrollFrame because I'm trying to set borders on the two buttons, but with disastrous results



Code:

<ScrollFrame name="$parentScrollBar" parentKey="scroll" inherits="FauxScrollFrameTemplate" hidden="false">
        <Anchors>
                <Anchor point="TOPLEFT" x="0" y="-8"/>
                <Anchor point="BOTTOMRIGHT" x="-25" y="0"/>
        </Anchors>
        <Scripts>
                <OnLoad>
                    local backdrop = {
                    edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
                    tile = true,
                    tileSize = 8,
                    edgeSize = 16,
                    insets = {
                        left = 3,
                        right = 3,
                        top = 3,
                        bottom = 3
                        }
                    }
                    _G[self:GetName().."ScrollBarScrollUpButton"]:SetBackdrop(backdrop)
                </OnLoad>
                <OnVerticalScroll>
                    FauxScrollFrame_OnVerticalScroll(self, offset, 16, self:Update())
                </OnVerticalScroll>
        </Scripts>
</ScrollFrame>


Fizzlemizz 04-03-23 09:17 AM

I don't think it will achieve exactly what you want, which would probably require custom textures, but something l ike:
Code:

local backdrop = {
        edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
        edgeSize = 3,
        insets = {
                left = 0,
                right = 0,
                top = 0,
                bottom = 0,
        }
}
_G[self:GetName().."ScrollBarScrollUpButton"]:SetBackdrop(backdrop)
_G[self:GetName().."ScrollBarScrollUpButton"]:GetNormalTexture():SetTexCoord(-0.0015, 1.0015, -0.0015, 1.0015)
_G[self:GetName().."ScrollBarScrollUpButton"]:GetPushedTexture():SetTexCoord(-0.0015, 1.0015, -0.0015, 1.0015)
_G[self:GetName().."ScrollBarScrollUpButton"]:GetDisabledTexture():SetTexCoord(-0.0015, 1.0015, -0.0015, 1.0015)
_G[self:GetName().."ScrollBarScrollUpButton"]:GetHighlightTexture():SetTexCoord(-0.0015, 1.0015, -0.0015, 1.0015)


Benalish 04-08-23 02:49 PM

This is the result for the ButtonUp:



As you can see, there is a huge margin between the button and the edges. as you can see, there is a huge margin between the button and the edges. The frame has been scaled by a factor of 3 for better display

Fizzlemizz 04-08-23 03:01 PM

The reason for the "I don't think it will achieve exactly what you want, which would probably require custom textures" quote.

You might get slightly better by fiddling with the coords/edgesize etc. but, the Backdrop borders take up edge space, the beveled corners require it be more than just the border line width. You could export the FauxScroll button textures and resize the image/add a border and use those instead.

You could maybe add seperate "border" textures to the buttons.


All times are GMT -6. The time now is 05:39 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI