Thread Tools Display Modes
05-30-10, 09:47 PM   #1
RufferV2K
A Defias Bandit
Join Date: May 2010
Posts: 3
Post RothUI, need master's of LUA help)

hi, i m qite new to lua, and i started to edit RothUI, really like it BTW.

here what i get, i want to move the target and tot (target of targer) frames up and place 3d portraits next to thm, scale castbars and other minor stuff.

in --target and castbar scale i've added this:

local totscale = 0.42
local castbarscale = 0.62


then in table frame_positions = { changed 3, 4, 12 and 13 to:

[3] = { a1 = "TOP", a2 = "TOP", af = "UIParent", x = 0, y = -250 }, --Target frame
[4] = { a1 = "CENTER", a2 = "CENTER", af = "oUF_D3Orbs2_TargetFrame", x = 280, y = -70 }, --tot
[12] = { a1 = "CENTER", a2 = "CENTER", af = "oUF_D3Orbs2_TargetFrame", x = 0, y = -70 }, --castbar target
[13] = { a1 = "CENTER", a2 = "CENTER", af = "UIParent", x = 0, y = -350 }, --castbar player


and added

[15] = { a1 = "CENTER", a2 = "CENTER", af = "", x = -159, y = 0 }, --Target Portrait

then in local function d3o2_createCastbar(self,unit) changed self.Castbar:SetScale(targetscale) to look like self.Castbar:SetScale(castbarscale)

local function d3o2_createPortraits(self,unit) was copied two times, in first table

--create portraits func
local function d3o2_createPortraits(self,unit)
self.Portrait_bgf = CreateFrame("Frame",nil,self)
self.Portrait_bgf:SetPoint("BOTTOM",self.Health,"T OP",0,14)
self.Portrait_bgf:SetWidth(self.width+10)
self.Portrait_bgf:SetHeight(self.width+10)

local back = self.Portrait_bgf:CreateTexture(nil, "BACKGROUND")
back:SetPoint("TOPLEFT",self.Portrait_bgf,"TOPLEFT ",-15,15)
back:SetPoint("BOTTOMRIGHT",self.Portrait_bgf,"BOT TOMRIGHT",15,-15)
back:SetTexture("Interface\\AddOns\\rTextures\\sim plesquare_glow")
back:SetVertexColor(0, 0, 0, 0.7)


was changed to:

local function d3o2_createTargetPortraits(self,unit)
self.Portrait_bgf = CreateFrame("Frame",nil,self)
self.Portrait_bgf:SetPoint(tabvalues.frame_positions[15].a1,self.Health,tabvalues.frame_positions[15].a2, tabvalues.frame_positions[15].x,tabvalues.frame_positions[15].y)
self.Portrait_bgf:SetWidth(self.width/3)
self.Portrait_bgf:SetHeight(self.width/3)

local back = self.Portrait_bgf:CreateTexture(nil, "BACKGROUND")
back:SetPoint("TOPLEFT",self.Portrait_bgf,"TOPLEFT ",-7,7)
back:SetPoint("BOTTOMRIGHT",self.Portrait_bgf,"BOT TOMRIGHT",7,-7)
back:SetTexture("Interface\\AddOns\\rTextures\\sim plesquare_glow")
back:SetVertexColor(0, 0, 0, 0.7)


and in second table to:

local function d3o2_createTOTPortraits(self,unit)
self.Portrait_bgf = CreateFrame("Frame",nil,self)
self.Portrait_bgf:SetPoint( "CENTER",self.Health,"CENTER", 0,70)
self.Portrait_bgf:SetWidth(self.width - 10 )
self.Portrait_bgf:SetHeight(self.width - 10 )

local back = self.Portrait_bgf:CreateTexture(nil, "BACKGROUND")
back:SetPoint("TOPLEFT",self.Portrait_bgf,"TOPLEFT ",-7,7)
back:SetPoint("BOTTOMRIGHT",self.Portrait_bgf,"BOT TOMRIGHT",7,-7)
back:SetTexture("Interface\\AddOns\\rTextures\\sim plesquare_glow")
back:SetVertexColor(0, 0, 0, 0.7)


next in --create the target style added d3o2_createTargetPortraits(self,unit) to the end of the list, so it looks like

d3o2_createDebuffGlow(self,unit)
d3o2_createIcons(self,unit)
d3o2_createComboPoints(self,unit)
d3o2_createTargetPortraits(self,unit)


and in --create the tot style added d3o2_createTOTPortraits(self,unit) to the end of the list so it now looks like this:

d3o2_createLowHP(self,unit)
d3o2_createDebuffGlow(self,unit)
d3o2_createIcons(self,unit)
d3o2_createTOTPortraits(self,unit)


and changed self:SetAttribute('initial-scale', totscale)
end;




yeah, so like that... now when i log in i see no unit frames and get a nasty lua error:

Message: Interface\AddOns\oUF_D3Orbs\oUF_D3Orbs.lua:978: <unnamed>:SetPoint(): Unknown region point
Time: 05/31/10 06:07:37
Count: 1
Stack: [C]: in function `SetPoint'
Interface\AddOns\oUF_D3Orbs\oUF_D3Orbs.lua:978: in function <Interface\AddOns\oUF_D3Orbs\oUF_D3Orbs.lua:971>
Interface\AddOns\oUF_D3Orbs\oUF_D3Orbs.lua:1377: in function `styleFunc'
Interface\AddOns\oUF\ouf.lua:413: in function <Interface\AddOns\oUF\ouf.lua:405>
Interface\AddOns\oUF\ouf.lua:484: in function <Interface\AddOns\oUF\ouf.lua:480>
Interface\AddOns\oUF\ouf.lua:534: in function `Spawn'
Interface\AddOns\oUF_D3Orbs\oUF_D3Orbs.lua:1473: in main chunk

Locals: (*temporary) = <unnamed> {
0 = <userdata>
}
(*temporary) = "TOPLEFT"
(*temporary) = <unnamed> {
0 = <userdata>
}
(*temporary) = "TOPLEFT "
(*temporary) = -7
(*temporary) = 7


can someone please say what i did wrong? please...

i have attached a lua file, can someone correct my mistakes, so ui would look like on the images i've attached.

code
oUF_D3Orbs.lua

images
Click image for larger version

Name:	6c14aa0b63c2.jpg
Views:	180
Size:	211.2 KB
ID:	4336
Click image for larger version

Name:	97757f9e2066.jpg
Views:	165
Size:	252.5 KB
ID:	4337
  Reply With Quote
05-30-10, 10:18 PM   #2
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
on line 978:
Code:
back:SetPoint("TOPLEFT",self.Portrait_bgf,"TOPLEFT ",-7,7)
take out the extra space at the end of the second "TOPLEFT"


on line 979:
Code:
back:SetPoint("BOTTOMRIGHT",self.Portrait_bgf,"BOT TOMRIGHT",7,-7)
take out the extra space in the middle of the second "BOTTOMRIGHT"
  Reply With Quote
05-30-10, 10:26 PM   #3
RufferV2K
A Defias Bandit
Join Date: May 2010
Posts: 3
thanx i will try it out now
  Reply With Quote
05-30-10, 10:35 PM   #4
RufferV2K
A Defias Bandit
Join Date: May 2010
Posts: 3
thx, spaces were my problem, now works fine, thx alot)
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » RothUI, need master's of LUA help)


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off