WoWInterface

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

Vex 10-14-05 11:20 PM

SetScale() ?
 
Code:

<Frame name="DiscordMiniDropDown" inherits="UIDropDownMenuTemplate" hidden="true" toplevel="true">
        <Size>
        <AbsDimension x="120" y="-60"/>
        </Size>
        <Anchors>
        <Anchor point="BOTTOMRIGHT" relativeto="DiscordMini_Button">
        <Offset>
        <AbsDimension x="-80" y="0"/>
        </Offset>
        </Anchor>
        </Anchors>
        <Scripts>
        <OnLoad>
        DiscordMiniDropDown:SetScale(0.7);
        DiscordMiniDropDown_OnLoad();
        </OnLoad>
        </Scripts>
</Frame>

its not shrinking my dropdownmenu

Also, i have it set to inherit "UIDropDownMenuTemplate"... how can i change the font used?

i tried adding a <FontString> bit, and i tried setting font="...." within the <Frame> but nothing's working :x

Gello 10-15-05 12:47 AM

UIDropDownMenuTemplate is in UIDropDownMenu.xml. Layers and frames can be larger than their parent frame's size. When you set a <Size> and then put inherited controls ontop of that frame, it will use the size tags in the inherited control.

Also I think for dropdowns, the UI adjusts the width for its content? Not certain since I never use them.

A single Dropdown menu is shared across the entire UI, so if you do alter its font it will likely stay altered for all other mods. You've done a lot of work in it already but one thing I'd suggest is perhaps making your own dropdown without inheriting one. If there's only a handful of options that don't change as the mod is used, it's simply a matter of making a frame with buttons inside. Then you can have greater control of size, font, etc.

Vex 10-15-05 05:24 AM

I tried duplicating the UIDropDownMenuTemplate code from the base FrameXML, but when i rename it, i get some weird error from titanutils ( ya i know wtf ) saying something like 'MyNameDropDownMenuTemplateDrop1" or something...


All times are GMT -6. The time now is 03:25 PM.

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