Quantcast
How to draw an horizontal line? - WoWInterface
Thread Tools Display Modes
12-23-12, 01:58 PM   #1
Spyro
A Fallenroot Satyr
 
Spyro's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2011
Posts: 20
Question How to draw an horizontal line?

Hi, I want to make a header like the ones on this image, but I have no idea on how to draw that horizontal line:

It's an small addon so I'm using no libs, just XML and default API.
Anybody knows how to do it?
  Reply With Quote
12-23-12, 02:01 PM   #2
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Use CreateTexture(). Example:

Lua Code:
  1. local line = f:CreateTexture()
  2. line:SetTexture(.6 ,.6, .6, .2)
  3. line:SetSize(100, 1)
  4. line:SetPoint("CENTER", f)

Where f is the name of your frame.
  Reply With Quote
12-23-12, 02:10 PM   #3
Spyro
A Fallenroot Satyr
 
Spyro's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2011
Posts: 20
Thumbs up

Thx for the instant response
  Reply With Quote
05-14-20, 07:46 AM   #4
LudiusMaximus
A Chromatic Dragonspawn
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 193
This does not seem to work any more.
The following is how it can be done.

Code:
local line = f:CreateTexture()
line:SetTexture("Interface/BUTTONS/WHITE8X8")
line:SetColorTexture(.6 ,.6, .6, .2)
line:SetSize(100, 1)
line:SetPoint("CENTER")
__________________
~ Be the change you want to see in the world... of warcraft interface! ~

Last edited by LudiusMaximus : 05-14-20 at 12:35 PM.
  Reply With Quote
05-14-20, 11:00 AM   #5
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,230
There is now a line widget CreateLine.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
05-14-20, 11:49 AM   #6
LudiusMaximus
A Chromatic Dragonspawn
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 193
Originally Posted by Fizzlemizz View Post
There is now a line widget CreateLine.
Wow, even better!

See also: https://wow.gamepedia.com/Widget_API#Line
__________________
~ Be the change you want to see in the world... of warcraft interface! ~

Last edited by LudiusMaximus : 05-14-20 at 12:34 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » How to draw an horizontal line?

Thread Tools
Display Modes

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