<?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_EditDef</id>
	<title>GUI Scripting: EditDef - 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_EditDef"/>
	<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=GUI_Scripting:_EditDef&amp;action=history"/>
	<updated>2026-04-28T07:52:21Z</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:_EditDef&amp;diff=30095&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:_EditDef&amp;diff=30095&amp;oldid=prev"/>
		<updated>2022-11-04T17:42:13Z</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 17:42, 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-l146&quot;&gt;Line 146:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 146:&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;* Up arrow: Move cursor vertically up in text:&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;* Up arrow: Move cursor vertically up in text:&lt;/div&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;* Ctrl+up arrow: Scroll up&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;* Ctrl+up arrow: Scroll up&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:_EditDef&amp;diff=29914&amp;oldid=prev</id>
		<title>Geep: /* Additional Properties of EditDefs */</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=GUI_Scripting:_EditDef&amp;diff=29914&amp;oldid=prev"/>
		<updated>2022-10-14T16:01:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Additional Properties of EditDefs&lt;/span&gt;&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:01, 14 October 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-l31&quot;&gt;Line 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&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;==Additional Properties of EditDefs==&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;==Additional Properties of EditDefs==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;® = A property known as a &quot;register&quot;, that can be altered at runtime by binding it to a GUI:: parameter, or in a &quot;set&quot; or &quot;transition&quot; script command. Other properties cannot be so altered.&lt;/div&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;® = A property known as a &quot;register&quot;, that can be altered at runtime by binding it to a GUI:: parameter, or in a &quot;set&quot; or &quot;transition&quot; script command. Other properties cannot be so altered&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, nor appear within event handlers&lt;/ins&gt;.&lt;/div&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;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;===EditDef Properties – Used in TDM Core===&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;===EditDef Properties – Used in TDM Core===&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:_EditDef&amp;diff=29777&amp;oldid=prev</id>
		<title>Geep: /* Introduction */</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=GUI_Scripting:_EditDef&amp;diff=29777&amp;oldid=prev"/>
		<updated>2022-08-10T20:39:55Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Introduction&lt;/span&gt;&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 20:39, 10 August 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-l3&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&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;An editDef provides a data-entry field. Three use cases are prominent.&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;An editDef provides a data-entry field. Three use cases are prominent.&lt;/div&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;* &amp;#039;&amp;#039;&amp;#039;For a Single-Line String Value.&amp;#039;&amp;#039;&amp;#039; TDM uses this to get a new name when saving a game (in mainmenu_loadsave.gui). In this case, the editDef uses the &amp;quot;maxChars&amp;quot; property to limit the string length, and an onEnter event handler to save the game under the entered name.&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;* &amp;#039;&amp;#039;&amp;#039;For a Single-Line String Value.&amp;#039;&amp;#039;&amp;#039; TDM uses this to get a new name when saving a game (in mainmenu_loadsave.gui). In this case, the editDef uses the &amp;quot;maxChars&amp;quot; property to limit the string length, and an onEnter event handler to save the game under the entered name.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;For a Numeric CVar, Shared with a Slider.&#039;&#039;&#039; Under Settings/Video, there are four sliders. Moving any of these sliders will change the numeric value shown to its left, in a central column. Conversely, since that value is shown with an editDef, you can edit the value and the change affects the slider. Both the editDef and sliderDef use the &quot;cvar&quot; property, to specify the CVar through which value synchronization occurs.&lt;/div&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;* &#039;&#039;&#039;For a Numeric CVar, Shared with a Slider.&#039;&#039;&#039; Under Settings/Video, there are four sliders. Moving any of these sliders will change the numeric value shown to its left, in a central column. Conversely, since that value is shown with an editDef, you can edit the value and the change affects the slider. Both the editDef and sliderDef use the &quot;cvar&quot; property, to specify the CVar through which value synchronization occurs&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. This is discussed further in the Example below&lt;/ins&gt;.&lt;/div&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;* &amp;#039;&amp;#039;&amp;#039;For General, Multiline Text.&amp;#039;&amp;#039;&amp;#039; There is a capability to do general text editing of a word-wrapped field with scroll bar. TDM does not use this; perhaps Doom3 multiplayer chat did?&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;* &amp;#039;&amp;#039;&amp;#039;For General, Multiline Text.&amp;#039;&amp;#039;&amp;#039; There is a capability to do general text editing of a word-wrapped field with scroll bar. TDM does not use this; perhaps Doom3 multiplayer chat did?&lt;/div&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;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;/table&gt;</summary>
		<author><name>Geep</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=GUI_Scripting:_EditDef&amp;diff=29776&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:_EditDef&amp;diff=29776&amp;oldid=prev"/>
		<updated>2022-08-10T20:37:53Z</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;This page is part of a series. See [[GUI Scripting Language]] for overview.&lt;br /&gt;
