<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.thedarkmod.com/index.php?action=history&amp;feed=atom&amp;title=GUI_Scripting%3A_Names_%26_Case_Sensitivity</id>
	<title>GUI Scripting: Names &amp; Case Sensitivity - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.thedarkmod.com/index.php?action=history&amp;feed=atom&amp;title=GUI_Scripting%3A_Names_%26_Case_Sensitivity"/>
	<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=GUI_Scripting:_Names_%26_Case_Sensitivity&amp;action=history"/>
	<updated>2026-04-30T09:37:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=GUI_Scripting:_Names_%26_Case_Sensitivity&amp;diff=30071&amp;oldid=prev</id>
		<title>Geep: Add category tag</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=GUI_Scripting:_Names_%26_Case_Sensitivity&amp;diff=30071&amp;oldid=prev"/>
		<updated>2022-11-04T16:08:30Z</updated>

		<summary type="html">&lt;p&gt;Add category tag&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:08, 4 November 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l74&quot;&gt;Line 74:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 74:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;With &amp;quot;onNamedEvent&amp;quot;, a case-insensitive comparison is made, between the name used in the GUI and the event name raised in the .script or cpp code&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;With &amp;quot;onNamedEvent&amp;quot;, a case-insensitive comparison is made, between the name used in the GUI and the event name raised in the .script or cpp code&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{GUI}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Geep</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=GUI_Scripting:_Names_%26_Case_Sensitivity&amp;diff=29891&amp;oldid=prev</id>
		<title>Geep: create this article</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=GUI_Scripting:_Names_%26_Case_Sensitivity&amp;diff=29891&amp;oldid=prev"/>
		<updated>2022-10-04T19:36:34Z</updated>

		<summary type="html">&lt;p&gt;create this article&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;This page is part of a series. See [[GUI Scripting Language]] for overview.&amp;#039;&amp;#039;&lt;br /&gt;
