View Single Post
06-03-09, 05:57 PM   #15
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
Okay -- as promised earlier, here's the code you need to add health and power values to the simple HUD.

Edit [ Interace > AddOns > nUI > Layouts > Default > HUDLayouts > NoBars > nUI_UnitSkin_NoBars_Player.lua ] and add the following two sections to the layout's "elements" section...

Code:
        ["Health"] =
        {
            anchor =
            {
                anchor_pt   = "CENTER",
                xOfs = 0,
                yOfs = 0,
            },        
            options =
            {
                enabled  = true,
                height   = 2,
                width    = 2,
                inset    = 0,
                strata   = nil,
                level    = 2,
                
                mix_health =
                {
                    enabled     = true,
                    barcolor    = true,
                    fontsize    = 16,
                    justifyH    = "LEFT",
                    justifyV    = "MIDDLE",
                    anchor_pt   = "BOTTOMLEFT",
                    relative_to = nUI_HUDLAYOUT_NOBARS.."Bottom",
                    xOfs        = -250,
                    yOfs        = 270,
                },
            },
        },
        ["Power"] =
        {
            anchor =
            {
                anchor_pt   = "CENTER",
                xOfs = 0,
                yOfs = 0,
            },        
            options =
            {
                enabled  = true,
                height   = 2,
                width    = 2,
                inset    = 0,
                strata   = nil,
                level    = 2,
                
                mix_power =
                {
                    enabled     = true,
                    barcolor    = true,
                    fontsize    = 12,
                    justifyH    = "LEFT",
                    justifyV    = "MIDDLE",
                    anchor_pt   = "BOTTOMLEFT",
                    relative_to = nUI_HUDLAYOUT_NOBARS.."Bottom",
                    xOfs        = -250,
                    yOfs        = 247.5,
                },
            },
        },
Then edit [ Interface > AddOns > nUI > Layouts > Default > HUDLayouts > NoBars > nUI_UnitSkin_NoBars_Target.lua ] and add the following two sections to its "elements" section...

Code:
        ["Health"] =
        {
            anchor =
            {
                anchor_pt   = "CENTER",
                xOfs = 0,
                yOfs = 0,
            },        
            options =
            {
                enabled  = true,
                height   = 2,
                width    = 2,
                inset    = 0,
                strata   = nil,
                level    = 2,
                
                mix_health =
                {
                    enabled     = true,
                    barcolor    = true,
                    fontsize    = 16,
                    justifyH    = "RIGHT",
                    justifyV    = "MIDDLE",
                    anchor_pt   = "BOTTOMRIGHT",
                    relative_to = nUI_HUDLAYOUT_NOBARS.."Bottom",
                    xOfs        = 250,
                    yOfs        = 270,
                },
            },
        },
        ["Power"] =
        {
            anchor =
            {
                anchor_pt   = "CENTER",
                xOfs = 0,
                yOfs = 0,
            },        
            options =
            {
                enabled  = true,
                height   = 2,
                width    = 2,
                inset    = 0,
                strata   = nil,
                level    = 2,
                
                mix_power =
                {
                    enabled     = true,
                    barcolor    = true,
                    fontsize    = 12,
                    justifyH    = "RIGHT",
                    justifyV    = "MIDDLE",
                    anchor_pt   = "BOTTOMRIGHT",
                    relative_to = nUI_HUDLAYOUT_NOBARS.."Bottom",
                    xOfs        = 250,
                    yOfs        = 247.5,
                },
            },
        },
Save both files and reload WoW or do a '/nui rl' and you should get a screen that looks something like this...

.
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_060309_195551.jpg
Views:	1004
Size:	383.1 KB
ID:	2805  
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/