View Single Post
10/14/14, 10:31 AM   #8
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by ZOS_ChipHilseberg View Post
Is texture markup commonly used in add-on titles? I could push to add some code for this release to strip that off the front as well if you all think it would be worthwhile.
No, haven't seen any. I tried using it in one of my unreleased addons, purely out of curiosity, and I actually placed it after the title. As markup is not handled specially, it takes up precious character space, and is prone to being broken in half. So it's probably not worth removing it for sorting, without much more complex handling for display - reading texture width instead of string width for truncation. If anything, there could be a special "favicon" manifest directive and column for icons.

But I have another request more related to the original topic. Some addons have the whole title colored (sometimes in multiple colors), preventing them from being dimmed when they're disabled. Could you add some kind of darkening to disabled addon titles? Like this:

Lua Code:
  1. local function dimColor(r, g, b)
  2.     local dr = 0.6 * tonumber(r, 16)
  3.     local dg = 0.6 * tonumber(g, 16)
  4.     local db = 0.6 * tonumber(b, 16)
  5.     return string.format("|c%02x%02x%02x", dr, dg, db)
  6. end
  7. local dimmedTitle = title:gsub("|c(%x%x)(%x%x)(%x%x)", dimColor)

Last edited by merlight : 10/14/14 at 10:33 AM.
  Reply With Quote