Skip to content

Auditory User Interface (form.nvgt)

Classes

audio_form

This class facilitates the easy creation of user interfaces that convey their usage entirely through audio.

Notes:

Methods

activate_progress_timer

Activate progress updates on a progress bar control.

bool audio_form::activate_progress_timer(int control_index);

Arguments:
Returns:

bool: true if the progress bar was successfully activated, false otherwise.

add_list_item

Add a string item to a list control.

  1. bool audio_form::add_list_item(int control_index, string option, int position = -1, bool selected = false, bool focus_if_first = true);
  2. bool audio_form::add_list_item(int control_index, string option, string id, int position = -1, bool selected = false, bool focus_if_first = true);
Arguments (1):
Arguments (2):
Returns:

bool: true if the item was successfully added, false otherwise.

Remarks:

This function only works on list controls.

clear_list

Clear a list control of all its items.

bool audio_form::clear_list(int control_index);

Arguments:
Returns:

bool: true if the list was successfully cleared, false otherwise.

create_button

Creates a new button and adds it to the audio form.

int audio_form::create_button(string caption, bool primary = false, bool cancel = false, bool overwrite = true);

Arguments:
Returns:

int: the control index of the new button, or -1 if there was an error. To get error information, look at audio_form::get_last_error();.

create_checkbox

Creates a new checkbox and adds it to the audio form.

int audio_form::create_checkbox(string caption, bool initial_value = false, bool read_only = false);

Arguments:
Returns:

int: the control index of the new checkbox, or -1 if there was an error. To get error information, see audio_form::get_last_error();.

create_input_box

Creates an input box control on the audio form.

int audio_form::create_input_box(string caption, string default_text = "", string password_mask = "", int maximum_length = 0, bool read_only = false, bool multiline = false, bool multiline_enter = true);

Arguments:
Returns:

int: the control index of the new input box, or -1 if there was an error. To get error information, look at audio_form::get_last_error();.

create_keyboard_area

Creates a new keyboard area and adds it to the audio form.

int audio_form::create_keyboard_area(string caption);

Arguments:
Returns:

int: the control index of the new keyboard area, or -1 if there was an error. To get error information, see audio_form::get_last_error();.

create_link

Creates a new link and adds it to the audio form.

int audio_form::create_link(string caption, string url);

Arguments:
Returns:

int: the control index of the new link, or -1 if there was an error. To get error information, see audio_form::get_last_error();.

Remarks:

The link control is similar to buttons, but this opens the given link when pressed. This also speaks the error message if the link cannot be opened or the link isn't an actual URL. If you want the maximum possible customization, use audio_form::create_button method instead.

create_list

Creates a new list control and adds it to the audio form.

int audio_form::create_list(string caption, int maximum_items = 0, bool multiselect = false, bool repeat_boundary_items = false);

Arguments:
Returns:

int: the control index of the new list, or -1 if there was an error. To get error information, look at audio_form::get_last_error();.

create_progress_bar

Creates a new progress bar control and adds it to the audio form.

int audio_form::create_progress_bar(string caption, int speak_interval = 5, bool speak_global = true);

Arguments:
Returns:

int: the control index of the new progress bar, or -1 if there was an error. To get error information, look at audio_form::get_last_error();.

create_slider

Creates a new slider control and adds it to the audio form.

int audio_form::create_slider(string caption, double default_value = 50, double minimum_value = 0, double maximum_value = 100, string text = "", double step_size = 1);

Arguments:
Returns:

int: the control index of the new slider, or -1 if there was an error. To get error information, see audio_form::get_last_error();.

create_status_bar

Creates a new status bar and adds it to the audio form.

int audio_form::create_status_bar(string caption, string text);

Arguments:
Returns:

int: the control index of the new status bar, or -1 if there was an error. To get error information, see audio_form::get_last_error();.

create_subform

Creates a new sub form and adds it to the audio form.

int audio_form::create_subform(string caption, audio_form@ f);

Arguments:
Returns:

int: the control index of the new sub form control, or -1 if there was an error. To get error information, look at audio_form::get_last_error();.

Example:
#include "form.nvgt"
// some imaginary global application variables.
bool logostart = true, menuwrap = false, firespace = false, radar = true;
// First, lets make a class which stores a category name and the form that the category is linked to.
class settings_category {
	string name;
	audio_form@ f;
	settings_category(string n, audio_form@ f) {
		this.name = n;
		@this.f = @f;
	}
}
void settings_dialog() {
	// Define some categories and settings on each category like this:
	audio_form fc_general;
	fc_general.create_window();
	int f_logostart = fc_general.create_checkbox("Play &logo on startup", logostart);
	int f_menuwrap = fc_general.create_checkbox("Wrap &menus", menuwrap);
	audio_form fc_gameplay;
	fc_gameplay.create_window();
	int f_firespace = fc_gameplay.create_checkbox("Use space instead of control to &fire", firespace);
	int f_radar = fc_gameplay.create_checkbox("Enable the &radar", firespace);
	// Add as many categories as you want this way.
	audio_form f; // The overarching main form.
	f.create_window("Settings", false, true);
	int f_category_list = f.create_tab_panel("&Category"); // The user will select categories from here. Note: you can also use create_list.
	int f_category_display = f.create_subform("General settings", @fc_general); // Now by default, the main form embeds the general category form right there.
	int f_ok = f.create_button("&Save settings", true);
	int f_cancel = f.create_button("Cancel", false, true);
	// Now lets create a structured list of categories that can be browsed based on the class above.
	settings_category@[] categories = {
		settings_category("General", @fc_general),
		settings_category("Gameplay", @fc_gameplay)
	};
	// And then add the list of categories to the form's list.
	for (uint i = 0; i < categories.length(); i++) {
		f.add_list_item(f_category_list, categories[i].name);
	}
	// Focus the form's list position on the general category, then set the form's initial focused control to the category list.
	f.set_list_position(f_category_list, 0);
	f.focus(0);
	settings_category@ last_category = @categories[0]; // A handle to the currently selected category so we can detect changes to the selection.
	// Finally this is the loop that does the rest of the magic.
	while (!f.is_pressed(f_cancel)) {
		wait(5);
		f.monitor();
		int pos = f.get_list_position(f_category_list);
		settings_category@ selected_category = null;
		if (pos > -1 and pos < categories.length())
			@selected_category = @categories[pos];
		if (@last_category != @selected_category) {
			last_category.f.subform_control_index = -1; // Later improvements to audio form will make this line be handled internally.
			last_category.f.focus_silently(0); // Make sure that if the category is reselected, it is focused on the first control.
			@last_category = @selected_category;
			f.set_subform(f_category_display, @selected_category.f);
			f.set_caption(f_category_display, selected_category.name + " settings");
		}
		// The following is a special feature I came up with in stw which makes it so that if you are in the category list, keyboard shortcuts from the entire form will work regardless of category.
		if (f.get_current_focus() == f_category_list and key_down(KEY_LALT) or key_down(KEY_RALT)) {
			for (uint i = 0; i < categories.length(); i++) {
				if (categories[i].f.check_shortcuts(true)) {
					f.set_list_position(f_category_list, i);
					@last_category = @categories[i];
					f.set_subform(f_category_display, @last_category.f);
					f.set_caption(f_category_display, last_category.name + " settings");
					f.focus(f_category_display);
					break;
				}
			}
		}
		// Now we can finally check for the save button.
		if (f.is_pressed(f_ok)) {
			logostart = fc_general.is_checked(f_logostart);
			menuwrap = fc_general.is_checked(f_menuwrap);
			firespace = fc_gameplay.is_checked(f_firespace);
			radar = fc_gameplay.is_checked(f_radar);
			return;
		}
	}
}
// Lets make this thing run so we can see it work.
void main() {
	show_window("test");
	settings_dialog();
}
create_window

Creates a window to show audio form controls.

  1. void audio_form::create_window();

  2. void audio_form::create_window(string window_title, bool change_screen_title = true, bool say_dialog = true, bool silent = false);

Arguments (2):
Example:
#include "form.nvgt"
#include "speech.nvgt"
void main() {
	audio_form f;
	f.create_window("Test");
	wait(50); // Give screen readers time to speak the window title.
	int f_exit = f.create_button("exit");
	f.focus(f_exit);
	while (true) {
		wait(5);
		f.monitor();
		if (f.is_pressed(f_exit))
			exit();
	}
}
delete_control

Removes a control with a particular index from the audio form.

bool audio_form::delete_control(int control_index);

Arguments:
Returns:

bool: true if the control was successfully deleted, false otherwise.

delete_list_item

Remove an item from a list control.

bool audio_form::delete_list_item(int control_index, int list_index, bool reset_cursor = true, bool speak_deletion_status = true);

Arguments:
Returns:

bool: true if the item was successfully deleted, false otherwise.

delete_list_selections

Unselect any currently selected items in a list control.

bool audio_form::delete_list_selections(int control_index, bool reset_cursor = true, bool speak_deletion_status = true);

Arguments:
Returns:

bool: true if the selection was successfully cleared, false otherwise.

edit_list_item

Edits the value of a list item.

bool audio_form::edit_list_item(int control_index, string new_option, int position);

Arguments:
Returns:

bool: true if the item's value was successfully updated, false otherwise.

edit_list_item_id

Modifies the ID of a list item.

bool audio_form::edit_list_item_id(int control_index, string new_id, int position);

Arguments:
Returns:

bool: true if the item's ID was successfully updated, false otherwise.

focus

Set a particular control to have the keyboard focus, and notify the user.

bool audio_form::focus(int control_index);

Arguments:
Returns:

bool: true if the control was successfully focused, false otherwise.

focus_interrupt

Set a particular control to have the keyboard focus, and notify the user (cutting off any previous speech).

bool audio_form::focus_interrupt(int control_index);

Arguments:
Returns:

bool: true if the control was successfully focused, false otherwise.

focus_silently

Set a particular control to have the keyboard focus, without notifying the user.

bool audio_form::focus_silently(int control_index);

Arguments:
Returns:

bool: true if the control was successfully focused, false otherwise.

get_cancel_button

Get the control index of the cancel button (e.g. the button activated when pressing escape anywhere on an audio form).

int audio_form::get_cancel_button();

Returns:

int: the control index of the cancel button.

get_caption

Get the caption of a control.

string audio_form::get_caption(int control_index);

Arguments:
Returns:

string: the caption of the control.

get_checked_list_items

Get a list of all currently checked items in a list control.

int[]@ audio_form::get_checked_list_items(int control_index);

Arguments:
Returns:

int[]@: handle to an array containing the index of every checked item in the list.

Remarks:

This function only works on multiselect lists. If you want something that also works on single-select lists, see get_list_selections().

get_control_count

Returns the number of controls currently present on the form.

int audio_form::get_control_count();

Returns:

int: the number of controls currently on the form.

get_control_type

Returns the type of a control.

int audio_form::get_control_type(int control_index);

Arguments:
Returns:

int: the type of the control (see control_types for more information).

get_current_focus

Get the control index of the control with the keyboard focus.

int audio_form::get_current_focus();

Returns:

int: the control index that currently has the keyboard focus.

get_custom_type

Get the custom type of the control, if available.

string audio_form::get_custom_type(int control_index);

Arguments:
Returns:

string: the custom type set on this control if available, an empty string otherwise.

get_default_button

Get the control index of the default button (e.g. the button activated when pressing enter anywhere on an audio form).

int audio_form::get_default_button();

Returns:

int: the control index of the default button.

get_last_error

Get the last error that was raised from this form.