==Quick Take==&lt;br /&gt;
* Names of things follow the usual C-language rules.&lt;br /&gt;
* Keywords - of the GUI scripting language and of preprocessor directives - are case-sensitive. Get it wrong... parsing will fail.&lt;br /&gt;
* Other names are case-insensitive.&lt;br /&gt;
* There are important naming and casing conventions.&lt;br /&gt;
* Case-sensitivity of the string values of directives and properties depends on where they are used.&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;What follows is organized in terms of where a name is first encountered in a GUI file, but also may include information about how the name might be later referenced, i.e., in the body of an event handler.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
===Preprocessor Directives - Keywords &amp;amp; Values===&lt;br /&gt;
&lt;br /&gt;
A directive keyword (e.g., starts with &amp;quot;#&amp;quot;, like &amp;quot;#defined&amp;quot;) MUST be lower case. #defined names are case-sensitive and uppercase (with underscores) by convention. A quoted string value is stored as is, with the expectation the value will be appropriate where later used. Example:&lt;br /&gt;
 #define INV_GUI_FONT &amp;quot;fonts/stone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===guiDefs - Type Keywords &amp;amp; Names===&lt;br /&gt;
&lt;br /&gt;
Types of guiDef are case sensitive. Keywords like &amp;quot;windowDef&amp;quot; need to be entered exactly to avoid crashes.&lt;br /&gt;
&lt;br /&gt;
A windowDef is always at the top-level (i.e., starts the GUI), and by convention should be named &amp;quot;Desktop&amp;quot; (unless perhaps this is a non-overlay applied to a world object surface).&lt;br /&gt;
&lt;br /&gt;
The names you give to guiDefs (unique within the GUI at hand) are up to you. The most common convention is camel-case, no underscores, and starting with a capital letter:&lt;br /&gt;
  windowDef SettingsCategories&lt;br /&gt;
Another common style is the same, but starting with lower case:&lt;br /&gt;
  windowDef rightPageCurl&lt;br /&gt;
Other styles are rare:&lt;br /&gt;
  windowDef statistics_select&lt;br /&gt;
  windowDef backgroundsingle&lt;br /&gt;
&lt;br /&gt;
As just seen, no double-quotes are around the name when it is so declared. It will always be within a quoted string when referenced elsewhere.&lt;br /&gt;
&lt;br /&gt;
A reference to the name of a guiDef is not case sensitive. For example given a windowDef named InventoryItemIcon:&lt;br /&gt;
  resetTime &amp;quot;inventoryitemicon&amp;quot; 0; // OK in onTime handler&lt;br /&gt;
  set &amp;quot;Debug::text&amp;quot; &amp;quot;$inventoryitemicon::myval&amp;quot;; // OK in event handler, where Debug is another windowDef and myval is a user variable in InventoryItemIcon. &amp;quot;$&amp;quot; tells &amp;quot;set&amp;quot; to use value, not literal string.&lt;br /&gt;
&lt;br /&gt;
Nevertheless, it is recommended that you be consistent, as if it were case sensitive.&lt;br /&gt;
&lt;br /&gt;
===Property Names===&lt;br /&gt;
&lt;br /&gt;
The designers of properties followed a strong convention to use all lower case names, without underscores. Surprisingly, a property name is not case sensitive. During initialization:&lt;br /&gt;
 Background &amp;quot;gui::Inventory_ItemIcon&amp;quot; // Both &amp;quot;Background&amp;quot; and the recommended &amp;quot;background&amp;quot; are fine&lt;br /&gt;
During referencing in an event handler:&lt;br /&gt;
 set &amp;quot;Debug::text&amp;quot; &amp;quot;$InventoryItemIcon::Background&amp;quot;; // Both &amp;quot;Background&amp;quot; and &amp;quot;background&amp;quot; are fine.&lt;br /&gt;
&lt;br /&gt;
Nevertheless, it is recommended that you adhere to the lower case convention.&lt;br /&gt;
&lt;br /&gt;
===User Variable Names===&lt;br /&gt;
&lt;br /&gt;
The names you give to user variables are up to you. There appears to be no consensus on a naming style (other than avoiding all-caps more appropriate for #defines), so do what you wish. Just avoid predefined keywords regardless of case. &lt;br /&gt;
&lt;br /&gt;
A reference to the name of a user variable is not case sensitive. For example given a user variable &amp;quot;float myval 0&amp;quot;:&lt;br /&gt;
  set &amp;quot;MyVal&amp;quot; 3; // OK in event handler&lt;br /&gt;
  if(&amp;quot;MyVal&amp;quot; == 3) ... // OK in event handler&lt;br /&gt;
&lt;br /&gt;
Nevertheless, it is recommended that you be consistent, as if it were case sensitive.&lt;br /&gt;
&lt;br /&gt;
===Properties with String Values===&lt;br /&gt;
&lt;br /&gt;
The string value of a property is stored as given. Whether case-sensitivity is an issue might depend on how/where it is used.&lt;br /&gt;
&lt;br /&gt;
For string values representing paths, the convention (or is it required?) is all lower case plus punctuation, e.g.:&lt;br /&gt;
 font		&amp;quot;fonts/carleton&amp;quot;&lt;br /&gt;
 background &amp;quot;textures/water_source/blue_plain_flat_midmurk&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If the string value of property &amp;quot;text&amp;quot; contains an &amp;quot;_&amp;quot;, it will be shown on screen as a &amp;quot; &amp;quot;. (This is probably a feature, not a bug.)&lt;br /&gt;
&lt;br /&gt;
Main menu controls can be grouped together by a group name, referenced in a sliderDef, editDef, or choiceDef by using (as appropriate) the property &amp;quot;cvarGroup&amp;quot; or &amp;quot;updateGroup&amp;quot;. That group name is case sensitive, when invoked by engine code, e.g., using an event like &amp;quot;cvar read &amp;lt;group name&amp;gt;&amp;quot;. The convention for a group name is to use all lower case.&lt;br /&gt;
&lt;br /&gt;
===Event Handlers - Type Keywords &amp;amp; Names===&lt;br /&gt;
&lt;br /&gt;
Event handler types are case sensitive. Keywords like &amp;quot;onTime&amp;quot; need to be entered exactly to avoid confusing the parser.&lt;br /&gt;
&lt;br /&gt;
With &amp;quot;onNamedEvent&amp;quot;, a case-insensitive comparison is made, between the name used in the GUI and the event name raised in the .script or cpp code&lt;/div&gt;</summary>
		<author><name>Geep</name></author>
	</entry>
</feed>