This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
guisys:guifiles [2011-06-27 11:56] Carsten Removed more obsolete passages of text |
guisys:guifiles [2011-06-28 10:12] Carsten minor revision |
||
---|---|---|---|
Line 24: | Line 24: | ||
* makes packaging a complete GUI in a ''my_GUI.zip'' archive possible, so that the GUI can easily and safely be distributed, shipped and handled. | * makes packaging a complete GUI in a ''my_GUI.zip'' archive possible, so that the GUI can easily and safely be distributed, shipped and handled. | ||
- | The name of the directory should match the file name of the GUI. That is, if your GUI's name is ''CallLift_init.cgui'' and ''CallLift_main.cgui'', it should be stored in a directory with the same name ''CallLift/'' (or in a zip archive with the same base name ''CallLift.zip''). | + | The name of the directory should match the file name of the GUI. That is, if your GUI's file names are ''CallLift_init.cgui'' and ''CallLift_main.cgui'', it should be stored in a directory with the same name ''CallLift/'' (or in a zip archive with the same base name ''CallLift.zip''). |
Note that when you are saving a new GUI that does not yet have a separate directory, you can use the "New Folder" button (or right-click context menu) of the "Save" dialog to create such new directories as required. | Note that when you are saving a new GUI that does not yet have a separate directory, you can use the "New Folder" button (or right-click context menu) of the "Save" dialog to create such new directories as required. | ||
Line 90: | Line 90: | ||
* The connection between the two files is made by the ''dofile()'' statement. | * The connection between the two files is made by the ''dofile()'' statement. | ||
- | \\ | + | You can find examples of this technique at http://trac.cafu.de/browser/cafu/trunk/Games/DeathMatch/GUIs |
- | ^ Tip by the Cafu development team: ^ | + | |
- | | The ''Games/DeathMatch/GUIs/MainMenu/MainMenu(_init).cgui'' files that are natively included with Cafu are prime examples of this technique. | | + | |
- | + | ||
- | Future versions of the GUI Editor may even mildly enforce the two-files approach, where one file has the normal file name and its "twin" gets the ''_init'' suffix automatically appended. This helps e.g. to prevent accidental overwrites when you happen to load ''CallLift.cgui'' into the GUI Editor instead of ''CallLift_init.cgui''. | + | |