view Libs/DF/dropdown.xml @ 42:e0a8f43009ea

- toc and framework update.
author Tercio
date Tue, 25 Oct 2016 16:38:32 -0200
parents a960d5372b0c
children
line wrap: on
line source
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ .. \FrameXML\UI.xsd">
	<Script file="dropdown.lua"/>
	
	<Button  name="DetailsFrameworkDropDownTemplate" virtual="true">
		<Size x="150" y="20"/>
		
		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
			<EdgeSize>
				<AbsValue val="10"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="16"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="1" right="1" top="0" bottom="1"/>
			</BackgroundInsets>
		</Backdrop>
		
		<Layers>
		
			<Layer level="BACKGROUND">
				<!-- statusbar texture -->
				<Texture name="$parent_StatusBarTexture" parentKey="statusbar">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT" x="3" y="-3"/>
						<Anchor point="BOTTOMRIGHT" relativeTo="$parent" relativePoint="BOTTOMRIGHT" x="-3" y="3"/>
					</Anchors>
				</Texture>
			</Layer>
			
			<Layer level="ARTWORK">
				<!-- icon texture -->
				<Texture name="$parent_IconTexture" parentKey="icon" file = "Interface\COMMON\UI-ModelControlPanel">
					<Color r="1" g="1" b="1" a="0.4"/>
					<TexCoords left="0.625" right="0.78125" top="0.328125" bottom="0.390625"/>
					<Size x="20" y="20" />
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT" x="2" y="0"/>
					</Anchors>
				</Texture>
				<!-- text -->
				<FontString name="$parent_Text" parentKey="text" inherits="GameFontHighlightSmall" justifyH="LEFT" nonspacewrap="true" text="no option selected">
					<Color r="1" g="1" b="1" a="0.4"/>
					<FontHeight val="10.5"/>
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parent_IconTexture" relativePoint="RIGHT" x="5" y="0"/>
					</Anchors>
				</FontString>

				<!-- <Texture name="$parent_ArrowTextureDisabled" parentKey="textureDisabled" file = "Interface\Buttons\UI-ScrollBar-UI-ScrollBar-ScrollDownButton-Disabled">
					<Size x="32" y="32" />
				</Texture> -->
			</Layer>
		
			<Layer level="OVERLAY">
				<Texture name="$parent_ArrowTexture2" alphaMode="ADD" parentKey="arrowTexture2" file = "Interface\Buttons\UI-ScrollBar-ScrollDownButton-Highlight" hidden="true">
					<Size x="32" y="28"/>
					<Anchors>
						<Anchor point="RIGHT" relativeTo="$parent" relativePoint="RIGHT" x="5" y="-1"/>
					</Anchors>
				</Texture>
				<!-- button textures -->
				<Texture name="$parent_ArrowTexture" parentKey="arrowTexture" file = "Interface\Buttons\UI-ScrollBar-ScrollDownButton-Up">
					<Size x="32" y="28"/>
					<Anchors>
						<Anchor point="RIGHT" relativeTo="$parent" relativePoint="RIGHT" x="5" y="-1"/>
					</Anchors>
				</Texture>
			</Layer>
		
		</Layers>
	
		<Frames>

			<Frame name="$Parent_Border" parentKey="dropdownborder" hidden="true" frameStrata="FULLSCREEN">
				<Size x="150" y="170"/>
				
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$Parent" relativePoint="BOTTOMLEFT"/>
				</Anchors>
				
				<Backdrop edgeFile="Interface\Buttons\WHITE8X8">
					<EdgeSize>
						<AbsValue val="1"/>
					</EdgeSize>
					<BackgroundInsets>
						<AbsInset left="0" right="0" top="0" bottom="0"/>
					</BackgroundInsets>
				</Backdrop>
				
				<Scripts>
					<OnHide>
						DetailsFrameworkDropDownOptionsFrameOnHide (self);
					</OnHide>
					<OnLoad>
						self:SetBackdropColor (0, 0, 0, 0.92);
						self:SetBackdropBorderColor (0, 0, 0, 1);
					</OnLoad>
				</Scripts>
				
			</Frame>	
			
			<ScrollFrame name="$Parent_ScrollFrame" parentKey="dropdownframe" hidden="true" frameStrata="FULLSCREEN">
				<Size x="150" y="170"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$Parent" relativePoint="BOTTOMLEFT" x="0" y="-10" />
				</Anchors>
				
				<ScrollChild>
					<Frame name="$Parent_ScrollChild" frameStrata="FULLSCREEN" parentKey="scrollchild">
					
						<Size x="150" y="170"/>
						
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$Parent" relativePoint="TOPLEFT" x="0" y="0" />
						</Anchors>
						
						<Backdrop bgFile="Interface\FrameGeneral\UI-Background-Marble" tile="true">
							<TileSize>
								<AbsValue val="256"/>
							</TileSize>
							<BackgroundInsets>
								<AbsInset left="0" right="0" top="0" bottom="0"/>
							</BackgroundInsets>
						</Backdrop>
						
						<Layers>
							<Layer level="BACKGROUND">
								<!-- selected texture // we don't know where the file is it -->
								<Texture name="$parent_SelectedTexture" parentKey="selected" hidden="true" file="Interface\RAIDFRAME\Raid-Bar-Hp-Fill">
									<Size x="150" y="16" />
									<!--<TexCoords left="0.31250000" right="0.78515625" top="0.00390625" bottom="0.36328125"/>-->
									<Anchors>
										<Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT" x="2" y="0"/>
									</Anchors>
								</Texture>
							</Layer>
							
							<Layer level="ARTWORK">
								<!-- mouse over texture -->
								<Texture name="$parent_MouseOverTexture" alphaMode="ADD" parentKey="mouseover" hidden="true" file="Interface\Buttons\UI-Listbox-Highlight">
									<Size x="150" y="15" />
									<Anchors>
										<Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT" x="2" y="0"/>
									</Anchors>
								</Texture>
							</Layer>
						</Layers>
						
					</Frame>
					
				</ScrollChild>
				
			</ScrollFrame>

		</Frames>
	
		<Scripts>
		
			<OnLoad>
				self:SetBackdropColor (1, 1, 1, .5);
				self.arrowTexture:SetDrawLayer ("OVERLAY", 1);
				self.arrowTexture2:SetDrawLayer ("OVERLAY", 2);

				tinsert (UISpecialFrames, self.dropdownborder:GetName());
				tinsert (UISpecialFrames, self.dropdownframe:GetName());
			</OnLoad>
		
			<OnShow>
				<!--DetailsFrameworkDropDownOnShow (self);-->
			</OnShow>
			
			<OnHide>
				<!--DetailsFrameworkDropDownOnHide (self);-->
			</OnHide>
		
			<OnEnter>
				<!--DetailsFrameworkDropDownOnEnter (self);-->
			</OnEnter>
			
			<OnLeave>
				<!--DetailsFrameworkDropDownOnLeave (self);-->
			</OnLeave>
		
			<OnSizeChanged>
				DetailsFrameworkDropDownOnSizeChanged (self);
			</OnSizeChanged>
			
			<OnMouseDown>
				DetailsFrameworkDropDownOnMouseDown (self);
			</OnMouseDown>
		</Scripts>
	
	</Button>

	<Button  name="DetailsFrameworkDropDownOptionTemplate" virtual="true" frameStrata="TOOLTIP">
		<Size x="150" y="20" />
	
		<Layers>
		
			<Layer level="ARTWORK">
				<!-- statusbar texture -->
				<Texture name="$parent_StatusBarTexture" parentKey="statusbar">
					<Size x="150" y="20" />
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT" x="1" y="0"/>
						<Anchor point="RIGHT" relativeTo="$parent" relativePoint="RIGHT" x="-10" y="0"/>
					</Anchors>
				</Texture>
			</Layer>
			
			<Layer level="OVERLAY">
				<!-- icon texture -->
				<Texture name="$parent_IconTexture" parentKey="icon" file = "Interface\ICONS\Spell_ChargePositive">
					<Size x="20" y="20" />
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT" x="2" y="0"/>
					</Anchors>
				</Texture>
				<!-- text -->
				<FontString name="$parent_Text" parentKey="label" inherits="GameFontHighlightSmall" justifyH="LEFT" nonspacewrap="false">
					<FontHeight val="10.5"/>
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parent_IconTexture" relativePoint="RIGHT" x="5" y="0"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		
		<Scripts>
			<OnLoad>
				self:SetFrameStrata (self:GetParent():GetFrameStrata())
				self:SetFrameLevel (self:GetParent():GetFrameLevel()+10)
			</OnLoad>
			<OnMouseDown>
				DetailsFrameworkDropDownOptionClick (self);
			</OnMouseDown>
			
			<OnEnter>
				DetailsFrameworkDropDownOptionOnEnter (self);
			</OnEnter>
			
			<OnLeave>
				DetailsFrameworkDropDownOptionOnLeave (self);
			</OnLeave>

		</Scripts>
	
	</Button>

</Ui>