$Gui::fontCacheDirectory = expandFilename("./cache");
$Gui::clipboardFile      = expandFilename("./cache/clipboard.gui");

// GuiDefaultProfile is a special case, all other profiles are initialized
// to the contents of this profile first then the profile specific
// overrides are assigned.
if (!isObject(GuiDefaultProfile)) new GuiControlProfile( GuiDefaultProfile )
{
   tab = false;
   canKeyFocus = false;
   hasBitmapArray = false;
   mouseOverSelected = false;

   // fill color
   opaque = false;
   fillColor = "211 211 211";
   fillColorHL = "244 244 244";
   fillColorNA = "244 244 244";

   // border color
   border = false;
   borderColor   = "0 0 0";
   borderColorHL = "128 128 128";
   borderColorNA = "64 64 64";

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

   fontColor = "0 0 0";
   fontColorHL = "32 100 100";
   fontColorNA = "0 0 0";
   fontColorSEL= "200 200 200";

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

   // used by guiTextControl
   modal = true;
   justify = "left";
   autoSizeWidth = false;
   autoSizeHeight = false;
   returnTab = false;
   numbersOnly = false;
   cursorColor = "0 0 0 255";

   // sounds
   soundButtonDown = "";
   soundButtonOver = "";
};

new GuiCursor(DefaultCursor)
{
   hotSpot = "0 0";
   bitmapName = "./cursorBlackArrow";
};

if (!isObject(GuiDarkBlue)) new GuiControlProfile( GuiDarkBlue )
{
   opaque = true;
   fillColor = "0 0 128";
};

if (!isObject(GuiTextProfile)) new GuiControlProfile( GuiTextProfile )
{
   fontType = "Arial Rounded MT Bold";
   fontSize = 19;
   fontColor = "255 255 255";
   autoSizeWidth = true;
   autoSizeHeight = true;
};

//
// Everything below here is to make sure the Console works
//

if (!isObject(GuiInputCtrlProfile)) new GuiControlProfile( GuiInputCtrlProfile )
{
   tab = true;
   canKeyFocus = true;
};

if (!isObject(GuiWindowProfile)) new GuiControlProfile( GuiWindowProfile )
{
   opaque = true;
   border = 2;
   fillColor = "211 211 211";
   fillColorHL = "190 255 255";
   fillColorNA = "255 255 255";
   fontColor = "0 0 0";
   fontColorHL = "200 200 200";
   text = "GuiWindowCtrl test";
   bitmap = "./uiWindow";
   textOffset = "5 5";
   hasBitmapArray = true;
   justify = "center";
};

if (!isObject(GuiButtonProfile)) new GuiControlProfile( GuiButtonProfile )
{
   opaque = true;
   border = true;
   fontColor = "0 0 0";
   fontColorHL = "32 100 100";
   fixedExtent = true;
   justify = "center";
	canKeyFocus = false;
};

if (!isObject(GuiScrollProfile)) new GuiControlProfile (GuiScrollProfile)
{
   opaque = true;
   fillColor = "255 255 255";
   border = 3;
   borderThickness = 2;
   borderColor = "0 0 0";
   bitmap = "./uiScroll";
   hasBitmapArray = true;
};

if (!isObject(VirtualScrollProfile)) new GuiControlProfile( VirtualScrollProfile : GuiScrollProfile );

if (!isObject(GuiSliderProfile)) new GuiControlProfile( GuiSliderProfile );

if (!isObject(GuiTextEditProfile)) new GuiControlProfile( GuiTextEditProfile )
{
   opaque = true;
   fillColor = "255 255 255";
   fillColorHL = "128 128 128";
   border = 3;
   borderThickness = 2;
   borderColor = "0 0 0";
   fontColor = "0 0 0";
   fontColorHL = "255 255 255";
   fontColorNA = "128 128 128";
   textOffset = "0 2";
   autoSizeWidth = false;
   autoSizeHeight = true;
   tab = true;
   canKeyFocus = true;
};

if (!isObject(GuiControlListPopupProfile)) new GuiControlProfile( GuiControlListPopupProfile )
{
   opaque = true;
   fillColor = "255 255 255";
   fillColorHL = "128 128 128";
   border = true;
   borderColor = "0 0 0";
   fontColor = "0 0 0";
   fontColorHL = "255 255 255";
   fontColorNA = "128 128 128";
   textOffset = "0 2";
   autoSizeWidth = false;
   autoSizeHeight = true;
   tab = true;
   canKeyFocus = true;
   bitmap = "./uiScroll";
   hasBitmapArray = true;
};

if (!isObject(GuiTextArrayProfile)) new GuiControlProfile( GuiTextArrayProfile : GuiTextProfile )
{
   fontColorHL = "32 100 100";
   fillColorHL = "200 200 200";
};

if (!isObject(GuiConsoleProfile)) new GuiControlProfile ( GuiConsoleProfile )
{
   fontType = "Lucida Console";
   fontSize = 14;
   fontColor = "0 0 0";
   fontColorHL = "130 130 130";
   fontColorNA = "255 0 0";
   fontColors[6] = "50 50 50";
   fontColors[7] = "50 50 0";  
   fontColors[8] = "0 0 50"; 
   fontColors[9] = "0 50 0";   
};
