WoW:LegoBlock: Difference between revisions

160 bytes removed ,  15 August 2023
m
Move page script moved page LegoBlock to WoW:LegoBlock without leaving a redirect
(removed Beta0 information)
m (Move page script moved page LegoBlock to WoW:LegoBlock without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Image:TimeBlock-Clock.jpg|right|An example Clock]]
{{usermodule|LegoBlock}}
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.
 
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====
{| style="{{CSS Darktable}}"
{| class="darktable"
|- style="{{CSS Darktable th}}"
! Arg !! Type !! Details
! Arg !! Type !! Details
|-
|-
| name || string || The name for your lego block. It will be prefixed with Lego.
| 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 24: 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. Should be given as a [[#OptionsTbl|LegoBlock optionsTbl]]
| optionsTbl || table || (Optional) A table to store settings about the lego. Should be given as a [[#OptionsTbl|LegoBlock optionsTbl]]
|-
|}
|}
====Returns====
====Returns====
{| style="{{CSS Darktable}}"
{| class="darktable"
|- style="{{CSS Darktable th}}"
! Return !! Type !! Details
! Return !! Type !! Details
|-
|-
| legoBlock || frame || The frame created. It is a [[#LegoBlock_Object_API|LegoBlock]]
| legoBlock || frame || The frame created. It is a [[#LegoBlock_Object_API|LegoBlock]]
|}
|}
====Remarks====
====Remarks====
Line 38: Line 38:
====OptionsTbl====
====OptionsTbl====
Format for the optionsTbl is thus:
Format for the optionsTbl is thus:
{| style="{{CSS Darktable}}"
{| class="darktable"
|- style="{{CSS Darktable th}}"
! Key !! Value Type !! Details
! Key !! Value Type !! Details
|-
|-
Line 65: Line 64:
|-
|-
| appendstring || string || String to append to the CreateFrame call.
| appendstring || string || String to append to the CreateFrame call.
|-
|}
|}
<pre>
<pre>
Line 87: Line 85:
Changes the optionsTbl attached to a lego block
Changes the optionsTbl attached to a lego block
====Args====
====Args====
{| style="{{CSS Darktable}}"
{| class="darktable"
|- style="{{CSS Darktable th}}"
! Arg !! Type !! Details
! Arg !! Type !! Details
|-
|-
Line 117: Line 114:
Sets the icon
Sets the icon
====Args====
====Args====
{| style="{{CSS Darktable}}"
{| class="darktable"
|- style="{{CSS Darktable th}}"
! Arg !! Type !! Details
! Arg !! Type !! Details
|-
|-
Line 141: Line 137:
Sets the text of the lego block
Sets the text of the lego block
====Args====
====Args====
{| style="{{CSS Darktable}}"
{| class="darktable"
|- style="{{CSS Darktable th}}"
! Arg !! Type !! Details
! Arg !! Type !! Details
|-
|-
Line 148: Line 143:
|}
|}
====Remarks====
====Remarks====
You can set self.optionsTbl.noresize = true to not resize. Does not automagically show the text, you must call ShowText.
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")


== External links ==
== External links ==
* [http://www.wowinterface.com/downloads/info7954-LegoBlock.html WoWInterface Link]
* [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:World_of_Warcraft_API]]
[[Category:Dongle]]
[[Category:Dongle]]
Anonymous user