Thread Tools Display Modes
04-15-23, 07:03 AM   #1
Benalish
A Flamescale Wyrmkin
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 122
Relative path file

Hello. In the folder where the .lua, .xml and .toc files are present, there is a subfolder called "media" where the "thumb.blp" file is present. What is the right syntax to load this file? I tried



"media\\thumb"

"\\media\\thumb"

"..\\media\\thumb"



but none of them work. Do I have to write the whole path?
  Reply With Quote
04-15-23, 09:01 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,831
Code:
"Inteface\\AddOns\\Your-Addon-Folder\\Media\\Thumb"
or create a variable for the textures path

Code:
local TexturePath = "Inteface\\AddOns\\Your-Addon-Folder\\Media\\"
and use
Code:
thisTexture:SetTexture(TexturePath .. "Thumb")
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Relative path file

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