Game Development Community

GuiTextEditCtrl

by Alcaros · in Torque Game Engine · 03/14/2007 (12:52 am) · 0 replies

How can I fix this problem ?

I use "Tahoma" font and size = 14
and try "Arial" but it displays same this.

attach picture :
img489.imageshack.us/img489/6350/problem1ps7.jpg
---------
// gui file

new GuiChunkedBitmapCtrl(MainMenu) {
   Profile = "GuiDefaultProfile";
   HorizSizing = "right";
   VertSizing = "bottom";
   position = "0 0";
   Extent = "1024 768";
   MinExtent = "8 2";
   Visible = "1";
   bitmap = "./splash";
   useVariable = "0";
   tile = "0";
   
   new GuiTextCtrl(){
		profile = "GuiTextEditProfile";
		horizSizing = "width";
		vertSizing = "height";
		position = "200 200";
		Extent = "300 300";
		text = "Hello world";
	 };

   new GuiControl() {
         profile = "GuiDefaultProfile";
         horizSizing = "relative";
         vertSizing = "relative";
         position = "392 450";
         Extent = "240 246";
         minExtent = "8 2";
         visible = "1";

	new GuiChunkedBitmapCtrl(){
		profile = "GuiDefaultProfile";
		bitmap = "./logon.png";
		horizSizing = "width";
		vertSizing = "height";
		position = "0 0";
		Extent = "240 246";
		Visible = 1;

		new GuiTextEditCtrl(ConnectUsername){
			profile = "GuiTextEditProfile";
			horizSizing = "width";
			vertSizing = "top";
			position = "80 98";
			Extent = "140 37";
			Visible = 1;
		};

		new GuiTextEditCtrl(ConnectPassword){
			profile = "GuiTextEditProfile";
			horizSizing = "width";
			vertSizing = "top";
			position = "80 123";
			Extent = "140 37";
			Visible = 1;
		};
	};
   };
};
// defaultProfiles.cs

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

if(!isObject(GuiDefaultProfile)) new GuiControlProfile (GuiDefaultProfile)
{
   tab = false;
   canKeyFocus = false;
   hasBitmapArray = false;
   mouseOverSelected = false;

   // fill color
   opaque = false;
   fillColor = ($platform $= "macos") ? "211 211 211" : "192 192 192";
   fillColorHL = ($platform $= "macos") ? "244 244 244" : "220 220 220";
   fillColorNA = ($platform $= "macos") ? "244 244 244" : "220 220 220";

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

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

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

   // bitmap information
   bitmap = ($platform $= "macos") ? "./osxWindow" : "./darkWindow";
   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 = "";
};

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

About the author

Recent Threads