mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 04:03:35 +02:00
Added initial documentation.
Signed-off-by: armored-dragon <publicmail@armoreddragon.com>
This commit is contained in:
parent
19a9636c27
commit
f09aff3a1e
1 changed files with 41 additions and 0 deletions
41
scripts/system/settings/README.md
Normal file
41
scripts/system/settings/README.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Settings
|
||||
This application allows users to adjust multiple aspects of the Overte application.
|
||||
|
||||
## Developing
|
||||
|
||||
### QML Widgets
|
||||
This application provides several QML widgets to make adding additional settings easy.
|
||||
The important settings related widgets are as follows:
|
||||
|
||||
| Name | Description |
|
||||
|---------------------|------------------------------------------------------------------------|
|
||||
| SettingBoolean.qml | An enable/disable toggle for a provided setting |
|
||||
| SettingComboBox.qml | A drop down element which provides a list of options |
|
||||
| SettingNumber.qml | An input which only allows numerical data entry |
|
||||
| SettingSlider.qml | An input which only allows numerical data entry, presented as a slider |
|
||||
| SettingSlider.qml | An input which only allows numerical data entry, presented as a slider |
|
||||
|
||||
#### Examples
|
||||
|
||||
SettingComboBox.qml:
|
||||
```qml
|
||||
SettingComboBox {
|
||||
// Provide the label for the setting (String)
|
||||
settingText: "Refresh rate";
|
||||
|
||||
// Options for the setting (Array of strings)
|
||||
options: ["Economical", "Interactive", "Real-Time", "Custom"];
|
||||
|
||||
// Set the index of the combobox based on the current setting (int)
|
||||
optionIndex: Performance.getRefreshRateProfile();
|
||||
|
||||
// When the value is changed, execute...
|
||||
onValueChanged: {
|
||||
// Adjust the application setting to the current value of the combobox
|
||||
Performance.setRefreshRateProfile(index);
|
||||
|
||||
// If the index is 3 (Custom), show advanced settings, otherwise hide advanced settings.
|
||||
customFPSVaulesContainer.visible = index == 3;
|
||||
}
|
||||
}
|
||||
```
|
Loading…
Reference in a new issue