==Introduction==&lt;br /&gt;
An editDef provides a data-entry field. Three use cases are prominent.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;For a Single-Line String Value.&amp;#039;&amp;#039;&amp;#039; TDM uses this to get a new name when saving a game (in mainmenu_loadsave.gui). In this case, the editDef uses the &amp;quot;maxChars&amp;quot; property to limit the string length, and an onEnter event handler to save the game under the entered name.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;For a Numeric CVar, Shared with a Slider.&amp;#039;&amp;#039;&amp;#039; Under Settings/Video, there are four sliders. Moving any of these sliders will change the numeric value shown to its left, in a central column. Conversely, since that value is shown with an editDef, you can edit the value and the change affects the slider. Both the editDef and sliderDef use the &amp;quot;cvar&amp;quot; property, to specify the CVar through which value synchronization occurs.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;For General, Multiline Text.&amp;#039;&amp;#039;&amp;#039; There is a capability to do general text editing of a word-wrapped field with scroll bar. TDM does not use this; perhaps Doom3 multiplayer chat did?&lt;br /&gt;
&lt;br /&gt;
After you set your focus into the editDef field, the usual text-editing keystroke handling is supported. Among notable features:&lt;br /&gt;
* Backspace and (Linux-friendly) Ctrl+h: Delete a character to the left of the cursor&lt;br /&gt;
* Insert key: Toggles character overwrite mode, with the cursor changed to a vertical bar.&lt;br /&gt;
* Ctrl+leftArrow: Skip left to previous word as delimited by spaces.&lt;br /&gt;
&lt;br /&gt;
Other editing keys as routinely expected:&lt;br /&gt;
* Left arrow: Move left&lt;br /&gt;
* Right arrow: Move right&lt;br /&gt;
* Home key: Move to start of line&lt;br /&gt;
* End key: Move to end of line&lt;br /&gt;
&lt;br /&gt;
For editing keys related to multiline editing, see &amp;quot;Additional Notes&amp;quot; below.&lt;br /&gt;
&lt;br /&gt;
Many keys will invoke the editDef&amp;#039;s event handlers (if defined):&lt;br /&gt;
* Any key press that changes the actual displayed text: onAction.&lt;br /&gt;
* Any key release (including cursor-movement keys): onActionRelease.&lt;br /&gt;
* Enter key, or Keypad Enter&lt;br /&gt;
** if wrap not enabled: onEnter (as well as onAction).&lt;br /&gt;
** if wrap enabled for multiline: treated as line break.&lt;br /&gt;
* Escape key: onEsc.&lt;br /&gt;
&lt;br /&gt;
==Properties Shared with All GuiDef Types==&lt;br /&gt;
A editDef will make use of [[GUI Scripting: Properties in Common | Properties in common]] for placement and to style the presentation of its text. [[GUI Scripting: User Variables | User variables]] were not seen in practice. Event handlers were mentioned above.&lt;br /&gt;
&lt;br /&gt;
==Additional Properties of EditDefs==&lt;br /&gt;
® = A property known as a &amp;quot;register&amp;quot;, that can be altered at runtime by binding it to a GUI:: parameter, or in a &amp;quot;set&amp;quot; or &amp;quot;transition&amp;quot; script command. Other properties cannot be so altered.&lt;br /&gt;
&lt;br /&gt;
===EditDef Properties – Used in TDM Core===&lt;br /&gt;
====Cvar &amp;quot;&amp;#039;&amp;#039;name&amp;#039;&amp;#039;&amp;quot; ®====&lt;br /&gt;
&lt;br /&gt;
Defines the editDef&amp;#039;s bound Cvar, whose value should be numeric.&lt;br /&gt;
 cvar &amp;quot;r_postprocess_brightness&amp;quot;&lt;br /&gt;
====Maxchars &amp;#039;&amp;#039;number&amp;#039;&amp;#039;====&lt;br /&gt;
Maximum number of characters that can be typed.&lt;br /&gt;
 maxchars 32 // As used in mainmenu_loadsave.gui to limit name of saved game.&lt;br /&gt;
