User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
guisys:guifiles [2011-06-25 11:53]
Carsten Augmented the text
guisys:guifiles [2011-06-26 10:55]
Carsten Removed now obsolete passages of text
Line 93: Line 93:
  
 The Cafu Engine and the Model Editor load ''​cmdl''​ files as [[http://​www.lua.org/​|Lua]] scripts, and as such they can be inspected or edited in a text editor if desired. The Cafu Engine and the Model Editor load ''​cmdl''​ files as [[http://​www.lua.org/​|Lua]] scripts, and as such they can be inspected or edited in a text editor if desired.
- 
- 
-==== Definition of GUIs: The cgui File Format ==== 
- 
-For each GUI that occurs in Cafu, its definition is stored in a ''​.cgui''​ file. 
-As many other Cafu related files (e.g. ''​.cmat''​ material definition files), these files are simple ASCII text files. 
-Therefore, you can not only conveniently create them with the [[guisys:​guieditor|GUI Editor]], but you can also edit or write them by hand, if necessary even from scratch. 
- 
-The ability to edit GUIs in a text editor and the understanding of the related ''​.cgui''​ file format can be crucial. For example, at the time of writing this text, no graphical GUI Editor existed, and all early Cafu GUIs therefore had to be written by hand. It comes also in helpful if you ever come across a GUI that for some reasons doesn'​t work well or not at all with the [[guisys:​guieditor|GUI Editor]]. More importantly,​ if you just want to make a few quick changes or fixes to a GUI, editing the ''​.cgui''​ files directly can be a lot faster and more convenient than using the [[guisys:​guieditor|GUI Editor]]. 
  
  
Line 157: Line 148:
     end     end
 </​code>​ For a list of the predefined methods of each window that are available to you (e.g. the ''​set()''​ and ''​get()''​ methods above), please refer to section [[guisys:​predefined_methods]]. For a list of methods that the GuiSys expects you to override for customization (e.g. the ''​OnInit()''​ method above), please refer to section [[guisys:​called_methods]]. </​code>​ For a list of the predefined methods of each window that are available to you (e.g. the ''​set()''​ and ''​get()''​ methods above), please refer to section [[guisys:​predefined_methods]]. For a list of methods that the GuiSys expects you to override for customization (e.g. the ''​OnInit()''​ method above), please refer to section [[guisys:​called_methods]].
-  - The final step is the addition of the contents of all the ''​script { ... }''​ blocks. The scripts may now access and use all of the above mentioned variables/​tables/​objects/​interfaces,​ and in fact they often look very much like the example snippet that I provided in the previous step. 
  
 Only after these steps is the initialization of a GUI script complete. The GuiSys then compiles each script and calls the ''​OnInit()''​ method for each window. Only after these steps is the initialization of a GUI script complete. The GuiSys then compiles each script and calls the ''​OnInit()''​ method for each window.
guisys/guifiles.txt ยท Last modified: 2017-02-21 11:42 by Carsten