49
edits
No edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
{{usermodule|LegoBlock}} | |||
LegoBlock: Embeddable library to provide block functionality. | |||
LegoBlock: Embeddable library to provide block functionality. Generated LegoBlocks stick together using Tuller's FlyPaper code. Blocks do not currently stick across majors, though that is under consideration. | |||
==Description== | ==Description== | ||
LegoBlock lets you create a small block to display information in it like time, performance, haste or anything you can think of! Blocks can be snapped together in any position or order you can do simple things like snap them together into a long line to be positioned at the top of your UI, or you can snap them together in an "L" position and so on. | LegoBlock lets you create a small block to display information in it like time, performance, haste or anything you can think of! Blocks can be snapped together in any position or order you can do simple things like snap them together into a long line to be positioned at the top of your UI, or you can snap them together in an "L" position and so on. | ||
| Line 13: | Line 15: | ||
===:New(name[, text, icon, optionsTbl])=== | ===:New(name[, text, icon, optionsTbl])=== | ||
Creates a new LegoBlock. | Creates a new LegoBlock. | ||
====Args==== | ====Args==== | ||
{| class="darktable" | {| class="darktable" | ||
! Arg !! Type !! Details | ! Arg !! Type !! Details | ||
|- | |- | ||
| name || string || The name for your lego block. | | name || string || The name for your lego block. It will be prefixed with Lego. | ||
|- | |- | ||
| text || string || (Optional) The initial text for the lego block. | | text || string || (Optional) The initial text for the lego block. | ||
| Line 23: | Line 26: | ||
| icon || string/texture || (Optional) The initial texture for the icon on the lego block. | | icon || string/texture || (Optional) The initial texture for the icon on the lego block. | ||
|- | |- | ||
| optionsTbl || table || (Optional) A table to store settings about the lego. | | optionsTbl || table || (Optional) A table to store settings about the lego. Should be given as a [[#OptionsTbl|LegoBlock optionsTbl]] | ||
|} | |} | ||
====Returns==== | ====Returns==== | ||
| Line 30: | Line 32: | ||
! Return !! Type !! Details | ! Return !! Type !! Details | ||
|- | |- | ||
| legoBlock || frame || The frame created. | | legoBlock || frame || The frame created. It is a [[#LegoBlock_Object_API|LegoBlock]] | ||
|} | |} | ||
====Remarks==== | ====Remarks==== | ||
| Line 62: | Line 64: | ||
|- | |- | ||
| appendstring || string || String to append to the CreateFrame call. | | appendstring || string || String to append to the CreateFrame call. | ||
|} | |} | ||
<pre> | <pre> | ||
| Line 142: | Line 143: | ||
|} | |} | ||
====Remarks==== | ====Remarks==== | ||
You can set self.optionsTbl.noresize = true to not resize. | You can set self.optionsTbl.noresize = true to not resize. Does not automagically show the text, you must call ShowText. | ||
====Example==== | ====Example==== | ||
self:SetText("Woohooo") | self:SetText("Woohooo") | ||
| Line 150: | Line 151: | ||
* [http://jira.wowace.com/browse/LEGO For posting bugs and requests] | * [http://jira.wowace.com/browse/LEGO For posting bugs and requests] | ||
* [http://code.google.com/p/legos-wow LegoBlock on Google Code] | * [http://code.google.com/p/legos-wow LegoBlock on Google Code] | ||
[[Category:Dongle]] | [[Category:Dongle]] | ||