Go to Page... |
Thread Tools | Display Modes |
08-25-12, 08:39 AM | #1 |
[Question] Problem With "Texture" Frame and SetTexture
Hi Folks,
i started write my first addon some days ago and i'm getting now an real strange problem. I want to use an texture frame to show an "Close" Button. If i use an texture from another addon (for example SetTexture("LuaPad", "close.png")) it works fine. If i copy the image to my addon folder (for testing only ) and change it to SetTexture("MyAddon", "close.png") or (SetTexture("MyAddon", "Textures/close.png")) the image will not displayed anymore. I have tried the root folder of my addon and an subfolder like "Textures". But nothing works. I'm verry confused now and i have no idea whats the problem. The code can found @ Pastebin here. The complete addon can be found here. I have installed the LuaPad Addon for testing purposes ingame. Can someone help me with that? |
|
08-27-12, 12:10 AM | #2 |
Your addon identifier in RiftAddon.toc is Wrytch_it, but you reference it as a WrytchIt in your addon (:SetTexure()), but Wrytch_It in the Event handlers.
These all need to be consistent. One thing you can do to make life easier. At the very top of your .lua files, put : local addon, shareddata = ... Then, you can refer to the addon using addon.identifier : closeButton:SetTexture(addon.identifier, "Textures/close.png") table.insert(Command.Slash.Register("wrytchit"), {showWrytchIt, addon.identifier, "Slash command"}) |
|
08-27-12, 10:20 AM | #3 |
Thank You!
That was the problem, i would haven't found that |
|
Riftui » Developer Discussions » General Authoring Discussion » [Question] Problem With "Texture" Frame and SetTexture |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|