Reply
Thread Tools Display Modes
Unread 08-25-12, 08:39 AM   #1
BoboEGR
Zombie
Join Date: Aug 2012
Posts: 2
Question [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?
BoboEGR is offline   Reply With Quote
Unread 08-27-12, 12:10 AM   #2
adelea
Claw of Regulos
AddOn Author - Click to view addons
Join Date: Oct 2011
Posts: 22
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"})
adelea is offline   Reply With Quote
Unread 08-27-12, 10:20 AM   #3
BoboEGR
Zombie
Join Date: Aug 2012
Posts: 2
Thank You!

That was the problem, i would haven't found that
BoboEGR is offline   Reply With Quote
Reply

Go BackRiftui » Developer Discussions » General Authoring Discussion » [Question] Problem With "Texture" Frame and SetTexture

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