int audio_form::get_last_error();

Returns:

int: the last error code raised by this audio_form ( see audioform_errorcodes for more information).

Remarks:

As noted in the introduction to this class, exceptions are not used here. Instead, we indicate errors through this function.

get_line_column

Get the current line column of an input box.

int audio_form::get_line_column(int control_index);

Arguments:
Returns:

int: The line column of the input box, or -1 if there was an error.

Remarks:

This method only works on input boxes.

get_line_number

Get the current line number of an input box.

int audio_form::get_line_number(int control_index);

Arguments:
Returns:

int: The line number of the input box, or -1 if there was an error.

Remarks:

This method only works on input boxes.

get_link_url

Retrieves the URL of the link control.

string audio_form::get_link_url(int control_index);

Arguments:
Returns:

string: the URL.

Remarks:

This method only works on link control.

get_list_count

Get the number of items contained in a list control.

int audio_form::get_list_count(int control_index);

Arguments:
Returns:

int: the number of items in the list.

get_list_index_by_id

Get the index of a list item by its ID.

int audio_form::get_list_index_by_id(int control_index, string id);

Arguments:
Returns:

int: the index of the item, -1 on error.

get_list_item

Get the text of a particular list item.

string audio_form::get_list_item(int control_index, int list_index);

Arguments:
Returns:

string: the text of the item.

get_list_item_id

Get the ID of a particular list item.

string audio_form::get_list_item_id(int control_index, int list_index);

Arguments:
Returns:

string: the ID of the item.

get_list_position

Get the user's currently focused item in a list control.

int audio_form::get_list_position(int control_index);

Arguments:
Returns:

int: the user's current cursor position in the list.

get_list_selections

Get a list of all items currently selected in a list control.

int[]@ audio_form::get_list_selections(int control_index);

Arguments:
Returns:

int[]@: handle to an array containing the index of every selected item in the list (see remarks).

Remarks:

In the context of this function, a selected item is any item that is checked (if the list supports multiselection), as well as the currently selected item. If you want to only get the state of checked list items, see the get_checked_list_items() function.

get_progress

Get the value of a progress bar.

int audio_form::get_progress(int control_index);

Arguments:
Returns:

int: the current value of the progress bar.

Remarks:

This method only works on progress bar controls.

get_slider

Get the value of a slider.

double audio_form::get_slider(int control_index);

Arguments:
Returns:

double: the current value of the slider. In case of error, this may return -1. To get error information, see audio_form::get_last_error();.

Remarks:

This method only works on slider control.

get_slider_maximum_value

Get the maximum value of a slider.

double audio_form::get_slider_maximum_value(int control_index);

Arguments:
Returns:

double: the maximum allowable value the slider may be set to. In case of error, this may return -1. To get error information, see audio_form::get_last_error();.

Remarks:

This method only works on slider control.

get_slider_minimum_value

Get the minimum value of a slider.

double audio_form::get_slider_minimum_value(int control_index);

Arguments:
Returns:

double: the minimum allowable value the slider may be set to. In case of error, this may return -1. To get error information, see audio_form::get_last_error();.

Remarks:

This method only works on slider control.

get_text

Get the text from an input box or status bar.

string audio_form::get_text(int control_index);

Arguments:
Returns:

string: The text from the control, or an empty string if there was an error.

Remarks:

This method only works on input boxes and status bars.

has_custom_type

Determines whether the control has its custom type set.

bool audio_form::has_custom_type(int control_index);

Arguments:
Returns:

bool: true if the control has its custom type set, false otherwise.

Remarks:

Please note that this method is equivalent to audio_form::get_custom_type(control_index).empty()

is_checked

Get the state of a checkbox.

bool audio_form::is_checked(int control_index);

Arguments:
Returns:

bool: true if the checkbox is checked, false otherwise.

Remarks:

This function only works on checkbox controls.

is_disallowed_char

