12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1168 Part IV ■ <strong>Reference</strong>Button4DownButton4UpButton5DownButton5UpLeftButtonDownLeftButtonUpMiddleButtonDownMiddleButtonUpRightButtonDownRightButtonUpAnyDownAnyUpAnyDown <strong>and</strong> AnyUp respond to the down or up action <strong>of</strong> any mouse button.SetButtonStateSets the button’s state.Button:SetButtonState(“state“, lock)Arguments:state—State <strong>for</strong> the button (string)DISABLED - Button is disabled <strong>and</strong> cannot receive user inputNORMAL - Button is in its normal statePUSHED - Button is pushed (as during a click on the button)lock—Locks the button in the given state; e.g. if NORMAL, the buttoncannot be clicked but remains in the NORMAL state (boolean)SetDisabledFontObjectSets the font object used <strong>for</strong> the button’s disabled state.Button:SetDisabledFontObject(font)Arguments:font—<strong>Reference</strong> to a Font object to be used when the button is disabled (font)SetDisabledTextureSets the texture used when the button is disabled.Button:SetDisabledTexture(texture) or iButton:SetDisabledTexture(“filename“)Arguments:texture—<strong>Reference</strong> to an existing Texture object (texture)filename—Path to a texture image file (string)SetFontStringSets the FontString object used <strong>for</strong> the button’s label text.Button:SetFontString(fontstring)Arguments:fontstring—<strong>Reference</strong> to a FontString object to be used <strong>for</strong> the button’slabel text (fontstring)SetFormattedTextSets the button’s label text using <strong>for</strong>mat specifiers.Button:SetFormattedText(“<strong>for</strong>matString“, ...)Equivalent to :SetText(<strong>for</strong>mat(<strong>for</strong>mat, ...)),butdoesnotcreateathrowaway Lua string object, resulting in greater memory-usage efficiency.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!