Thread Tools Display Modes
03-14-12, 11:13 AM   #1
eiszeit
A Chromatic Dragonspawn
 
eiszeit's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 154
How to replace LFG icon

Is there a way to modify the LFG icons (dungeon/raid) on the minimap with Lua?
Or do I have to replace the icons itself (I hope I can avoid that).
__________________
Lyn • I'm a mess of unfinished thoughts

Last edited by eiszeit : 03-14-12 at 11:15 AM.
  Reply With Quote
03-14-12, 11:24 AM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
I assume you mean for the buttons? Sure. Just find the name of the button and call :SetTexture() on it. Note, though, that the LFG texture is actually made up of several images in one texture file, using :SetTexCoord() to make it animated.
__________________
"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
03-14-12, 11:37 AM   #3
eiszeit
A Chromatic Dragonspawn
 
eiszeit's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 154
Originally Posted by Seerah View Post
I assume you mean for the buttons? Sure. Just find the name of the button and call :SetTexture() on it. Note, though, that the LFG texture is actually made up of several images in one texture file, using :SetTexCoord() to make it animated.
Tried that, doesn't work .. I solved it with an extra texture I created (CreateTexture() stuff) and put it on top.
__________________
Lyn • I'm a mess of unfinished thoughts
  Reply With Quote
03-14-12, 01:08 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You cannot simply use SetTexture on the LFG icon, because it calls SetTexture on itself (a) every time an LFG-related event fires, and (b) every OnUpdate while you are in a queue. To actually change the texture, you would need to overwrite the Blizzard functions that operate on the LFG icon with your own functions that set your custom textures.
  Reply With Quote
03-14-12, 01:28 PM   #5
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Could always replace the file itself in the Interface\LFGFrame folder, open the mpq and take a look.

Replacing it would simply mean making the same folder and file structure in the game folders and the game will load the new textures, no coding needed. Don't worry, files that you shouldn't be able to override won't be loaded by the game anyway, so it's okay to play around a bit.
  Reply With Quote
03-14-12, 02:19 PM   #6
Waky
A Cobalt Mageweaver
 
Waky's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2010
Posts: 200
Here are links to the two source files for the MiniMapLFG Button:

Minimap.xml
Minimap.lua

These are located on tekkub's github, and the links go directly to the line of the MinimapLFG code. The second link goes to the MiniMapLFG_Update function, which I do believe is the one in control of changing the texture.
  Reply With Quote
03-14-12, 06:21 PM   #7
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
I replaced the raid icon with a custom icon, this is the only way I found to do it without overwriting functions:
Code:
LFG_EYE_TEXTURES.raid = {
	file = [=[Interface\AddOns\Relief\eye]=], frames = 29,
	delay = 0.1, iconSize = 64, height = 256, width = 512,
}
https://github.com/tekkub/wow-ui-sou...map.lua#L11-14
Attached Images
 

Last edited by p3lim : 03-14-12 at 09:38 PM.
  Reply With Quote
03-14-12, 08:17 PM   #8
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by Vladinator View Post
Could always replace the file itself in the Interface\LFGFrame folder, open the mpq and take a look.

Replacing it would simply mean making the same folder and file structure in the game folders and the game will load the new textures, no coding needed. Don't worry, files that you shouldn't be able to override won't be loaded by the game anyway, so it's okay to play around a bit.
Just so you know, you don't have to open the MPQ any longer. Just add '-console' to the end of your wow shortcut, press the ~ key on the login screen and type in "ExportInterfaceFiles art" into the console.

This will create a folder with all the interface art used by blizzard.

The texture needing replacing or editing would be:
"Interface\LFGFRAME\LFG-Eye.blp"

Edit: p3lim's approach would definitely be the best approach.

Last edited by suicidalkatt : 03-14-12 at 08:24 PM.
  Reply With Quote
03-14-12, 09:39 PM   #9
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by suicidalkatt View Post
Just so you know, you don't have to open the MPQ any longer. Just add '-console' to the end of your wow shortcut, press the ~ key on the login screen and type in "ExportInterfaceFiles art" into the console.

This will create a folder with all the interface art used by blizzard.
Its a little outdated, but you could always use this:
http://wowprogramming.com/utils/artbrowser
  Reply With Quote
03-15-12, 05:01 AM   #10
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
I always prefer to replace the files and let the original code just use my own files, than hooking and altering variables in-game, but both ways are valid, LUA one is more for addons ofc, so users don't have to delete too much when they want to uninstall something.
  Reply With Quote
03-16-12, 02:58 AM   #11
eiszeit
A Chromatic Dragonspawn
 
eiszeit's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 154
Edit: forget that sh*t.

I made it now how p3lim did it. Made a new icon for that and such. Other way worked, too, but now it's bit more elegant.
__________________
Lyn • I'm a mess of unfinished thoughts

Last edited by eiszeit : 03-16-12 at 03:53 AM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » How to replace LFG icon


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