WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   Help with tags (https://www.wowinterface.com/forums/showthread.php?t=27967)

xtothx 10-18-09 04:41 AM

Help with tags
 
Hi, its my first post here :)

I have problem with target tags for my ouf, exactly target name is overlapping the target classification :



I want to do it like this :



But I don't know how..

Also I want to make oUF showing non-player-target class, exactly like in 2nd screen.

Please help, and sorry for my english, I'm from Poland :)

v6o 10-18-09 07:48 AM

You need to use set the right anchor of your name fontstring to the left side of your target class and it will truncate automatically. You can also add some padding between them if you want.

name:SetPoint("RIGHT", WhateverYouCalledIt, "LEFT", -5, 0)

xtothx 10-18-09 08:16 AM

Nah, it doesn't work ;/ The problem still exist. Anyway thanks for reply.

(I am using self-modified oUF_Luna)

ravagernl 10-18-09 09:10 AM

What's your spawn function?

EDIT: See this page on wowwiki for more info about how dimensions from FontStrings can behave.

xtothx 10-18-09 09:39 AM

Code:

                self.Info = self:CreateFontString(nil, self, 'GameFontHighlightSmallLeft')           
                self.Info:SetFont(font, fontsize)
                self.Info:SetPoint('RIGHT', self, 'LEFT', 140, -34)
                self:Tag(self.Info, '[white][name]')

I am beginner in lua, but thanks for link :)

Waverian 10-18-09 10:37 AM

Quote:

Originally Posted by xtothx (Post 162681)
Code:

                self.Info = self:CreateFontString(nil, self, 'GameFontHighlightSmallLeft')           
                self.Info:SetFont(font, fontsize)
                self.Info:SetPoint('RIGHT', self, 'LEFT', 140, -34)
                self:Tag(self.Info, '[white][name]')

I am beginner in lua, but thanks for link :)

You misunderstood. You either need to explicitly set the width and height of your fontstring, or you need to set two anchors. One for the left side and one for the right side - you just have one for the right side.

lua Code:
  1. self.Info = self:CreateFontString(nil, self, 'GameFontHightlightSmallLeft')
  2. self.Info:SetFont(font, fontsize)
  3. -- main anchor
  4. self.Info:SetPoint('TOPLEFT', self, 'BOTTOMLEFT')
  5. -- right side anchor to truncate
  6. self.Info:SetPoint('RIGHT', YourClassificationFontstringName, 'LEFT')
  7. self:Tag(self.Info, '[white][name]')

xtothx 10-18-09 03:32 PM

Problem solved! Big thanks.


All times are GMT -6. The time now is 03:12 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI