hi guys..
now i am doing a chat bubble, the bubble has a round or elliptical frame. this frame is the frame of a FrameWindow, and it also has a yellow color background. since my frame has four round corners, the squarish background will go out of the frame at the corners, anybody got any idea how to fit the background with the frame nicely ?? thanks alooooooooot
round frame corner problem
Moderators: CEGUI MVP, CEGUI Team
There's a post about that somewhere in these forums. What I remember from it is that right now Cegui uses rectangular regions for everything. In order to have your text fit within your rounded corners you have to shrink the inner portion of the frame. This would be within the .looknfeel file.
Open TaharezLook.looknfeel. The first item is TaharezLook/Button. The first ImagerySection defines the label at absolute positions (0,0) and a width and height of 100%. Then it defines the edges the same way. If your corner are rounded then a portion of the label would stick out from the corners.
I also plan on using rounded corners so will face that same problem. My plan is to create my own looknfeel. The corners will have fixed height width, determined by the image height and width. The "label" part would then have:
Hopefully this makes sense.
Open TaharezLook.looknfeel. The first item is TaharezLook/Button. The first ImagerySection defines the label at absolute positions (0,0) and a width and height of 100%. Then it defines the edges the same way. If your corner are rounded then a portion of the label would stick out from the corners.
I also plan on using rounded corners so will face that same problem. My plan is to create my own looknfeel. The corners will have fixed height width, determined by the image height and width. The "label" part would then have:
- left: 0 + image width
- top: 0 + image height
- width: widget width - image width - image width
- height: widget height - image heigh - image height
Hopefully this makes sense.
From Vanilla.imageset:
I take this to mean that the top left corder is a 6x6 pixel image.
From Vanilla.looknfeel:
I would have expected the BottomEdge to have an offset of -6 rather than -4. I would also have expected LeftEdge and TopEdge to have an offset="+6" and the RightEdge to have an offset="-6" rather than nothing.
Code: Select all
<Image Name="FrameTopLeft" XPos="1" YPos="1" Width="6" Height="6" />
I take this to mean that the top left corder is a 6x6 pixel image.
From Vanilla.looknfeel:
Code: Select all
<WidgetLook name="Vanilla/Button">
<ImagerySection name="label">
<TextComponent>
<Area>
<Dim type="LeftEdge">
<AbsoluteDim value="0" />
</Dim>
<Dim type="TopEdge">
<AbsoluteDim value="0" />
</Dim>
<Dim type="RightEdge">
<UnifiedDim scale="1" type="RightEdge" />
</Dim>
<Dim type="BottomEdge">
<UnifiedDim scale="1" offset="-4" type="BottomEdge" />
</Dim>
</Area>
I would have expected the BottomEdge to have an offset of -6 rather than -4. I would also have expected LeftEdge and TopEdge to have an offset="+6" and the RightEdge to have an offset="-6" rather than nothing.
Return to “Offtopic Discussion”
Who is online
Users browsing this forum: No registered users and 8 guests