Web Browser
by Chad Kilgore · in Torque Game Builder · 02/24/2007 (10:19 pm) · 1 replies
Working off of Prairie Games' web browser addition to TGB (www.garagegames.com/blogs/4280/12359), I've been trying to develop an GUI interface for it. However, I have run into two issues: (1) returning the current URL; and (2) once the mouse clicks the GuiBrowserCtrl, the GuiTextEditCtrl can no longer be editted.
Any ideas how to solve these problems?
Any ideas how to solve these problems?
//--- OBJECT WRITE BEGIN ---
new GuiWindowCtrl(BrowserWindow) {
canSaveDynamicFields = "0";
Profile = "GuiWindowProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "0 0";
Extent = "600 650";
MinExtent = "600 650";
canSave = "1";
Visible = "1";
hovertime = "1000";
maxLength = "1024";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
canMinimize = "1";
canMaximize = "1";
minSize = "50 50";
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "10 26";
Extent = "32 32";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "~/Data/images/go-previous.png";
command = "navigateBack();";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "47 26";
Extent = "32 32";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "~/Data/images/go-next.png";
command = "navigateForward();";
};
new GuiTextEditCtrl(txtURL) {
canSaveDynamicFields = "0";
Profile = "GuiTextEditProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "88 34";
Extent = "480 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
maxLength = "1024";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
altCommand = "navigateTo();";
};
new GuiBitmapButtonCtrl(btnBrowser) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "568 32";
Extent = "22 22";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "~/Data/images/media-playback-start.png";
command = "navigateTo();";
};
new GuiBrowserCtrl(winBrowser) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "12 61";
Extent = "580 580";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
defaultWebPage = "http://www.garagegames.com";
};
};
//--- OBJECT WRITE END ---
function navigateBack()
{
winBrowser.navigateBack();
}
function navigateForward()
{
winBrowser.navigateForward();
}
function navigateTo()
{
winBrowser.navigateTo(txtURL.getText());
}
Torque Owner CDK
I am unable to complie my exe AM I doing something wrong I followed the same instruction as on
http://www.mmoworkshop.com/trac/mom/wiki/TGBBrowser
But still I get the following errors
C:\Program Files\Microsoft Visual Studio 8\VC\include\crtdbg.h(1088) : warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files\Microsoft Visual Studio 8\VC\include\crtdbg.h(1094) : error C2078: too many initializers
BSCMAKE: error BK1506 : cannot open file '..\..\link\release\guiTreeViewCtrl.sbr': No such file or directory
what AM I doing wrong?
If you can assist I would appreciate it very much