Determines whether the text of a given control contains characters that are not allowed, set by the audio_form::set_disallowed_chars method.

bool audio_form::is_disallowed_char(int control_index, string char, bool search_all = true);

Arguments:
Returns:

bool: true if the text of the control contains disallowed characters, false otherwise.

Remarks:

The search_all parameter will match the characters depending upon its state. If set to false, the entire string will be searched. If set to true, it will loop through each character and see if one of them contains disallowed character. Thus, you will usually set this to true. One example you might set to false is when the form only has 1 character length, but it is not required, it is looping each character already.

is_enabled

Determine if a particular control is enabled or not.

bool audio_form::is_enabled(int control_index);

Arguments:
Returns:

bool: true if the control is enabled, false if it's disabled.

is_list_item_checked

Determine if the list item at a particular index is checked or not.

bool audio_form::is_list_item_checked(int control_index, int item_index);

Arguments:
Returns:

bool: true if the item exists and is checked, false otherwise.

is_multiline

Determine if a particular control is multiline or not.

bool audio_form::is_multiline(int control_index);

Arguments:
Returns:

bool: true if the control is multiline, false otherwise.

Remarks:

This function only works on input boxes.

is_pressed

Determine if a particular button was just pressed.

bool audio_form::is_pressed(int control_index);

Arguments:
Returns:

bool: true if the button was just pressed, false otherwise.

Remarks:

This function only works on button controls.

is_read_only

Determine if a particular control is read-only or not.

bool audio_form::is_read_only(int control_index);

Arguments:
Returns:

bool: true if the control is read-only, false if it's not.

Remarks:

This function only works on input boxes and checkboxes.

is_visible

Determine if a particular control is visible or not.

bool audio_form::is_visible(int control_index);

Arguments:
Returns:

bool: true if the control is visible, false if it's invisible.

monitor

Processes all keyboard input, and dispatches all events to the form. Should be called in your main loop.

int audio_form::monitor();

Returns:

int: this value can be ignored for users of this class; it's used internally for subforms.

pause_progress_timer

Pause updating of a progress bar control.

bool audio_form::pause_progress_timer(int control_index);

Arguments:
Returns:

bool: true if the progress bar was paused, false otherwise.

set_button_attributes

Set the primary and cancel flags of a button.