&lt;br /&gt;
===EditDef Properties – Not Used in TDM Core===&lt;br /&gt;
&lt;br /&gt;
====Cvargroup &amp;quot;&amp;#039;&amp;#039;group_name&amp;#039;&amp;#039;&amp;quot;====&lt;br /&gt;
Makes this editDef part of a named group of controls that can be updated by a single read or write command. Within the GUI, sliderDefs and choiceDefs may also be part of the group. Note that for choiceDefs, that assignment is done with &amp;#039;&amp;#039;&amp;#039;updategroup&amp;#039;&amp;#039;&amp;#039; &amp;quot;&amp;#039;&amp;#039;group_name&amp;#039;&amp;#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(This tagging is presumably designed to be used with controls for which liveupdate is false, which is never the case in TDM 2.10. For more, see the updategroup description under [[GUI Scripting: ChoiceDef]].)&lt;br /&gt;
&lt;br /&gt;
====Forcescroll  &amp;#039;&amp;#039;bool&amp;#039;&amp;#039;====&lt;br /&gt;
If 1 (true), forces the control to scroll to the bottom when first drawn. Default: 0 (false).&lt;br /&gt;
 forcescroll 1&lt;br /&gt;
====Liveupdate &amp;#039;&amp;#039;bool&amp;#039;&amp;#039;====&lt;br /&gt;
This Property is also available for choiceDefs and sliderDefs. If set to 1, the cvar is changed as the text is changed, and the text changes as the cvar changes. Otherwise only changes when &amp;quot;cvar read group_name&amp;quot; or &amp;quot;cvar write group_name&amp;quot; is sent.&lt;br /&gt;
&lt;br /&gt;
This is always initialized to 1 (true) in TDM&amp;#039;s classes for choiceDef, editDef, and sliderDef, and never seen to be changed explicitly thereafter in any GUIs. Speculatively, if you wanted to design menus that had &amp;quot;Done&amp;quot; and &amp;quot;Cancel&amp;quot; buttons, you might use:&lt;br /&gt;
 liveupdate 0&lt;br /&gt;
&lt;br /&gt;
====Numeric &amp;#039;&amp;#039;bool&amp;#039;&amp;#039;====&lt;br /&gt;
If 1 (true), this control only accepts numbers. Specifically only digits 0..9 and ‘.&amp;#039; are acceptable. Does not support negative numbers. Default: 0 (false).&lt;br /&gt;
 numeric 1&lt;br /&gt;
====Password &amp;#039;&amp;#039;bool&amp;#039;&amp;#039;====&lt;br /&gt;
If 1 (true), the control displays asterisks (***) rather than the text. Default: 0 (false).&lt;br /&gt;
&lt;br /&gt;
====Readonly &amp;#039;&amp;#039;bool&amp;#039;&amp;#039;====&lt;br /&gt;
If 1 (true), text is non-editable. Default: 0 (false).&lt;br /&gt;
 readonly 1&lt;br /&gt;
====Source &amp;quot;&amp;#039;&amp;#039;file_path&amp;#039;&amp;#039;&amp;quot;====&lt;br /&gt;
File to read the initial text from.&lt;br /&gt;
&lt;br /&gt;
====Wrap &amp;#039;&amp;#039;bool&amp;#039;&amp;#039;====&lt;br /&gt;
If 1 (true), text larger than the width of the control is wrapped, and a scroll bar (slider) is created if the text goes beyond the height. For multi-line text. Default: 0 (false).&lt;br /&gt;
 wrap 1&lt;br /&gt;
