Author Topic: [solved]GuIBitmapBorderCtrl with 1px wide border?  (Read 1203 times)

I want to create a bitmap border ctrl with a one pixel wide border, to archieve a nice bevel effect on white style guis.
However, it does only seem to work with 2px wide borders.

Code that creates the profiles:
Code: [Select]
if(!isobject(StripeBorderProfile))
new GuiControlProfile(StripeBorderProfile : GuiBitmapBorderProfile) {bitmap = "Add-Ons/Client_ZGUI/images/stripeArray";hasbitmaparray = 1;};
if(!isobject(StripeBorderProfile2))
new GuiControlProfile(StripeBorderProfile2 : GuiBitmapBorderProfile) {bitmap = "Add-Ons/Client_ZGUI/images/stripeArray2";hasbitmaparray = 1;};
(I attached the images)

How they look in-game:
The one on the left is one pixel wide, the one on the right two.
Notice how the one pixel wide one is completely messed up and red.

I can't just use the 2px wide one because when I place a swatch in it so it overlaps it one pixel, nothing will happen, the swatch doesn't overlap it.

How can I archieve a one pixel wide bitmap border ctrl?
« Last Edit: April 27, 2013, 08:08:12 AM by Zeblote »


Post the information on that specific GUI bitmap. (from the .gui folder)

Post the information on that specific GUI bitmap. (from the .gui folder)
I attached the images



I attached the images
Those are images of the bitmap. I want the exact code for that bitmap in your .GUI file.

Those are images of the bitmap. I want the exact code for that bitmap in your .GUI file.
I just created two new guibitmapborderctrls in gui editor, using the profiles I put in the OP

Have you tried this?
Quote
if(!isobject(StripeBorderProfile))
   new GuiControlProfile(StripeBorderProfile : GuiBitmapBorderProfile) { borderThickness = 0; };


Just don't bother with GuiBitmapBorderCtrl in this instance. Use swatch controls instead:



The green is swatch 1 to represent the light bevelled edges, the blue is swatch 2 inset into swatch 1 that represents the dark bevelled edges and then the red is swatch 3 inset into swatch 2 which is color filled to whatever you need and holds the content. It uses an extra control but big deal, unless you're doing this on the scale of thousands it's not going to impact much.

Use the appropriate horiz and vert sizings and it'll scale and move like you'd made it using a bitmap border control.