Thread Tools Display Modes
01-25-12, 05:40 AM   #1
skarie
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Jun 2011
Posts: 37
Tiled Background!

Hello,

I am trying to create a top panel with tiled background graphics. So far I got.

Code:
 local toppanel = CreateFrame("Frame",nil,UIParent)
 toppanel:SetWidth(1920)
 toppanel:SetHeight(16)
 toppanel:SetPoint("TOP",0,0)
toppanel:SetBackdrop({
	bgFile = "Interface\\ACHIEVEMENTFRAME\\UI-Achievement-Tsunami-Horizontal.png",
	tile = true,
	tileSize = 16

})
Given that the image I am using is 512 x 16 (w x h), is there a way that I could make it work?

I could have created several frame spanning across top edge and each frame would hold only one bgfile.

Also, am i correct to think that by defining edgeSize, you are indeed slicing a square ( tileSizex tileSize) from the bgfile and populate it to fit the entire backdrop frame?

Thanks for the help.

Edit: change edgeSize to tileSize

Last edited by skarie : 01-25-12 at 04:57 PM. Reason: typo
  Reply With Quote
01-25-12, 01:36 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
edgeSize is for the size of your edge - your border.
http://wowprogramming.com/docs/widge...me/SetBackdrop
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
01-25-12, 05:00 PM   #3
skarie
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Jun 2011
Posts: 37
Originally Posted by Seerah View Post
edgeSize is for the size of your edge - your border.
http://wowprogramming.com/docs/widge...me/SetBackdrop
Thanks for the reference. I've read it; but still dont quite understand how tileSize works. I think I am having one of those "blond" moment. i don't want the frame to have any edge just the backdrop. Any further tips or advice?
  Reply With Quote
01-25-12, 05:29 PM   #4
Animor
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Mar 2011
Posts: 136
tilesize is for making squares of your bgFile (with the width and height of the tileSize value) and fill the frame BG with those squares.

I think that in your example it won't work properly since your bgFile is not meant to fill a big square frame, it's horizontal.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Tiled Background!


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