Game Development Community

How do I get rid of the border on a guibitmapctrl object?

by Jereis Zaatri · in iTorque 2D · 07/15/2010 (7:58 am) · 4 replies

How do I get rid of the border on a guibitmapctrl object? There's a thin border along the image.

#1
07/15/2010 (11:10 am)
STEP 1
You need to edit the GUI text file.

Find the text
Profile = "GuiDefaultProfile";

Replace with
Profile = "GuiTransparentProfile";

STEP 2
Append the code to the common/scripts/canvas.cs

new GuiControlProfile (GuiTransparentProfile)
{
   opaque = 0;
   border = 0;
};
#2
07/15/2010 (6:51 pm)
THANKS!!!!
#3
07/15/2010 (8:24 pm)
Now I have another problem...

My profile seems to have no effect.

This doesn't seem to work:

if(!isObject(GuiLabelProfile)) new GuiControlProfile (GuiLabelProfile)
{

// font
fontType = "Arial";
fontSize = 5;

fontColor = "211 0 0";
fontColorHL = "32 100 100";
fontColorNA = "0 0 0";
fontColorSEL= "80 80 80";

// bitmap information
bitmap = "";
bitmapBase = "";
textOffset = "0 0";

// used by guiTextControl
modal = true;
justify = "center";
numbersOnly = false;
cursorColor = "0 0 0 255";
};

and

new GuiTextCtrl(wwqeqwe)
{
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiLabelProfile";
HorizSizing = "relative";
VertSizing = "relative";
Position = "8 3";
Extent = "65 15";
MinExtent = "65 15";
canSave = "1";
Visible = "1";
hovertime = "1000";
text = "WIKKIDEX";
};
#4
07/15/2010 (10:54 pm)
Try this, added border = 0

if(!isObject(GuiLabelProfile)) new GuiControlProfile (GuiLabelProfile)
{

// font
fontType = "Arial";
fontSize = 5;

fontColor = "211 0 0";
fontColorHL = "32 100 100";
fontColorNA = "0 0 0";
fontColorSEL= "80 80 80";

// bitmap information
bitmap = "";
bitmapBase = "";
textOffset = "0 0";

// used by guiTextControl
modal = true;
justify = "center";
numbersOnly = false;
cursorColor = "0 0 0 255";
border = "0";
};


If that does NOT work, try...

new GuiControlProfile (GuiLabelProfile)
{

// font
fontType = "Arial";
fontSize = 5;

fontColor = "211 0 0";
fontColorHL = "32 100 100";
fontColorNA = "0 0 0";
fontColorSEL= "80 80 80";

// bitmap information
bitmap = "";
bitmapBase = "";
textOffset = "0 0";

// used by guiTextControl
modal = true;
justify = "center";
numbersOnly = false;
cursorColor = "0 0 0 255";
border = "0";
};