Thread Tools Display Modes
10-30-10, 03:55 PM   #1
samishii23
An Aku'mai Servant
Join Date: Oct 2010
Posts: 33
ButtonTexture not loading

Code:
SK.Frame = CreateFrame("Frame", "SK Test")
SK.Frame:SetFrameStrata("TOOLTIP")
SK.Frame:SetWidth(100)
SK.Frame:SetHeight(100)
SK.Frame:SetPoint("CENTER",0,0)
SK.Frame:SetBackdrop(SK_Styles.Main)
SK.Frame:SetBackdropColor(Color("Red"))
SK.Frame:SetScript("OnEvent", SK.Events)
SK.Frame:Hide()

local button = CreateFrame("Button",nil,SK.Frame)
button:SetBackdrop(SK_Styles.Main)
button:SetPoint("TOPRIGHT")
button:SetHeight(32)
button:SetWidth(32)
button:SetNormalTexture("Interface\Buttons\UI-Panel-MinimizeButton-Up")
button:SetPushedTexture("Interface\Buttons\UI-Panel-MinimizeButton-Down")
button:SetHighlightTexture("Interface\Buttons\UI-Panel-MinimizeButton-Highlight", "ADD")
button:SetScript("OnClick", function() SK.Frame:Hide() end)
It don't show the texture... Help?
  Reply With Quote
10-30-10, 06:55 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
You need to escape the slashes in your file paths, or else Lua will skip right over them when reading through.
Code:
button:SetNormalTexture("Interface\\Buttons\\UI-Panel-MinimizeButton-Up")
button:SetPushedTexture("Interface\\Buttons\\UI-Panel-MinimizeButton-Down")
button:SetHighlightTexture("Interface\\Buttons\\UI-Panel-MinimizeButton-Highlight", "ADD")
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
10-30-10, 07:50 PM   #3
samishii23
An Aku'mai Servant
Join Date: Oct 2010
Posts: 33
Is there a major programming difference between " and ' in LUA? ( I primarily code PHP, and " allows for variables to be inserted and escape characters to be used, while ' is a litteral )
Thanks!

Last edited by samishii23 : 10-30-10 at 08:00 PM.
  Reply With Quote
10-30-10, 09:57 PM   #4
Xubera
A Cobalt Mageweaver
 
Xubera's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 207
no, " and ' work the same

however there is a token that allows for that

[[Interface\Addons\MyAddon\media\myTexture]]

and

[=[Interface\Addons\MyAddon\media\myTexture]=]

just make sure there are as many equals on both sides, i dont know if theres a limit too it, but you probably wont need that many
__________________
Chat Consolidate is the solution to any out of control trade chat. Ignore lines, throttle chat, consolidate posts!Follow the link to find out how!

▲ ▲ WoWInterface wont let me triforce >.>
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » ButtonTexture not loading

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off