-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation - set_enable_search, menu.nvgt, minor name change in co…
…ntributor section (#134) * Also fixes menu::allow_escape, menu::allow_search and menu::allow_go_to_index which were resetting even if the reset_settings bool was set to false, since the form was recreating itself.
- Loading branch information
1 parent
2d9895b
commit 6638726
Showing
24 changed files
with
140 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...ditory User Interface (form.nvgt)/Classes/audio_form/Methods/get_line_column.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# get_line_column | ||
Get the current line column of an input box. | ||
|
||
`int audio_form::get_line_column(int control_index);` | ||
|
||
## Arguments: | ||
* int control_index: the index of the input box to retrieve the line column from. | ||
|
||
## Returns: | ||
int: The line column of the input box, or -1 if there was an error. | ||
|
||
## Remarks: | ||
This method only works on input boxes. |
13 changes: 13 additions & 0 deletions
13
...ditory User Interface (form.nvgt)/Classes/audio_form/Methods/get_line_number.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# get_line_number | ||
Get the current line number of an input box. | ||
|
||
`int audio_form::get_line_number(int control_index);` | ||
|
||
## Arguments: | ||
* int control_index: the index of the input box to retrieve the line number from. | ||
|
||
## Returns: | ||
int: The line number of the input box, or -1 if there was an error. | ||
|
||
## Remarks: | ||
This method only works on input boxes. |
13 changes: 13 additions & 0 deletions
13
...lude/Auditory User Interface (form.nvgt)/Classes/audio_form/Methods/get_text.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# get_text | ||
Get the text from an input box or status bar. | ||
|
||
`string audio_form::get_text(int control_index);` | ||
|
||
## Arguments: | ||
* int control_index: the index of the control to retrieve the text from. | ||
|
||
## 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. |
11 changes: 11 additions & 0 deletions
11
...tory User Interface (form.nvgt)/Classes/audio_form/Methods/set_enable_search.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# set_enable_search | ||
Toggles whether the control can use search functionality. | ||
|
||
`bool audio_form::set_enable_search(int control_index, bool enabled);` | ||
|
||
## Arguments: | ||
* int control_index: the index of the control. | ||
* bool enabled: enables the search functionality. | ||
|
||
## Returns: | ||
bool: true if the state was successfully set, false otherwise. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This file indicates that this subdirectory should be considered as a root page in the markdown version of the documentation, see the docgen notes for more details. |
12 changes: 12 additions & 0 deletions
12
.../references/include/Menu Interface (menu.nvgt)/Classes/menu/Methods/add_item.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# add_item | ||
Add an item to the menu. | ||
|
||
`bool menu::add_item(string text, string id = "", int position = -1);` | ||
|
||
## Arguments: | ||
* string text: the text of the item to add to the menu. | ||
* string id = "": the ID of the item. | ||
* int position = -1: the position to insert the new item at (-1 = end of menu). | ||
|
||
## Returns: | ||
int: the position of the new item in the menu. |
4 changes: 4 additions & 0 deletions
4
...src/references/include/Menu Interface (menu.nvgt)/Classes/menu/Methods/intro.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# intro | ||
Produces the intro sequence for the menu. It is not required to call this function if you don't want to. | ||
|
||
`void menu::intro();` |
7 changes: 7 additions & 0 deletions
7
...c/references/include/Menu Interface (menu.nvgt)/Classes/menu/Methods/monitor.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# monitor | ||
Monitors the menu; handles keyboard input, the callback, sounds and more. Should be called in a loop as long as the menu is active. | ||
|
||
`bool menu::monitor();` | ||
|
||
## Returns: | ||
bool: true if the menu should keep running, or false if it has been exited or if an option has been selected. |
7 changes: 7 additions & 0 deletions
7
...src/references/include/Menu Interface (menu.nvgt)/Classes/menu/Methods/reset.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# reset | ||
Resets the menu to it's default state. | ||
|
||
`void menu::reset(bool reset_settings = false);` | ||
|
||
## Arguments: | ||
* bool reset_settings = false: If this is enabled, the sounds and other such properties are cleared. |
4 changes: 4 additions & 0 deletions
4
...s/include/Menu Interface (menu.nvgt)/Classes/menu/Properties/automatic_intro.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# automatic_intro | ||
If this is true, the intro function will be automatically called the first time the monitor method is invoqued, then the variable will be set to false. It can be set to true again at any time to cause the intro sequence to repeat, or the intro function can be called manually. | ||
|
||
bool menu::automatic_intro;` |
4 changes: 4 additions & 0 deletions
4
...ences/include/Menu Interface (menu.nvgt)/Classes/menu/Properties/click_sound.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# click_sound | ||
The sound played when the user changes positions in the menu. | ||
|
||
`string menu::click_sound;` |
4 changes: 4 additions & 0 deletions
4
...ences/include/Menu Interface (menu.nvgt)/Classes/menu/Properties/close_sound.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# close_sound | ||
The sound played when the user escapes out of the menu. | ||
|
||
`string menu::close_sound;` |
4 changes: 4 additions & 0 deletions
4
...rences/include/Menu Interface (menu.nvgt)/Classes/menu/Properties/edge_sound.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# edge_sound | ||
The sound which plays when the user attempts moving beyond the border of a menu while wrapping is disabled. | ||
|
||
`string menu::edge_sound;` |
5 changes: 5 additions & 0 deletions
5
.../include/Menu Interface (menu.nvgt)/Classes/menu/Properties/focus_first_item.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# focus_first_item | ||
If this is false, the user will be required to press an arrow key to focus either the first or last item of the menu after the intro function has been called. Otherwise they will be focused on the first item. | ||
This is disabled by default. | ||
|
||
`bool menu::focus_first_item;` |
4 changes: 4 additions & 0 deletions
4
...rences/include/Menu Interface (menu.nvgt)/Classes/menu/Properties/intro_text.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# intro_text | ||
The text spoken when the void intro() function is called. | ||
|
||
`string menu::intro_text;` |
4 changes: 4 additions & 0 deletions
4
...rences/include/Menu Interface (menu.nvgt)/Classes/menu/Properties/open_sound.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# open_sound | ||
The sound played when the void intro() function is called. | ||
|
||
`string menu::open_sound;` |
4 changes: 4 additions & 0 deletions
4
...erences/include/Menu Interface (menu.nvgt)/Classes/menu/Properties/pack_file.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# pack_file | ||
Optionally set this to a pack containing sounds. | ||
|
||
`pack menu::pack_file;` |
4 changes: 4 additions & 0 deletions
4
...nces/include/Menu Interface (menu.nvgt)/Classes/menu/Properties/select_sound.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# select_sound | ||
The sound played when the user chooses an option in the menu. | ||
|
||
`string menu::select_sound;` |
5 changes: 5 additions & 0 deletions
5
...c/references/include/Menu Interface (menu.nvgt)/Classes/menu/Properties/wrap.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# wrap | ||
If the user moves beyond an edge of the menu, set this to true to jump them to the other edge, or false to play an edge sound and repeat the last item. | ||
By default this is set to false. | ||
|
||
`bool menu::wrap;` |
4 changes: 4 additions & 0 deletions
4
...rences/include/Menu Interface (menu.nvgt)/Classes/menu/Properties/wrap_delay.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# wrap_delay | ||
How much time (in ms) should the menu block when wrapping. Defaults to 10ms. | ||
|
||
`uint menu::wrap_delay;` |
4 changes: 4 additions & 0 deletions
4
...rences/include/Menu Interface (menu.nvgt)/Classes/menu/Properties/wrap_sound.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# wrap_sound | ||
The sound played when the menu wraps (only happens when bool wrap = true). | ||
|
||
`string menu::wrap_sound;` |
2 changes: 2 additions & 0 deletions
2
doc/src/references/include/Menu Interface (menu.nvgt)/Classes/menu/menu.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# menu | ||
This class gives you an easy way to create a typical menu based on the audio_form list control item, including some nice aditional options such as navigation sounds, wrapping, and more. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters