Simple Line

Help and discussion regarding skinning, themes, and other artistic content.

Moderators: CEGUI MVP, CEGUI Team

Ninja
Quite a regular
Quite a regular
Posts: 86
Joined: Sun Aug 20, 2006 11:42

Simple Line

Postby Ninja » Tue Apr 22, 2008 16:57

Hi Guys

How can i make a simple Line i mean i can add a line graphic to my imageset but what do i need to add after that is where i'am stuck :oops:


TIA

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Tue Apr 22, 2008 18:30

Hi,

It very much depends on exactly what you want to do and how you intend to use the 'line'.

If for example your desire is to be able to draw line of some kind between two arbitrary points, this will be very difficult to achieve unless the lines are perfectly vertical or perfectly horizontal - even then you may need a separate image for each direction. This is because in all versions released so far there is no support for actual drawing operations, we just support rendering 'brushes' - either scaled or tiled.

Anyhow, let us know what you're actually trying to do :)

CE

Ninja
Quite a regular
Quite a regular
Posts: 86
Joined: Sun Aug 20, 2006 11:42

Postby Ninja » Wed Apr 23, 2008 08:24

Hiya CrazyEddie

All i'am basically after is a line seperator for example i have a window and want to cut that into two sections top and bottom defined by a sepeating line if that makes sense.

GroupBox could do this and i have used it in another window but for this window its a bit of overkill to use that.


TIA

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Thu Apr 24, 2008 18:37

Hi,

All you need to do is render the image for the line, stretched across the desired width.

How you actually do that may be a matter for debate...

- You could add it as an ImageryComponent in the skin definition.
- You could create a custom window renderer to extract some info from a property to draw the line(s).
- You could subscribe the the events for rendering started / ended and draw the lines yourself, manually (never tried this, in some of the stuff I've been looking at I'm not happy with when or how often these events are fired, so this solution is probably a bad idea :) ).

No time for specific examples at the moment - sorry :oops:

CE.

Ninja
Quite a regular
Quite a regular
Posts: 86
Joined: Sun Aug 20, 2006 11:42

Postby Ninja » Thu May 01, 2008 12:28

Hiya

sorry for the delay in answering was my week for kids :D

thanks for the clearing that up


Return to “Skins and Themes”

Who is online

Users browsing this forum: No registered users and 1 guest