&lt;br /&gt;
==Video Brightness Example - of a Numeric CVar, Shared with a Slider==&lt;br /&gt;
On the Settings/Video/General page, there are four rows with sliders and associated displays of their values using editDefs. For these cases, the CVar binding alone was sufficient; no event handlers (associated with editDef value changes) were deployed. Note that the CVar must be a float (not excluding negative values), and will itself reject an attempt at alpha character entry.&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s take &amp;quot;Brightness&amp;quot; as a representative row. This GUI snippet involves a single row with 3 columns:&lt;br /&gt;
* Column 1: A prompt for the field name, in a windowDef&lt;br /&gt;
* Column 2 (but the last guiDef in our code here): An editDef &amp;quot;Brightness Value&amp;quot; with the numeric value, held in a cvar, &amp;quot;r_postprocess_brightness&amp;quot;.&lt;br /&gt;
* Column 3: A slider that can also be used to manipulate the cvar, and composed of:&lt;br /&gt;
** a windowDef with the slider&amp;#039;s background (range-bar and tic-marks);&lt;br /&gt;
** the sliderDef itself.&lt;br /&gt;
&lt;br /&gt;
The CVar binding alone was sufficient in these cases; no event handlers were deployed. Note that the CVar must be a float (including negative), and will itself reject an attempt at alpha character entry.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Assume that common macros like SETTINGS_FONT are already defined. Then, within a parent windowDef for the whole page, the relevant Brightness snippet is:&lt;br /&gt;
 ...&lt;br /&gt;
 windowDef SettingGeneralVideoText6&lt;br /&gt;
 {&lt;br /&gt;
     rect         TEXT_X_OFFSET, 102, 230, MM_LINE_H&lt;br /&gt;
     text	      &amp;quot;#str_02155&amp;quot; // Brightness&lt;br /&gt;
     SETTINGS_TEXT&lt;br /&gt;
 }&lt;br /&gt;
 ...&lt;br /&gt;
 windowDef BrightnessSlider&lt;br /&gt;
 {&lt;br /&gt;
     rect         SETTINGS_X_OFFSET-1, 108, 128, MM_SLIDER_H&lt;br /&gt;
     background   &amp;quot;guis/assets/mainmenu/buttons_settingsmenu/slider_bg&amp;quot;&lt;br /&gt;
     matcolor     0, 0, 0, 1&lt;br /&gt;
     noevents     1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 sliderDef Brightness&lt;br /&gt;
 {&lt;br /&gt;
     rect         SETTINGS_X_OFFSET-1, 109, 71, 8&lt;br /&gt;
     forecolor    0.8, 1, 1, 1&lt;br /&gt;
     matcolor     1, 1, 1, 1&lt;br /&gt;
     low	      0.5&lt;br /&gt;
     high         2.0&lt;br /&gt;
     step         0.1&lt;br /&gt;
     thumbShader  &amp;quot;guis/assets/mainmenu/buttons_settingsmenu/slider_bar1&amp;quot;&lt;br /&gt;
     cvar         &amp;quot;r_postprocess_brightness&amp;quot;&lt;br /&gt;
     // Not shown in this example: onMouseEnter &amp;amp; onMouseExit event handling for secondary window &amp;amp; tooltip&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 editDef BrightnessValue&lt;br /&gt;
 {&lt;br /&gt;
     rect		SETTINGS_X_OFFSET-71, 102, 71, MM_LINE_H&lt;br /&gt;
     forecolor	SETTINGS_FONT_COLOUR&lt;br /&gt;
     cvar		&amp;quot;r_postprocess_brightness&amp;quot;&lt;br /&gt;
     font		SETTINGS_FONT&lt;br /&gt;
     textaligny	2&lt;br /&gt;
     textscale	SETTINGS_FONT_SCALE_SLIDER&lt;br /&gt;
 }&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
==Additional Notes==&lt;br /&gt;
===Implementation Oddities===&lt;br /&gt;
From a usability perspective, the coupling between a sliderDef, editDef, and Cvar could be improved. For example, it would be desirable to enforce, at the Cvar itself, a minimum, maximum, and step value, all floats, and have that propagated to sliderDef and editDef behavior. That would solve problems with entering (in the console or the editDef) a value that exceeds the slider bounds. And would fix the problem with mouse sliding causing ugly spurious-precision values.&lt;br /&gt;
&lt;br /&gt;
The keypad is generally ignored as a source of edit keystrokes. And odd to have skip-word leftwards and not skip-word rightwards.&lt;br /&gt;
&lt;br /&gt;
===Another Single-Line String Example===&lt;br /&gt;
The TDM code contains one other example of a single-line entry form, leftover from Doom 3 multiplayer, to solicit a server password from the player. As background, Doom 3 developed its own OS-independent form of message box, with layout defined in msg.gui. The message box can be drawn in various enumerated styles, many of which TDM uses. The MSG_PROMPT style is the one that employs an editDef to get a password. Since TDM is single-player, the code that invokes this is unused.&lt;br /&gt;
&lt;br /&gt;
===Additional Editing Keys for Multiline Text===&lt;br /&gt;
Besides what was mentioned in the Introduction, multiline text can use these additional editing keys:&lt;br /&gt;
* Ctrl+Home: Move to start of text&lt;br /&gt;
* Ctrl+End: Move to end of text&lt;br /&gt;
* Down arrow: Move cursor vertically down in text&lt;br /&gt;
* Ctrl+down arrow: Scroll down&lt;br /&gt;
* Up arrow: Move cursor vertically up in text:&lt;br /&gt;
* Ctrl+up arrow: Scroll up&lt;/div&gt;</summary>
		<author><name>Geep</name></author>
	</entry>
</feed>