Gui's
by Nathan Cox · in Torque Game Engine · 09/11/2007 (10:15 am) · 11 replies
Hi again! Im such a noob at this....
I need to know how to make GUI's, like tutorial or something. If not, could you make me a script that brings up a gui with 6 buttons, an input textbox and a submit button next to the textbox.
I need to know how to make GUI's, like tutorial or something. If not, could you make me a script that brings up a gui with 6 buttons, an input textbox and a submit button next to the textbox.
About the author
#2
09/12/2007 (3:12 am)
I dont hav the GUI editor. I meant by making one using script e.g new Guitextcontrol();or something.
#3
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6482
09/12/2007 (3:40 am)
The scripts that define GUIs are cleverly named *.gui, so you could look in any of them to see how it's done in script. www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6482
#4
09/12/2007 (10:11 am)
That is NOT what im looking for!! I've seen ppl make cs files that generate gui's. Here is an extract from one of those scripts:new GuiControl(F8ZoomGui) {
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "640 480";
MinExtent = "8 2";
Visible = "1";
new GuiWindowCtrl() {
Profile = "GuiWindowProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "201 100";
Extent = "152 135";
MinExtent = "8 2";
Visible = "1";
text = "F8 / Zoom";
maxLength = "255";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
#5
09/12/2007 (10:28 am)
Sorry, I guess I don't understand what you're looking for. As far as I know, the example code you posted is the sort of thing that would be found in a script with a name ending in .gui, by convention.
#6
If you HAVE TGE, you HAVE the GUI editor.
Build your GUI, save it.
Load the GUI file you saved into any text editor.
add something like:
COPY the FULL function, and just for the sake of fast testing, PAST it at the TOP of the file GAME.CS, now execute TGE, use the console and enter buildgui(); to test it out...
09/12/2007 (10:48 am)
I dont hav the GUI editor. I meant by making one using script e.gIf you HAVE TGE, you HAVE the GUI editor.
Build your GUI, save it.
Load the GUI file you saved into any text editor.
add something like:
function buildgui(%this)
{
GUI STUFF FROM YOUR FILE....
}COPY the FULL function, and just for the sake of fast testing, PAST it at the TOP of the file GAME.CS, now execute TGE, use the console and enter buildgui(); to test it out...
#7
Just to add one more more fun possibility to the already excellent ideas posted by Caylo and others . . .
You can embed your GUI creation commands/script snippets into your individual mission files to force a different GUI for each mission/world.
For example, if one mission was a SCUBA themed underwater environment, you could create all the necessary gauges and displays and have them load up only with that mission. If another mission was focused on flying a shuttle craft from a space station through a debris field to a star cruiser, you could build those GUI elements - on the fly - just for that mission.
That's not what you asked for, but it might give you some ideas that could prove useful later on.
09/12/2007 (12:51 pm)
Nathan,Just to add one more more fun possibility to the already excellent ideas posted by Caylo and others . . .
You can embed your GUI creation commands/script snippets into your individual mission files to force a different GUI for each mission/world.
For example, if one mission was a SCUBA themed underwater environment, you could create all the necessary gauges and displays and have them load up only with that mission. If another mission was focused on flying a shuttle craft from a space station through a debris field to a star cruiser, you could build those GUI elements - on the fly - just for that mission.
That's not what you asked for, but it might give you some ideas that could prove useful later on.
#8
FULL STOP "." END OF STORY!!!
sorry about that! I dont like nagging and plz answer my question not state that i use other pls answers wen they are no use to me! Now, on the positive note, plz answer my question.
09/13/2007 (3:10 am)
I DONT HAVE A GUI EDITOR!!!!FULL STOP "." END OF STORY!!!
sorry about that! I dont like nagging and plz answer my question not state that i use other pls answers wen they are no use to me! Now, on the positive note, plz answer my question.
#9
Torque's GUI editor is built in and included with the demo so that's why people are struggling to understand why you don't have access to it. Perhaps you'd care to explain, are you modding a game or something?
Either way, most people use the GUI editor, they don't solely script their GUI's. They might make some scripting adjustments after they have created the basics with the editor but they don't start from scratch with script.
So for whatever bizarre reason you don't have the GUI editor, that doesn't stop you from downloading the demo and obtaining it for free. You're not asking a question by the way, your opening post is asking for someone to write a very specific GUI for you. I can't see why you can't do it yourself, don't expect other people to write your GUI's for you.
09/13/2007 (3:32 am)
My God you're rude.Torque's GUI editor is built in and included with the demo so that's why people are struggling to understand why you don't have access to it. Perhaps you'd care to explain, are you modding a game or something?
Either way, most people use the GUI editor, they don't solely script their GUI's. They might make some scripting adjustments after they have created the basics with the editor but they don't start from scratch with script.
So for whatever bizarre reason you don't have the GUI editor, that doesn't stop you from downloading the demo and obtaining it for free. You're not asking a question by the way, your opening post is asking for someone to write a very specific GUI for you. I can't see why you can't do it yourself, don't expect other people to write your GUI's for you.
#10
BUT im not going to type it- instead im going to THINK it!
If you cant pick up my thought waves then thats just too bad..... FULL STOP "." END OF STORY!!!
Oh and just a tinny clue; I get the feeling you need to explore Torque more before trying to do anything with it.
EDIT: Also if your really into making a game, why dont you shell out the cash and get the full Torque? You also gain assess to more Forums, and loads of helpfull information. Not to mention I would be more willing to help, even if you seem like an Jerk.
FULL STOP "." END OF STORY!!!
09/13/2007 (10:28 am)
Im answering your questing, even giving you the code you need.... BUT im not going to type it- instead im going to THINK it!
If you cant pick up my thought waves then thats just too bad..... FULL STOP "." END OF STORY!!!
Oh and just a tinny clue; I get the feeling you need to explore Torque more before trying to do anything with it.
EDIT: Also if your really into making a game, why dont you shell out the cash and get the full Torque? You also gain assess to more Forums, and loads of helpfull information. Not to mention I would be more willing to help, even if you seem like an Jerk.
FULL STOP "." END OF STORY!!!
#11
09/18/2007 (4:07 am)
Lololololololol! im modding a game that's why! Ive downloaded the demo! *locked*
Torque Owner Aaron E
Default Studio Name
That gets you into the GUI editor. Assuming that you are at the mainmenugui, you can then click on the New Control drop down list box. There's a *ton* of controls in there. Some of them are context-limited, meaning if you stick a guiHealthBar control on the main page, it will be empty. Same holds true for any of the TSedit controls.
Try adding several new controls and then fiddling with their parameters in object view panel (below the structured tree-view panel on the right side of your GUI editing screen.
From your post, I would suggest looking into the following controls from the New Control list . . .
GuiButtonCtrl (create, name, resize, relocate and code) - Repeat 5x times.
GuiTextEditCtrl (create, name, fill in some text (or not), resize, relocate, and add a variable reference to it)
GuiButtonCtrl (same first, but you'll need to figure out how to code the command statement to do what you want.)
If I've understood what you're asking for, that should help you out. I'm fuzzy on what you mean by having a "Submit" button next to the text box. If you're sending stuff out on the Interweb, that might take a bit of research to get working the way you want.