Mercurial > wow > skeletonkey
view SkeletonKey/KeyBinds.xml @ 6:f6d1c192afc6
Refactored file layout:
- frame display logic in UI.lua
- player data in Cache.lua
- event responses in Events.lua
a lot of local tables are now stored members of KeyBinder for that to work
author | Nenue |
---|---|
date | Thu, 28 Jul 2016 16:45:56 -0400 |
parents | 9ac29fe77455 |
children | 32d64e42ec9b |
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"> <Button name="KeyBinderMacro" inherits="SecureActionButtonTemplate"> <Attributes> <Attribute name="*type*" value="macro" /> </Attributes> </Button> <Button name="KeyBinderKey" inherits="SecureActionButtonTemplate" /> <CheckButton name="KeyButton" virtual="true"> <Size x="32" y="32" /> <Layers> <Layer level="BACKGROUND"> <Texture parentKey="border" setAllPoints="true"> <Color a="1" r=".25" g=".25" b=".25" /> </Texture> </Layer> <Layer level="BORDER"> <Texture parentKey="bg"> <Anchors> <Anchor point="TOPLEFT" x="2" y="-2" /> <Anchor point="BOTTOMRIGHT" x="-2" y="2" /> </Anchors> <Color a="0.5" r="0" g="0" b="0" /> </Texture> </Layer> <Layer level="ARTWORK"> <Texture setAllPoints="true" parentKey="icon"> <Anchors> <Anchor point="TOPLEFT" x="2" y="-2" /> <Anchor point="BOTTOMRIGHT" x="-2" y="2" /> </Anchors> <TexCoords left="0.1" right="0.9" top="0.1" bottom="0.9" /> </Texture> </Layer> <Layer level="OVERLAY"> <FontString inherits="NumberFontNormal" parentKey="header" wordwrap="false" justifyH="LEFT"> <Anchors> <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="2" y="-2" /> <Anchor point="RIGHT" x="128" y="0" /> </Anchors> </FontString> <FontString inherits="NumberFontNormal" parentKey="bind"> <Anchors> <Anchor point="BOTTOMRIGHT" x="-2" y="2" /> </Anchors> </FontString> <FontString inherits="KTMacroButtonFont" parentKey="macro"> <Anchors> <Anchor point="TOPLEFT" x="2" y="-2" /> <Anchor point="RIGHT" x="-2" y="0" /> </Anchors> </FontString> <FontString inherits="NumberFontNormal" parentKey="details" justifyH="LEFT"> <Anchors> <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" x="0" y="-2" relativeKey="$parent.header" /> <Anchor point="RIGHT" x="128" y="0" /> </Anchors> </FontString> </Layer> </Layers> <HighlightTexture file="Interface\BUTTONS\UI-Button-Outline" alphaMode="ADD"> <Anchors> <Anchor point="TOPLEFT" x="-13" y="13" /> <Anchor point="BOTTOMRIGHT" x="13" y="-13" /> </Anchors> </HighlightTexture> </CheckButton> <Frame name="KeyBinder" parent="UIParent" hidden="true" clampedToScreen="true" movable="true" enableMouse="true"> <Anchors> <Anchor point="TOP" y="-25" x="0" /> </Anchors> <Size x="600" y="200" /> <Scripts> <OnLoad> self:RegisterForDrag('LeftButton') </OnLoad> <OnShow> </OnShow> <OnDragStart> self:StartMoving() </OnDragStart> <OnDragStop> self:StopMovingOrSizing() </OnDragStop> <OnMouseWheel> self:OnMouseWheel(delta) </OnMouseWheel> <OnHide> self:OnHide() </OnHide> </Scripts> <Layers> <Layer level="BACKGROUND"> <Texture parentKey="info"> <Anchors> <Anchor point="TOPLEFT" /> <Anchor point="RIGHT" /> </Anchors> <Size y="42" /> </Texture> <Texture parentKey="headerbg" alphaMode="MOD"> <Size y="32" /> <Anchors> <Anchor point="TOPLEFT" /> <Anchor point="RIGHT" /> </Anchors> <Color a="1" r="1" g="1" b="1" /> <Gradient orientation="VERTICAL"> <MinColor r="0" g="0" b="0"/> <MaxColor r="1" g="1" b="1"/> </Gradient> </Texture> <Texture parentKey="sourcesbg"> <Size x="100" /> <Anchors> <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeKey="$parent.headerbg" /> <Anchor point="BOTTOM" /> </Anchors> <Color a="1" r="0.2" g="0.2" b="0.2" /> </Texture> <Texture parentKey="profilebg"> <Size y="102" /> <Anchors> <Anchor point="TOP" relativePoint="BOTTOM" relativeKey="$parent.headerbg" /> <Anchor point="LEFT" relativePoint="RIGHT" relativeKey="$parent.sourcesbg" /> <Anchor point="RIGHT" /> </Anchors> <Color a="1" r="0" g="0" b="0" /> </Texture> <Texture parentKey="bg"> <Anchors> <Anchor point="TOP" relativePoint="BOTTOM" relativeKey="$parent.profilebg" /> <Anchor point="LEFT" relativePoint="RIGHT" relativeKey="$parent.sourcesbg" /> </Anchors> <Color a="0.5" r="0" g="0" b="0" /> </Texture> <Texture parentKey="footer"> <Size y="52" /> <Anchors> <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeKey="$parent.bg" x="0" y="0" /> <Anchor point="RIGHT" /> </Anchors> <Color a="1" r="0" g="0" b="0" /> </Texture> </Layer> <Layer level="OVERLAY"> <FontString inherits="KTHeaderFont" text="Bindings" parentKey="header"> <Anchors> <Anchor point="TOPLEFT" /> </Anchors> </FontString> <FontString parentKey="profiletext" inherits="KTHeader2Font" justifyH="LEFT" text="Foobar"> <Anchors> <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeKey="$parent.header" x="8" y="5" /> </Anchors> <Color a="1" r="1" g="0.7" b="0" /> </FontString> <FontString parentKey="statustext" inherits="NumberFont_Outline_Large" justifyH="LEFT" justifyV="TOP"> <Anchors> <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" relativeKey="$parent.bg" x="12" y="7" /> </Anchors> </FontString> <FontString parentKey="bindingstext" inherits="NumberFont_Outline_Large" justifyH="RIGHT" justifyV="TOP"> <Anchors> <Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" relativeKey="$parent.bg" x="-12" y="7" /> </Anchors> <Color a="1" r="0" g="1" b="0" /> </FontString> </Layer> </Layers> <Frames> <Button inherits="UIPanelCloseButton" parentKey="CloseButton"> <Anchors> <Anchor point="TOPRIGHT" /> </Anchors> </Button> <CheckButton inherits="UICheckButtonTemplate" parentKey="DummyCheckButton"> <Anchors> <Anchor point="BOTTOMLEFT" x="4" y="4" /> </Anchors> <ButtonText text="This is some crap" /> </CheckButton> </Frames> </Frame> <ScrollingMessageFrame hidden="true" fade="false" name="KeyBinderImportLog" parent="KeyBinder" clampedToScreen="true" parentKey="ImportLog" insertMode="BOTTOM" maxLines="500"> <Scripts> <OnLoad> self:AddMessage('SkeletonKey import tool') </OnLoad> <OnMouseWheel> if delta >= 0 then if IsControlKeyDown() then -- extremely janky but avoids having one line at the bottom for i =1, self:GetMaxLines() do self:ScrollUp() end end return self:ScrollUp() else if IsControlKeyDown() then return self:ScrollToBottom() end self:ScrollDown() end </OnMouseWheel> </Scripts> <Anchors> <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="2" y="0" /> <Anchor point="BOTTOM" /> </Anchors> <Size x="400" /> <Layers> <Layer level="BACKGROUND"> <Texture setAllPoints="true"> <Color a="1" r="0" g="0" b="0" /> </Texture> </Layer> </Layers> <FontString inherits="NumberFontNormal" justifyH="LEFT"> <Anchors> <Anchor point="TOPLEFT" /> </Anchors> </FontString> </ScrollingMessageFrame> </Ui>