diff HotCorners.xml @ 2:a6fb0ff113b1

- Added inventory items. - Added alpha animation.
author tercio
date Sat, 23 Aug 2014 18:56:28 -0300
parents fc346da3afd9
children be6f5d3e0a95
line wrap: on
line diff
--- a/HotCorners.xml	Sat Aug 09 17:28:04 2014 -0300
+++ b/HotCorners.xml	Sat Aug 23 18:56:28 2014 -0300
@@ -30,12 +30,31 @@
 
 		<Scripts>
 			<OnEnter>
-				HotCornersOnEnter (self);
+				<!-- HotCornersOnEnter (self); -->
 			</OnEnter>
 			<OnLeave>
 				HotCornersOnLeave (self);
 			</OnLeave>
 		</Scripts>
+		
+		<Frames>
+			<Frame name="$parentItemListFrame" frameStrata="FULLSCREEN" parentKey="item_frame" hidden="true" EnableMouse="true">
+				<Size x="100" y="40"/>
+				<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" tile="true">
+					<TileSize>
+						<AbsValue val="40"/>
+					</TileSize>
+					<BackgroundInsets>
+						<AbsInset left="0" right="0" top="0" bottom="0"/>
+					</BackgroundInsets>
+				</Backdrop>
+				<Anchors>
+					<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPRIGHT" x="0" y="0"/>
+					<Anchor point="TOPRIGHT" relativeTo="UIParent" relativePoint="TOPRIGHT" x="0" y="0"/>
+					<!--<Anchor point="CENTER" relativeTo="UIParent" relativePoint="CENTER" x="0" y="40"/>-->
+				</Anchors>
+			</Frame>
+		</Frames>
 	</Frame>
 	
 	<Frame name="HotCornersQuickCornerButtonTemplate" frameStrata="FULLSCREEN" virtual="true">
@@ -57,8 +76,96 @@
 		</Scripts>
 	</Frame>
 	
+	<Button name="HotCornersUseItemButtonTemplate" frameStrata="FULLSCREEN" hidden="true" virtual="true" inherits="SecureActionButtonTemplate">
+		<Size x="32" y="32"/>
+		
+		<Attributes>
+			<Attribute name="type" type="string" value="macro"/>
+		</Attributes>
+		
+		<Layers>
+			<Layer level="OVERLAY" textureSubLevel="1">
+				<Texture name="$parentBGItemCount" parentKey="bg_item_count">
+					<Size>
+						<AbsDimension x="20" y="12"/>
+					</Size>
+					<Color r="0" g="0" b="0" a=".5"/>
+					<Anchors>
+						<Anchor point="BOTTOMRIGHT" relativeTo="$parent" relativePoint="BOTTOMRIGHT" x="0" y="0"/>
+					</Anchors>
+				</Texture>
+			</Layer>
+			<Layer level="OVERLAY" textureSubLevel="2">
+				<FontString text="0" name="$parentItemCount" inherits="GameFontNormal" parentKey="item_count">
+					<Anchors>
+						<Anchor point="CENTER" relativeTo="$parentBGItemCount" relativePoint="CENTER" x="0" y="0"/>
+					</Anchors>
+					<Color r="1" g="1" b="1" a="1"/>
+				</FontString>
+			</Layer>
+		</Layers>
+		
+		<Animations>
+			<AnimationGroup name="$parentOnShow" parentKey="AnimOnShow" looping="NONE">
+				<!-- hide -->
+				<Alpha change="-1" duration="0" order="1"/>
+				<!-- show with alpha 
+				<Translation offsetX="32" offsetY="0" duration="0.3" order="2"/>
+				-->
+				<Alpha change="1" duration="0.3" order="2"/>
+				<Scripts>
+					<OnPlay>
+						HotCornersAnimOnShowStarted (self:GetParent())
+					</OnPlay>
+					<OnFinished>
+						HotCornersAnimOnShowFinished (self:GetParent())
+					</OnFinished>
+				</Scripts>
+			</AnimationGroup>
+		</Animations>
+		
+		<Scripts>
+			<OnLoad>
+				self:SetFrameLevel (self:GetParent():GetFrameLevel()+2);
+			</OnLoad>
+			<OnEnter>
+				HotCornersButtonOnEnter (self);
+			</OnEnter>
+			<OnLeave>
+				HotCornersButtonOnLeave (self);
+			</OnLeave>
+			<OnMouseDown>
+				HotCornersButtonOnMouseDown (self, button);
+			</OnMouseDown>
+			<OnMouseUp>
+				HotCornersButtonOnMouseUp (self, button);
+			</OnMouseUp>
+		</Scripts>
+		
+	</Button>
+	
 	<Frame name="HotCornersButtonTemplate" frameStrata="FULLSCREEN" hidden="true" virtual="true">
 		<Size x="32" y="32"/>
+		
+		<Animations>
+			<AnimationGroup name="$parentOnShow" parentKey="AnimOnShow" looping="NONE">
+				<!-- hide -->
+				<Alpha change="-1" duration="0" order="1"/>
+				<!-- show with alpha 
+				<Translation offsetX="32" offsetY="0" duration="0.3" order="2"/>
+				-->
+				<Alpha change="1" duration="0.3" order="2"/>
+				<Scripts>
+					<OnPlay>
+						HotCornersAnimOnShowStarted (self:GetParent())
+					</OnPlay>
+					<OnFinished>
+						HotCornersAnimOnShowFinished (self:GetParent())
+					</OnFinished>
+				</Scripts>
+			</AnimationGroup>
+		</Animations>
+		
 		<Scripts>
 			<OnLoad>
 				self:SetFrameLevel (self:GetParent():GetFrameLevel()+2);
@@ -114,6 +221,48 @@
 		</Scripts>
 	</Button>
 
+	<Frame name="ATest" frameStrata="FULLSCREEN" parent="UIParent">
+		
+		<Size x="32" y="32"/>
+		
+		<Anchors>
+			<Anchor point="CENTER" relativeTo="$parent" relativePoint="CENTER" x="0" y="0"/>
+		</Anchors>
+		
+		<Layers>
+			<Layer level="OVERLAY">
+				<Texture name="$parentTexture" parentKey="texture">
+					<Size>
+						<AbsDimension x="32" y="32"/>
+					</Size>
+					<Color r="1" g="1" b="1" a="1"/>
+					<Anchors>
+						<Anchor point="CENTER" relativeTo="$parent" relativePoint="CENTER" x="0" y="0"/>
+					</Anchors>
+				</Texture>
+			</Layer>
+		</Layers>
+		
+		<Animations>
+			<AnimationGroup name="$parentGo" parentKey="go">
+			
+				<Alpha change="-1" duration="0" order="1" startDelay="3"/>
+				
+				<Translation offsetX="32" offsetY="0" duration="5" order="2"/>
+				<Alpha startDelay="0" change="1" duration="5" order="2"/>
+				
+			</AnimationGroup>
+		</Animations>
+		
+		<Scripts>
+			<OnLoad>
+				self.go:Play()
+				self:Hide()
+			</OnLoad>
+		</Scripts>
+		
+	</Frame>
+
 	<Script file="HotCorners.lua"/>
 	
 </Ui>
\ No newline at end of file