Thread Tools Display Modes
10-14-05, 11:20 PM   #1
Vex
Premium Member
 
Vex's Avatar
Join Date: Sep 2005
Posts: 41
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
  Reply With Quote
10-15-05, 12:47 AM   #2
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
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.
  Reply With Quote
10-15-05, 05:24 AM   #3
Vex
Premium Member
 
Vex's Avatar
Join Date: Sep 2005
Posts: 41
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...
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » SetScale() ?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off