Quake4GUI editor


(Splinter) #1

Dunno if anyone noticed yet but I was messing about in the console by pressing a letter the pressing tab to see what comes up and I saw the gui editor it popped up alright and it was called Quake4 gui editor.

And the main question is

How do you use it?

:bash:

Any previous tutorials that relate to quake on how to use it.


(MaddY) #2

good question … can someone tell me how to open .map files ? or .gui files

… MI


(nakedape) #3

Here’s a few quick notes to get you going.

Window > Show Navigator

  • this is akin to Layers in Adobe Photoshop
  • it keeps track of your gui windowDefs, lets you hide and show things for easier editing, shows nested windowDefs hierarchies

Window > Show Transformer

  • no Autobots or Decepticons, but you do get some handy dialogs for directly inputting the origin of the windowDef (x,y) and its size (w,h)

Window > Show Properties

  • displays all the key/value combinations for the selected windowDef
  • you can add keys and edit values

This is a basic .gui:

windowDef Desktop
{
	rect	0,0,640,480
}

The Desktop windowDef is the main parent to everything else in the .gui.
All windowDefs must remain within the Desktops co-ordinates to be visible (much like Macromedia Flash).

If you select Item > New > windowDef you will get a child within the desktop called “unnamed1”.
Your .gui will now look like this:

windowDef Desktop
{
	rect	0,0,640,480
	windowDef unnamed1
	{
		rect	0,0,100,100
		visible	1
	}
}

You can manually enter a new origin or dimensions of the windowDef using the Properties window or you can left-click and drag the windowDef to a new position. Use the little squre handles to change its dimensions.

Double-clicking on the windowDef (or its name in the Navigator) will open up the Item Properties window where you can set all the different parameters of a windowDef. Use the Keys tab to delete any unwanted key/value pairs.

In the main editing window, you can also right-click to bring up the same options found in the main Item menu.

You can “nest” windows within each other using the Item > Arrange > Make Child option.
First select the window to be the parent, then select the window to be the child and click Item > Arrange > Make Child.

Note that the origin of the child will change from being relative to the desktop to being relative to its new parent.
The Quake IV GUI Editor automatically adjusts the child’s origin co-ordinates without moving the visiual position of the child windowDef. This is great for mocking up .gui layouts :slight_smile:

If you manually nest the windowDef in a text editor without the changing the origin, the child will now be offset. The x and y values of the rect key are always relative to its parent (the Desktop being the default parent to all newly created windowDefs).

If you change the parent windowDef’s visibility to 0, you will also hide the children. The visibility key of the children will not change, but since the parent acts like a “container” for the children if you hide the container then the children won’t be visible as well. Likewise, if you move the parent you take the children along for the ride.

Here is an example of basic windowDef nesting:

windowDef Desktop
{
	rect	0,0,640,480
	windowDef blue
	{
		rect	171,134,434,308
		visible	1
		backcolor	0,0,1,1
		windowDef red
		{
			rect	120,22,209,150
			visible	1
			backcolor	1,0,0,1
		}
	}
}

Use Tools > Viewer to open the GUI Viewer window for a preview of the gui.

I suggest copying some of the Doom3 .gui files, renaming them, and playing about with the editor to see how they are structured. Note that any comments in the .gui will be stripped out by the Quake IV GUI Editor, so it’s wise to not muck about with the raw Doom3 .guis unless you want to risk breaking your game.

Good luck :slight_smile:


(Zombie13) #4

Ahh excellent, I needed something like this to give me a kickstart, thanks nakedape

Zombie


(zeh) #5

Zombie: if you want, I’ve also just made online a series of tutorials on GUI scripting and using the official editor on d3w, they may also be of help…

Here (forgive the pimping):

Complete GUI Scripting - 0: A GUI script primer
http://www.doom3world.org/phpbb2/viewtopic.php?t=3127

Complete GUI scripting - 1: Your first GUI script
http://www.doom3world.org/phpbb2/viewtopic.php?t=3128

Complete GUI Scripting - 2: Using the built-in GUI editor
http://www.doom3world.org/phpbb2/viewtopic.php?t=3158

Complete GUI Scripting - 3: Preparing and importing assets (Cake Status Reporter #1)
http://www.doom3world.org/phpbb2/viewtopic.php?t=3241


(Zombie13) #6

Excellent zeh :slight_smile:


(Splinter) #7

Nice one m8 didn’t have a clue what was going on. :clap:


(K^2) #8

It might be easyer for some people to just script the GUI from notepad, without any complex editors. It certainly is for me. The scripting language is straight forward, and if you know JavaScript, Java, or C++, a lot of these things will seem familiar. Even the refferences to subclasses are done with ::, just like in C++. It would be nice to have a list of all default objects and methods somewhere, though.


(TerraForma) #9

r u looking for something like that:

http://junk.stroms.biz/d3_script_index.php

greetz

sry- i dont know its about that GUI-editor too?
- for that english


(K^2) #10

It will certainly help. Thank you.