View Single Post
02-23-10, 02:03 PM   #16
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
I use the following for my frame backdrops. I haven't needed to use them for anything else yet but here goes:

BackDrop = {
bgFile = "Interface/Tooltips/UI-Tooltip-Background",
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
tile = true,
tileSize = 16,
edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 }
}

Also, I spotted the following errors when trying to direct copy the lua to my addon.

Code:
[2010/02/23 19:43:11-892-x1]: ScrollingWatchFrame-1.01.01\SWF_SlashCommands.lua:74: attempt to call method 'SetTopLevel' (a nil value)
ScrollingWatchFrame-1.01.01\SWF_SlashCommands.lua:315: in function `value'
Interface\FrameXML\ChatFrame.lua:3573: in function <Interface\FrameXML\ChatFrame.lua:3505>:
<in C code>: in function `ChatEdit_ParseText'
Interface\FrameXML\ChatFrame.lua:3221: in function `ChatEdit_SendText':
Interface\FrameXML\ChatFrame.lua:3245: in function `ChatEdit_OnEnterPressed':
<string>:"*:OnEnterPressed":1: in function <[string "*:OnEnterPressed"]:1>
The line in question is this:
frmOption:SetTopLevel(true)
Removed the line to bypass error.

Code:
[2010/02/23 19:46:53-893-x1]: ScrollingWatchFrame-1.01.01\SWF_SlashCommands.lua:82: attempt to call global 'CreateFontString' (a nil value)
ScrollingWatchFrame-1.01.01\SWF_SlashCommands.lua:315: in function `value'
Interface\FrameXML\ChatFrame.lua:3573: in function <Interface\FrameXML\ChatFrame.lua:3505>:
<in C code>: in function `ChatEdit_ParseText'
Interface\FrameXML\ChatFrame.lua:3221: in function `ChatEdit_SendText':
Interface\FrameXML\ChatFrame.lua:3245: in function `ChatEdit_OnEnterPressed':
<string>:"*:OnEnterPressed":1: in function <[string "*:OnEnterPressed"]:1>

  ---
Line in question generated by code is as follows:
frmOption.fsWidth = CreateFontString("frmOptionfsWidth","OVERLAY",frmOption)
This needs to be changed to
frmOption.fsWidth = frmOptions:CreateFontString("frmOptionfsWidth","OVERLAY",frmOption)
for this error to be bypassed

Code:
[2010/02/23 19:49:50-894-x1]: ScrollingWatchFrame-1.01.01\SWF_SlashCommands.lua:85: frmOptionfsWidth:SetText(): Font not set
ScrollingWatchFrame-1.01.01\SWF_SlashCommands.lua:85: in function `Interface'
ScrollingWatchFrame-1.01.01\SWF_SlashCommands.lua:315: in function `value'
Interface\FrameXML\ChatFrame.lua:3573: in function <Interface\FrameXML\ChatFrame.lua:3505>:
<in C code>: in function `ChatEdit_ParseText'
Interface\FrameXML\ChatFrame.lua:3221: in function `ChatEdit_SendText':
Interface\FrameXML\ChatFrame.lua:3245: in function `ChatEdit_OnEnterPressed':
<string>:"*:OnEnterPressed":1: in function <[string "*:OnEnterPressed"]:1>

  ---
Line in question in my addon :
frmOption.fsWidth:SetFont("Fonts\FRIZQT__.TTF",10)
needs to be changed to
frmOption.fsWidth:SetFont("Fonts\\FRIZQT__.TTF",10)
For it to bypass that error.

Resulting screen display with no other code changes on my point is as follows:

It did speed up the design of the options screen but there is a lot of duplicated code there and as you can see doesn't quite work the way I planned it to work. Not sure if I will use this in the long run as I tend to make reusable functions to do this stuff for me but designing wise it may come in useful. Only time will tell.

Hopefully the above changes can be worked in somewhere and if I can easily correct the visual result in a way you can implement then I will let you know what I did to correct the problems. But grats on a useful feature as I am sure there are tons of people that will benefit more in the long run.

Oh, and if all the posting above wasn't a guide I do all my coding in lua so perhaps the xml side of things are working very well in comparison.

And also, I will add that apart from the name and text fields I didn't do any alterations inside the visual designer, so if that is the cause of the above problems that's great I actually forgot I hadn't done that but I'm not sure setting values for the sliders would fix the layout of the fontstrings which I suspect are due to the fact that they are art elements more than objects. I usually manage to tie them to a physical object and move them that way.
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_022310_195555.jpg
Views:	1249
Size:	247.7 KB
ID:	3996  
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 02-23-10 at 02:07 PM.
  Reply With Quote