WowAce.com
Home
Addons
Authors
Forums
Knowledge base
Paste
Site issues
Sign in
Register new account
ButtonFacade
Overview
Files
Tickets
Pages
Repository
Localization
Subscriptions
Donate
Curse
Skins
r6
Source
Markup:
*
== Getting Started == The purpose of this guide is to make creating your own button button "skin" as easy as possible. Since a skin's settings are formatted in a LUA table, this guide will require at least a basic understanding of LUA syntax. If you have no experience with LUA, you can always [[http://www.lua.org|do some reading]]. It's also recommended that you read [[http://forums.wowace.com/showthread.php?t=15439|this image guide]], as you'll need that information when creating your images. You may also want to download the [[http://www.wowace.com/projects/buttonfacade_developer|ButtonFacade: Developer]] package to help with getting started. Now that you have the tools, it's time to move on to what makes up a skin. == Introduction == A skin is composed of "layers" of textures, colors and text overlays. A layer is simply a container for whatever object happens to reside in it. Each layer has a specific set of attributes that define how the game draws that layer and its contents. == Coding A Skin == As was mentioned previously, a skin is simply a LUA table that defines the layers and their contents. The format is quite simple when broken down to its basic components, as you can see in the following example. <<code lua>> LibButtonFacade:AddSkin("Skin Name", { -- Skin data start. Layer = { Attribute = value, }, -- Skin data end. }, true) <</code>> The :AddSkin() function does all the work once the appropriate layers and their attributes are set. The first argument is the name of the skin and the second argument is a boolean of whether or not to overwrite an existing skin of the same name. == Layers == There are three types of layer that make up a skin: * __Texture Layer__\\Displays a texture using the given attributes. All textures layers must have a texture path set. * '''Model Layer:''' Displays a predefined animation. In most cases, the texture path should never be changed from the default Blizzard animation. * '''Text Layer:''' Displays text overlays such as item count, macro name, etc. ButtonFacade uses predefined layers to apply skins. The following is a list of all available layers in order from bottom (first) to top (last). === Backdrop === ''Texture Layer''<br> The bottom-most layer. Uses standard texture attributes. === Icon === ''Texture Layer''<br> Spell or skill icon for the button. === Flash === ''Texture layer''<br> Combat/attack indicator. === Cooldown === ''Model Layer''<br> Cool-down animation. === AutoCast === ''Model Layer''<br> Auto-cast animation. Only used on square buttons. === Normal === ''Texture Layer''<br> The "border" or "normal" texture for the button. === Pushed === ''Texture Layer''<br> Texture for the "pushed" state. Replaces the "normal" texture unless the "Static" attribute is set to "true". === Border === ''Texture Layer''<br> Layer for the "equipped" state. === Disabled === ''Texture Layer''<br> Texture for the "disabled" state. Replaces the "normal" texture unless the "Static" attribute is set to "true". === Checked === ''Texture Layer''<br> Highlight layer for active skills, stances, etc. === AutoCastable === ''Texture Layer''<br> Texture marking its auto-cast property. === Highlight === ''Texture Layer''<br> Highlight layer for mouse-overs. === Gloss === ''Texture Layer''<br> "Gloss" or "glaze" layer. === HotKey === ''Text Layer''<br> Text for the hot key. === Count === ''Text Layer''<br> Text for the item count. === Name === ''Text Layer''<br> Text for the macro name. == Attributes == A layer's attributes define how that layer is drawn on the screen. The following is a list of available attributes. === Hide === Whether or not the layer is hidden. Available for all layers. If a layer is to be unused, this should be the only attribute that should be set (to "true") for that layer. === Width === The width of the layer in pixels. Available for all layers. === Height === The height of the layer in pixels. Available for all layers. === Scale === The scale of the layer. Available for all layers. === OffsetX === Horizontal offset in pixels. Available for all layers. === OffsetY === Vertical offset in pixels. Available for all layers. === Red === The amount of red affecting the layer. Only available for the Normal layer. Defaults to 1.0. === Green === The amount of red affecting the layer. Only available for the Normal layer. Defaults to 1.0. === Blue === The amount of red affecting the layer. Only available for the Normal layer. Defaults to 1.0. === Alpha === The amount of red affecting the layer. Only available for the Normal layer. Defaults to 1.0. === Texture === The path to the texture. Available for texture layers only. Required. === TexCoords === Texture coorinates. Availabe for texture layers only. Defaults to {0,1,0,1} === Blend Mode === The blending mode of the layer. Available for texture layers only. Modes are: * BLEND - Blends according to alpha channel. * DISABLE - No blending. * ALPHAKEY - Blends according to 1-bit alpha channel. * ADD - Alpha, additive. * MOD - No alpha, multiplicative. === Static === When set to "true", prevents the Normal layer from being replaced by the Checked and Disabled layers. Only available for the Normal layer. == Other Notes == * Paths should be formated like: <nowiki>[[path/to/file]]</nowiki>. == Templates == As of revision 70461, a skin author can now specify an existing skin to use as a template. This "copy" will retain all the settings of the copied skin except for those specified in the skin data. For example: <pre style="font-family:'Courier New', Courier, monospace;margin:20px 0;min-height:0px;height:auto;">Template = "Sample", Normal = { Texture = [[Path/To/New/Texture]] },</pre> Would copy the "Sample" skin and replace its "Normal" texture with the new one. Note: The replacement is done at the layer level so one has to specify all of the new attributes for that layer.
Markup Type:
*
The type of markup for this entry.
Click here for details
.
WikiCreole
BBCode
Safe HTML
Plain Text
Markdown
Textile
Curse Wiki (Deprecated)