Mercurial > wow > devian
comparison Devian.xml @ 36:bec37163b7fe v2.0-beta
rewrote the blocks for '/dvn tag' and SetChannel to be more predictable; currently follows:
/dvn tag <source> <dest>
if <dest> matches a channel, then the tag for <source> is added or removed
if <dest> is a string and it doesn't match a channel, then that channel is created with <dest> as a signature
if <dest> is a number that doesn't match a channel index, then <dest> is set to <highest valid index + 1>, the channel is created under that, and <source> is used as its signature
SetChannel(cinfo, key)
start with an empty table t_info that is filled in as follows:
if key doesn't match a valid index/signature, then a channel is being created
if key does match a valid index, then a channel is being updated
if cinfo is a string, then only the signature value is imposed
if cinfo is a table, the values from that table are imposed
if a channel is being created, then the new channel info is filled in from primary channel, the index is auto-generated, and the signature value is checked for collision, and the information is passed through CreateConsole to form internal assignments
if a channel is being updated, then t_info is populated from the channel data, and any internal table assignments are switched over to t_info
the old tables sink into garbage collection
| author | Nenue |
|---|---|
| date | Sun, 27 Dec 2015 08:19:45 -0500 |
| parents | 3304455a3f45 |
| children | dcc57a7cabc9 |
comparison
equal
deleted
inserted
replaced
| 35:3304455a3f45 | 36:bec37163b7fe |
|---|---|
| 10 <Color r="1" g="0" b="0" a="1" /> | 10 <Color r="1" g="0" b="0" a="1" /> |
| 11 <Size x="2" y="2" /> | 11 <Size x="2" y="2" /> |
| 12 </Texture> | 12 </Texture> |
| 13 | 13 |
| 14 | 14 |
| 15 <Texture virtual="true" name="DevianHeader" parentKey="titlebar" alphaMode="BLEND"> | 15 <Texture virtual="true" name="DevianHeader" alphaMode="BLEND"> |
| 16 <Anchors> | 16 <Anchors> |
| 17 <Anchor point="TOPLEFT" /> | 17 <Anchor point="TOPLEFT" /> |
| 18 <Anchor point="TOPRIGHT" /> | 18 <Anchor point="TOPRIGHT" /> |
| 19 </Anchors> | 19 </Anchors> |
| 20 <Size y="20" /> | 20 <Size y="20" /> |
| 23 <MinColor r="0" g="0" b="0" a="0.7"/> | 23 <MinColor r="0" g="0" b="0" a="0.7"/> |
| 24 <MaxColor r="0.3" g="0.3" b="0.3" a="0.7"/> | 24 <MaxColor r="0.3" g="0.3" b="0.3" a="0.7"/> |
| 25 </Gradient> | 25 </Gradient> |
| 26 </Texture> | 26 </Texture> |
| 27 | 27 |
| 28 <Button virtual="true" name="DevianDDButton" parentKey="button" alphaMode="BLEND"> | 28 <Button virtual="true" name="DevianDDButton" alphaMode="BLEND"> |
| 29 <Scripts> | 29 <Scripts> |
| 30 <OnClick> | 30 <OnClick> |
| 31 ToggleDropDownMenu(1, nil, self:GetParent().menuFrame, self, 0, 0); | 31 ToggleDropDownMenu(1, nil, self:GetParent().menuFrame, self, 0, 0); |
| 32 </OnClick> | 32 </OnClick> |
| 33 </Scripts> | 33 </Scripts> |
| 34 <Size x="16" y="16" /> | 34 <Size x="32" y="16" /> |
| 35 <Layers> | 35 <Layers> |
| 36 <Layer level="ARTWORK"> | 36 <Layer level="ARTWORK"> |
| 37 <Texture file="Interface\Addons\Devian\menu-button.blp" setAllPoints="true" alphaMode="ADD"> | 37 <Texture parentKey="icon" file="Interface\Addons\Devian\menu-button.blp" setAllPoints="true" alphaMode="ADD"> |
| 38 <Color a="1" r="1" g="1" b="1" /> | 38 <Color a="1" r="1" g="1" b="1" /> |
| 39 <TexCoords top="0.47" left="0" bottom="0.9" right="1" /> | |
| 39 </Texture> | 40 </Texture> |
| 40 </Layer> | 41 </Layer> |
| 41 </Layers> | 42 </Layers> |
| 42 </Button> | 43 </Button> |
| 43 | 44 |
| 44 | 45 |
| 45 | 46 |
| 46 <Frame name="DevianDDMenu" virtual="true" inherits="UIDropDownMenuTemplate" id="1"> | 47 <Frame name="DevianDDMenu" virtual="true" inherits="UIDropDownMenuTemplate" id="1"> |
| 47 <Scripts> | 48 <Scripts> |
| 48 <OnLoad> | 49 <OnLoad> |
| 49 local f = self:GetParent() | 50 </OnLoad> |
| 50 UIDropDownMenu_Initialize(self, function() | |
| 51 local info = { | |
| 52 text = "Some Text", | |
| 53 value = "OptionVariable", | |
| 54 func = function () print(self:GetParent().signature, 'how') end | |
| 55 } | |
| 56 -- can also be done as function() FunctionCalledWhenOptionIsClicked() end; | |
| 57 | |
| 58 -- Add the above information to the options menu as a button. | |
| 59 UIDropDownMenu_AddButton(info); | |
| 60 end, 'MENU')</OnLoad> | |
| 61 </Scripts> | 51 </Scripts> |
| 62 </Frame> | 52 </Frame> |
| 63 | 53 |
| 64 <ScrollingMessageFrame | 54 <ScrollingMessageFrame |
| 65 name="DevianBuffer" | 55 name="DevianBuffer" |
| 139 else self.out:ScrollDown() end | 129 else self.out:ScrollDown() end |
| 140 end | 130 end |
| 141 </OnMouseWheel> | 131 </OnMouseWheel> |
| 142 </Scripts> | 132 </Scripts> |
| 143 <Layers> | 133 <Layers> |
| 144 <Layer level="ARTWORK"> | 134 <Layer level="OVERLAY"> |
| 135 <Texture parentKey="header" inherits="DevianHeader"> | |
| 136 <Anchors> | |
| 137 <Anchor point="TOPLEFT" /> | |
| 138 <Anchor point="TOPRIGHT" /> | |
| 139 <Size y="20" /> | |
| 140 </Anchors> | |
| 141 </Texture> | |
| 145 <FontString parentKey="title" font="Interface\Addons\Devian\font\SourceCodePro-Bold.ttf" wordwrap="true" | 142 <FontString parentKey="title" font="Interface\Addons\Devian\font\SourceCodePro-Bold.ttf" wordwrap="true" |
| 146 justifyH="LEFT" | 143 justifyH="LEFT" |
| 147 indented="true"> | 144 indented="true"> |
| 148 <Anchors> | 145 <Anchors> |
| 149 <Anchor point="TOPLEFT" x="4" y="-2" /> | 146 <Anchor point="TOPLEFT" x="4" y="0" /> |
| 150 </Anchors> | 147 </Anchors> |
| 151 <Size y="20" /> | 148 <Size y="20" /> |
| 152 <FontHeight> | 149 <FontHeight> |
| 153 <AbsValue val="12"/> | 150 <AbsValue val="12"/> |
| 154 </FontHeight> | 151 </FontHeight> |
| 198 <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" /> | 195 <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" /> |
| 199 <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="2" /> | 196 <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="2" /> |
| 200 </Anchors> | 197 </Anchors> |
| 201 </Texture> | 198 </Texture> |
| 202 </Layer> | 199 </Layer> |
| 203 <Layer level="OVERLAY"> | |
| 204 <Texture name="$parentHeader" parentKey="header" inherits="DevianHeader"> | |
| 205 <Anchors> | |
| 206 <Anchor point="TOPLEFT" /> | |
| 207 <Anchor point="TOPRIGHT" /> | |
| 208 <Size y="20" /> | |
| 209 </Anchors> | |
| 210 </Texture> | |
| 211 </Layer> | |
| 212 </Layers> | 200 </Layers> |
| 213 <Frames> | 201 <Frames> |
| 214 <Frame name="$parentDDMenu" parentKey="menuFrame" inherits="DevianDDMenu" /> | 202 <Button name="$parentMenuButton" parentKey="dropmenu" inherits="DevianDDButton" enableMouse="true"> |
| 215 <Button name="$parentMenuButton" parentKey="menuButton" inherits="DevianDDButton" enableMouse="true"> | |
| 216 <Anchors> | 203 <Anchors> |
| 217 <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-4" y="0" /> | 204 <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-4" y="0" /> |
| 218 </Anchors> | 205 </Anchors> |
| 219 </Button> | 206 </Button> |
| 207 <Frame name="$parentDDMenu" parentKey="menuFrame" inherits="DevianDDMenu" /> | |
| 220 <ScrollingMessageFrame parentKey="out" inherits="DevianBuffer" /> | 208 <ScrollingMessageFrame parentKey="out" inherits="DevianBuffer" /> |
| 221 </Frames> | 209 </Frames> |
| 222 </Frame> | 210 </Frame> |
| 223 | 211 |
| 224 <Frame | 212 <Frame |
