-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
form: Fixed Slider Bugs, various little improvements (#100)
* Changed F2 key behavior in input boxes, it now uses key_repeating instead of key_pressed. * Fixed Slider Bugs, particularly: 1. get_slider returning 0 when step size was a number with persision. 2. Replaced all slider floats with doubles because of data corruption. * Added get_custom_type and has_custom_type 1. `bool audio_form::has_custom_type();` 2. `string audio_form::get_custom_type();` * Added 2 more functions for link control 1. `string audio_form::get_link_url();` 2. "bool audio_form::set_url(int control_index, string new_url);" * Added 2 more slider functions 1. `bool audio_form::set_slider_step_size(int control_index, double new_size);` 2. `double audio_form::get_step_size(control_index);` * Slider text value functions now accept doubles 1. `string audio_form::get_slider_text_value(int control_index, double value);` 2. ` bool audio_form::set_slider_text_value(int control_index, double value, const string& in text);`. * Improved docs 1. There was a markdown bug in create input box that put 2 arguments in 1 list item. Removed ")" sign to make it another list item. 2. Modified the create slider docs according to the new signature.
- Loading branch information
1 parent
7e743bc
commit ae37036
Showing
4 changed files
with
115 additions
and
20 deletions.
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
9 changes: 5 additions & 4 deletions
9
...Auditory User Interface (form.nvgt)/Classes/audio_form/Methods/create_slider.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 |
---|---|---|
@@ -1,14 +1,15 @@ | ||
# create_slider | ||
Creates a new slider control and adds it to the audio form. | ||
|
||
`int audio_form::create_slider(string caption, int default_value = 50, int minimum_value = 0, int maximum_value = 100, string text = "");` | ||
`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: | ||
* string caption: the text to be spoken when this slider is tabbed over. | ||
* int default_value = 50: the default value to set the slider to. | ||
* int minimum_value = 0: the minimum value of the slider. | ||
* int maximum_value = 100: the maximum value of the slider. | ||
* double default_value = 50: the default value to set the slider to. | ||
* double minimum_value = 0: the minimum value of the slider. | ||
* double maximum_value = 100: the maximum value of the slider. | ||
* string text = "": extra text to be associated with the slider. | ||
* double step_size = 1: the value that will increment/decrement the slider value. | ||
|
||
## 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();`. |
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
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