`bool audio_form::set_button_attributes(int control_index, bool primary, bool cancel, bool overwrite = true);

Arguments:
Returns:

bool: true if the attributes were successfully set, false otherwise.

set_caption

Sets the caption of a control.

bool audio_form::set_caption(int control_index, string caption);

Arguments:
Returns:

bool: true if the caption was successfully set, false otherwise.

Remarks:

The caption is read every time a user focuses this particular control.

It is possible to associate hotkeys with controls by putting an "&" symbol in the caption. For example, setting the caption of a button to "E&xit" would assign the hotkey alt+x to focus it.

set_checkbox_mark

Set the state of a checkbox (either checked or unchecked).

bool audio_form::set_checkbox_mark(int control_index, bool checked);

Arguments:
Returns:

bool: true if the operation was successful, false otherwise. To get error information, look at audio_form::get_last_error();.

set_custom_type

Sets a custom type for a control.

bool audio_form::set_custom_type(int control_index, string custom_type);

Arguments:
Returns:

bool: true if the custom text type was successfully set, false otherwise.

set_default_controls

Sets default and cancel buttons for this form.

bool set_default_controls(int primary, int cancel);

Arguments:
Returns:

bool: true if the controls were successfully set, false otherwise.

set_default_keyboard_echo

Sets the default keyboard echo of controls on your form.

bool audio_form::set_default_keyboard_echo(int keyboard_echo, bool update_controls = true);

Arguments:
Returns:

bool: true if the echo was successfully set, false otherwise.

set_disallowed_chars

Sets the whitelist/blacklist characters of a control.

bool audio_form::set_disallowed_chars(int control_index, string chars, bool use_only_disallowed_chars = false, string char_disallowed_description = "");

Arguments:
Returns:

bool: true if the characters were successfully set, false otherwise.

Remarks:

Setting the use_only_disallowed_chars parameter to true will restrict all characters that are not in the list. This is useful to prevent other characters in number inputs.

Setting the chars parameter to empty will clear the characters and will switch back to default.

set_enable_go_to_index

Toggles whether the control can use go to line functionality.

bool audio_form::set_enable_go_to_index(int control_index, bool enabled);

Arguments:
Returns:

bool: true if the state was successfully set, false otherwise.

set_enable_search

Toggles whether the control can use search functionality.

bool audio_form::set_enable_search(int control_index, bool enabled);

Arguments:
Returns:

bool: true if the state was successfully set, false otherwise.

set_keyboard_echo

Set the keyboard echo for a particular control.

bool audio_form::set_keyboard_echo(int control_index, int keyboard_echo);

Arguments:
Returns:

bool: true if the keyboard echo was successfully set, false otherwise.

set_link_url

Sets the URL of the link control.

bool audio_form::set_link_url(int control_index, string new_url);

Arguments:
Returns:

bool: true on success, false on failure.

Remarks:

This method only works on link control.

set_list_multinavigation

Configures how the multi-letter navigation works in a list control.

bool audio_form::set_list_multinavigation(int control_index, bool letters, bool numbers, bool nav_translate = true);

Arguments:
Returns:

bool: true if the settings were successfully set, false otherwise.

set_list_position

Set the user's cursor in a list control.

bool audio_form::set_list_position(int control_index, int position = -1, bool speak_new_item = false);

Arguments:
Returns:

bool: true if the cursor position was successfully set, false otherwise.

set_list_properties

Sets the properties of a list control.

bool audio_form::set_list_propertyes(int control_index, bool multiselect=false, bool repeat_boundary_items=false);

Arguments:
Returns:

bool: true on success, false on failure.

set_progress

Sets the progress percentage on the progress control.

bool audio_form::set_progress(int control_index, int value);

Arguments:
Returns:

bool: true on success, false on failure.

Remarks:

This method only works on progress control.

set_slider

Sets the value of the slider control.

bool audio_form::set_slider(int control_index, double value, double min = -1, double max = -1);

Arguments:
Returns:

bool: true on success, false on failure.

Remarks:

This method only works on slider control.

set_state

Set the enabled/visible state of a control.

bool audio_form::set_state(int control_index, bool enabled, bool visible);

Arguments:
Returns:

bool: true if the state was successfully set, false otherwise.

set_subform

Sets a sub form to use on the current form.

bool audio_form::set_subform(int control_index, audio_form@ f);

Arguments:
Returns:

bool: true if the operation was successful, false otherwise. To get error information, look at audio_form::get_last_error();.

Example:
#include "form.nvgt"
// some imaginary global application variables.
bool logostart = true, menuwrap = false, firespace = false, radar = true;
// First, lets make a class which stores a category name and the form that the category is linked to.
class settings_category {
	string name;
	audio_form@ f;
	settings_category(string n, audio_form@ f) {
		this.name = n;
		@this.f = @f;
	}
}
void settings_dialog() {
	// Define some categories and settings on each category like this:
	audio_form fc_general;
	fc_general.create_window();
	int f_logostart = fc_general.create_checkbox("Play &logo on startup", logostart);
	int f_menuwrap = fc_general.create_checkbox("Wrap &menus", menuwrap);
	audio_form fc_gameplay;
	fc_gameplay.create_window();
	int f_firespace = fc_gameplay.create_checkbox("Use space instead of control to &fire", firespace);
	int f_radar = fc_gameplay.create_checkbox("Enable the &radar", firespace);
	// Add as many categories as you want this way.
	audio_form f; // The overarching main form.
	f.create_window("Settings", false, true);
	int f_category_list = f.create_tab_panel("&Category"); // The user will select categories from here. Note: you can also use create_list.
	int f_category_display = f.create_subform("General settings", @fc_general); // Now by default, the main form embeds the general category form right there.
	int f_ok = f.create_button("&Save settings", true);
	int f_cancel = f.create_button("Cancel", false, true);
	// Now lets create a structured list of categories that can be browsed based on the class above.
	settings_category@[] categories = {
		settings_category("General", @fc_general),
		settings_category("Gameplay", @fc_gameplay)
	};
	// And then add the list of categories to the form's list.
	for (uint i = 0; i < categories.length(); i++) {
		f.add_list_item(f_category_list, categories[i].name);
	}
	// Focus the form's list position on the general category, then set the form's initial focused control to the category list.
	f.set_list_position(f_category_list, 0);
	f.focus(0);
	settings_category@ last_category = @categories[0]; // A handle to the currently selected category so we can detect changes to the selection.
	// Finally this is the loop that does the rest of the magic.
	while (!f.is_pressed(f_cancel)) {
		wait(5);
		f.monitor();
		int pos = f.get_list_position(f_category_list);
		settings_category@ selected_category = null;
		if (pos > -1 and pos < categories.length())
			@selected_category = @categories[pos];
		if (@last_category != @selected_category) {
			last_category.f.subform_control_index = -1; // Later improvements to audio form will make this line be handled internally.
			last_category.f.focus_silently(0); // Make sure that if the category is reselected, it is focused on the first control.
			@last_category = @selected_category;
			f.set_subform(f_category_display, @selected_category.f);
			f.set_caption(f_category_display, selected_category.name + " settings");
		}
		// The following is a special feature I came up with in stw which makes it so that if you are in the category list, keyboard shortcuts from the entire form will work regardless of category.
		if (f.get_current_focus() == f_category_list and key_down(KEY_LALT) or key_down(KEY_RALT)) {
			for (uint i = 0; i < categories.length(); i++) {
				if (categories[i].f.check_shortcuts(true)) {
					f.set_list_position(f_category_list, i);
					@last_category = @categories[i];
					f.set_subform(f_category_display, @last_category.f);
					f.set_caption(f_category_display, last_category.name + " settings");
					f.focus(f_category_display);
					break;
				}
			}
		}
		// Now we can finally check for the save button.
		if (f.is_pressed(f_ok)) {
			logostart = fc_general.is_checked(f_logostart);
			menuwrap = fc_general.is_checked(f_menuwrap);
			firespace = fc_gameplay.is_checked(f_firespace);
			radar = fc_gameplay.is_checked(f_radar);
			return;
		}
	}
}
// Lets make this thing run so we can see it work.
void main() {
	show_window("test");
	settings_dialog();
}
set_text

Sets the text of the control.

bool audio_form::set_text(int control_index, string new_text);

Arguments:
Returns:

bool: true on success, false on failure.

Remarks:

This method only works on input field, slider, and status bar.

Properties

active

Determine if the form is currently active.

bool audio_form::active;

Enums

audioform_errorcodes

This enum contains any error values that can be returned by the audio_form::get_last_error(); function.

control_event_type

Lists all possible event types that can be raised.

control_types

This is a complete list of all control types available in the audio form, as well as a brief description of what they do.

text_edit_mode_constants

This is a list of constants that specify text editing modes, used mainly with audio_form::edit_text();.

See the audio_form::edit_text(); documentation for more information.

text_entry_speech_flags

This enum provides constants to be used with the character echo functionality in input boxes.

Global Properties

audioform_input_disable_ralt

Set whether or not the right alt key should be disabled in input boxes, mostly useful for users with non-english keyboards.

bool audioform_input_disable_ralt;

audioform_keyboard_echo

Set the default echo mode for all the forms. Default is textflag_characters

int audioform_keyboard_echo;

audioform_word_separators

A list of characters that should be considered word boundaries for navigation in an input box.

string audioform_word_separators;