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
TIA
Simple Line
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
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
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
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
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
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
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
CE.
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
CE.
Who is online
Users browsing this forum: No registered users and 2 guests