Game Development Community

GuiTextEditCtrl blacked out on simulator

by Jonathan L Bjork · in iTorque 2D · 10/06/2010 (4:41 pm) · 8 replies

Ok, I have been struggling with this GuiTextEditCtrl for a while now. In the simulator, my GuiTextEditCtrl is blacked out, so I cannot see what the text says. Does anyone know how to fix this? Here is the code for my GuiTextEditCtrl:

new GuiTextEditCtrl(textedit1) {
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiTextEditProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "219 395";
Extent = "200 17";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
text = "Login Name";
maxLength = "1024";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "•";
};

#1
10/06/2010 (7:36 pm)
I may have a lead on the cause of the blacked out guitexteditctrl. In the debugger, it says:

Warning: (/Applications/iTorque2D_1_4/MyProjects/keytest3/buildFiles/XCode_iPhone/../../../../engine/source/gui/core/guiTypes.cc @ 365) GuiControlProfile: requested gui profile (GuiTextEditProfile) does not exist.
Warning: (/Applications/iTorque2D_1_4/MyProjects/keytest3/buildFiles/XCode_iPhone/../../../../engine/source/gui/core/guiTypes.cc @ 365) GuiControlProfile: requested gui profile (GuiTextEditProfile) does not exist.
Warning: (/Applications/iTorque2D_1_4/MyProjects/keytest3/buildFiles/XCode_iPhone/../../../../engine/source/gui/core/guiTypes.cc @ 365) GuiControlProfile: requested gui profile (GuiToolboxButtonProfile) does not exist.
Warning: (/Applications/iTorque2D_1_4/MyProjects/keytest3/buildFiles/XCode_iPhone/../../../../engine/source/gui/core/guiTypes.cc @ 365) GuiControlProfile: requested gui profile (GuiTextProfile) does not exist.

How can I make the GuiTextProfile and GuiToolboxButtonProfile exist in the project?
#2
10/06/2010 (7:51 pm)
Try this ... add this to guiProfiles.cs:

if (!isObject(EnterNameEditProfile)) new GuiControlProfile (EnterNameEditProfile) {
	opaque = true;
	fillColor = "255 255 255";
	fillColorHL = "0 0 0 0";
	border = 0;
	//bitmap = "./images/textEdit";
	borderColor = "40 40 40 100";	
	fontColor = "0 255 0";
	fontColorHL = "0 255 0";
	fontColorNA = "0 255 0";
	textOffset = "4 2";
	fontType = "SF Theramin Gothic";
	fontSize = 32;
	autoSizeWidth = false;
	autoSizeHeight = true;
	tab = true;
	canKeyFocus = true;
	justify = "center";
	fontColor = "0 255 0";
	fontColorHL = "0 255 0";
   
};

Now change

Profile = "GuiTextEditProfile";

to

Profile = "EnterNameEditProfile";

#3
10/06/2010 (7:57 pm)
is guiProfiles.cs supposed to be in the resources folder, or in the core folder, or where?
#4
10/06/2010 (7:59 pm)
Mine is in game/gui
#5
10/06/2010 (8:01 pm)
Wow. I don't even have that file at all. Should I make a blank file and put that in it - and exec it when I exec the gui files?
#6
10/06/2010 (8:27 pm)
It should exist somewhere ?!?

Otherwise, as you said.
#7
10/06/2010 (9:08 pm)
OK. That solved the problem with the blacked out text box - I just found the old default GuiTextEditProfile script and installed it in that file, and execed it - its all good. Thanks very much - without your help it would have taken forever to fix.

Here is the GuiTextEditProfile that I ended up using:

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;
};

Now, I just need to figure out why the keyboard script is not returning a value.
#8
10/06/2010 (9:36 pm)
This thread kind of alludes to there being a problem with 1.4:


http://www.torquepowered.com/community/forums/viewthread/115551