• 0

    posted a message on PitBull 2.0
    I've set up custom class colors in the PitBull config menu (global settings) but the unitframes show the default colors. Can anybody give me a hint if I missed a setting anywhere or is this a bug?
    Posted in: Unit Frames
  • 0

    posted a message on Post cool PitBull layouts here!
    I don't know if this is the right topic to post this, but since it's a problem I had with Pibull I'm posting it here. I had the problem that long NPC Names ran out of the unitframes and to alter that I used [Name:Trunc(12)] (12 because the max. length for playernames in WoW is 12, so only NPC names get trunced), but without ellipses at the end it even looked a little odd to me. To solve it for me I addet my own modifier to my local "[WoW]\Interface\AddOns\LibDogTag-2.0\Modules\TextManip.lua" and it works fine.

    Here it is:
    DogTag:AddModifier("TruncEllipsis", {
      [[local len = 0
      for i = 1, ${arg} do
      local b = value:byte(len+1)
      if not b then
       break
      elseif b <= 127 then
       len = len + 1
      elseif b <= 223 then
       len = len + 2
      elseif b <= 239 then
       len = len + 3
      else
       len = len + 4
      end
     end
     local n = value:len(value)
     value = value:sub(1, len)
     if n > ${arg} then
      value = value .. '...'
     end]],
     arg = "number",
     value = "string",
     ret = "string",
     doc = L["Truncate value to the length specified by number and add ellipsis to the end."],
     example = '[Text(Hello):TruncEllipsis(3)] => "Hel..."',
     category = L["Text manipulation"]
    })

    Actually it's just a modification of the original Trunc() modifier and since I'm not a programmer there is maybe a better solution, but as said, it works fine for me an I thought I share it and help somebody who might has the same issue.

    [edit date=February 04, 2008]
    This post ist obsolete now, since the modifier has been addet to LibDogTag-2.0 lately.
    Thank you to the developer team, I really appreciate that.
    [/edit]
    Posted in: Unit Frames
  • To post a comment, please or register a new account.