self:set("backmaterial")

A forum about everything related to the Cafu World Editor CaWE: mapping, editing, scripting, making GUIs and fonts, using the BSP, PVS and Light compilers.
Post Reply
desirefx
Posts:20
Joined:2006-10-03, 05:53
self:set("backmaterial")

Post by desirefx » 2006-10-07, 04:40

I'm trying to understand the syntax for this method.

What file types can be loaded as background images for windows?
What is the path specification to the file? is it relative to where the cgui files are located?
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Post by Carsten » 2006-10-07, 09:42

Hi,

well the "backMaterial" variable (note the capital M, the variables names are case sensitive) takes as a value the name of a MatSys material. This MatSys material will be used for the background of the window.

Please see the MatSys documentation for more details, i.e.
http://www.ca3d-engine.de/wiki/doku.php ... troduction and
http://www.ca3d-engine.de/wiki/doku.php ... mat_manual

Short summary:
You have to create a new .cmat file in the Games/DeathMatch/Materials folder or a subfolder. In this file, define your (GUI background-)materials, then use their names with the set:self("backMaterial", "my/GUI/Material") statement.

By the way:
The Ca3DE GuiSys is pretty new to the engine, and it seems you're its first serious user. ;) So if you experience any problems etc, please let me know - I'd be happy about any feed-back!
Best regards,
Carsten
desirefx
Posts:20
Joined:2006-10-03, 05:53

Post by desirefx » 2006-10-09, 21:27

Question,

The names I use:

Is it the name of the .cmat file? or is it the name of the texture within the .cmat file?

What file types can be used within the cmat file?
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Post by Carsten » 2006-10-10, 14:59

desirefx wrote:Is it the name of the .cmat file?
Nope, name of the material. That is, in the example at http://www.ca3d-engine.de/wiki/doku.php ... mat_manual the name would be Textures/Kai/3r_metpan01
or is it the name of the texture within the .cmat file?
Name of the material, to be precise. ;)
What file types can be used within the cmat file?
png, tga, jpg and bmp, as detailed at http://www.ca3d-engine.de/wiki/matsys:c ... ifications subsection "Map Compositions", point "filename".
;)
Best regards,
Carsten
Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests