@@ -13,42 +13,42 @@ VH_TEXTURES = {
1313 name = " Druid Icon" ,
1414 path = [[ Interface\Addons\]] .. folder .. [[ druid.tga]] ,
1515 },
16- {
16+ HUNTER_ICON = {
1717 type = " background" ,
1818 name = " Hunter Icon" ,
1919 path = [[ Interface\Addons\]] .. folder .. [[ hunter.tga]] ,
2020 },
21- {
21+ MAGE_ICON = {
2222 type = " background" ,
2323 name = " Mage Icon" ,
2424 path = [[ Interface\Addons\]] .. folder .. [[ mage.tga]] ,
2525 },
26- {
26+ PALADIN_ICON = {
2727 type = " background" ,
2828 name = " Paladin Icon" ,
2929 path = [[ Interface\Addons\]] .. folder .. [[ paladin.tga]] ,
3030 },
31- {
31+ PRIEST_ICON = {
3232 type = " background" ,
3333 name = " Priest Icon" ,
3434 path = [[ Interface\Addons\]] .. folder .. [[ priest.tga]] ,
3535 },
36- {
36+ ROGUE_ICON = {
3737 type = " background" ,
3838 name = " Rogue Icon" ,
3939 path = [[ Interface\Addons\]] .. folder .. [[ rogue.tga]] ,
4040 },
41- {
41+ SHAMAN_ICON = {
4242 type = " background" ,
4343 name = " Shaman Icon" ,
4444 path = [[ Interface\Addons\]] .. folder .. [[ shaman.tga]] ,
4545 },
46- {
46+ WARLOCK_ICON = {
4747 type = " background" ,
4848 name = " Warlock Icon" ,
4949 path = [[ Interface\Addons\]] .. folder .. [[ warlock.tga]] ,
5050 },
51- {
51+ WARRIOR_ICON = {
5252 type = " background" ,
5353 name = " Warrior Icon" ,
5454 path = [[ Interface\Addons\]] .. folder .. [[ warrior.tga]] ,
@@ -59,6 +59,7 @@ VH_TEXTURES = {
5959 name = " solid" ,
6060 path = [[ Interface\Addons\]] .. folder .. [[ solid.tga]] ,
6161 },
62+
6263 STATUSBAR = {
6364 type = " statusbar" ,
6465 name = " slanted dash" ,
@@ -69,6 +70,25 @@ VH_TEXTURES = {
6970 name = " slanted dash right" ,
7071 path = [[ Interface\Addons\]] .. folder .. [[ status-bar-right.tga]]
7172 },
73+
74+ X_ICON = {
75+ type = " background" ,
76+ name = " x icon" ,
77+ path = [[ Interface\Addons\]] .. folder .. [[ x.tga]]
78+ },
79+
80+ TRASH_ICON = {
81+ type = " background" ,
82+ name = " trash icon" ,
83+ path = [[ Interface\Addons\]] .. folder .. [[ trash.tga]]
84+ },
85+
86+ CHANNEL_ICON = {
87+ type = " background" ,
88+ name = " channel icon" ,
89+ path = [[ Interface\Addons\]] .. folder .. [[ channel.tga]]
90+ },
91+
7292}
7393
7494-- From SharedMedia
@@ -86,9 +106,17 @@ local SPRITES = {
86106 sprites = {
87107 -- col, row
88108 plus = { 1 , 1 },
109+ plusFill = { 2 , 1 },
89110 lock = { 1 , 2 },
90111 unlock = { 2 , 2 },
91112 settings = { 3 , 3 },
113+ trash = { 3 , 1 },
114+ x = { 1 , 3 },
115+ edit = { 2 , 3 },
116+ resize = { 3 , 2 },
117+ channel = { 4 , 3 },
118+ expand = { 6 , 1 },
119+ collapse = { 5 , 1 }
92120 }
93121 }
94122}
@@ -105,6 +133,25 @@ function Sprites:GetSprite(file, name)
105133 return sheet .path , {left , right , top , bottom }
106134end
107135
136+ function Sprites :GetTextSprite (file , name , color )
137+ local sheet = SPRITES [file ]
138+ local positions = sheet .sprites [name ]
139+ local left = (positions [1 ] - 1 ) * sheet .grid
140+ local right = (positions [1 ]) * sheet .grid
141+ local top = (positions [2 ] - 1 ) * sheet .grid
142+ local bottom = (positions [2 ]) * sheet .grid
143+
144+ return " |T" ..
145+ sheet .path ..
146+ " :0:0:0:0:128:128:" ..
147+ left .. " :" ..
148+ right .. " :" ..
149+ top .. " :" ..
150+ bottom ..
151+ (color and " :" .. color .r * 255 .. " :" .. color .g * 255 .. " :" .. color .b * 255 or " " ) ..
152+ " |t"
153+ end
154+
108155function Sprites :SetSprite (tex , file , name )
109156 local path , coords = self :GetSprite (file , name )
110157 tex :SetTexture (path )
0 commit comments