diff Libs/DF/dropdown.xml @ 11:2f09fe4be15c

Added an Options Panel.
author Tercio
date Mon, 20 Apr 2015 16:34:18 -0300
parents
children 680465749fc7
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Libs/DF/dropdown.xml	Mon Apr 20 16:34:18 2015 -0300
@@ -0,0 +1,241 @@
+<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 bgFile="Interface\AddOns\Details\images\background" edgeFile="Interface\AddOns\Details\images\border_3" tile="true">
+					<EdgeSize>
+						<AbsValue val="16"/>
+					</EdgeSize>
+					<TileSize>
+						<AbsValue val="256"/>
+					</TileSize>
+					<BackgroundInsets>
+						<AbsInset left="4" right="4" top="4" bottom="5"/>
+					</BackgroundInsets>
+				</Backdrop>
+				
+				<Scripts>
+					<OnHide>
+						DetailsDropDownOptionsFrameOnHide (self);
+					</OnHide>
+					<OnLoad>
+						self:SetBackdropColor (0, 0, 0, 0.95);
+					</OnLoad>
+				</Scripts>
+				
+			</Frame>	
+			
+			<ScrollFrame name="$Parent_ScrollFrame" parentKey="dropdownframe" hidden="true" frameStrata="FULLSCREEN">
+				<Size x="150" y="150"/>
+				<Anchors>
+					<Anchor point="TOPLEFT" relativeTo="$Parent" relativePoint="BOTTOMLEFT" x="0" y="-10" />
+				</Anchors>
+				
+				<ScrollChild>
+					<Frame name="$Parent_ScrollChild" frameStrata="DIALOG" parentKey="scrollchild">
+					
+						<Size x="150" y="150"/>
+						
+						<Anchors>
+							<Anchor point="TOPLEFT" relativeTo="$Parent" relativePoint="TOPLEFT" x="0" y="0" />
+						</Anchors>
+						
+						<Layers>
+							<Layer level="BACKGROUND">
+								<!-- selected texture -->
+								<Texture name="$parent_SelectedTexture" parentKey="selected" hidden="true" file="Interface\AddOns\Details\framework\cooltip_background">
+									<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>
+			<OnMouseDown>
+				DetailsFrameworkDropDownOptionClick (self);
+			</OnMouseDown>
+			
+			<OnEnter>
+				DetailsFrameworkDropDownOptionOnEnter (self);
+			</OnEnter>
+			
+			<OnLeave>
+				DetailsFrameworkDropDownOptionOnLeave (self);
+			</OnLeave>
+
+		</Scripts>
+	
+	</Button>
+
+</Ui>
+