mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-26 01:35:28 +03:00
Enable/Disable all button for OSD screen
This commit is contained in:
parent
bd757f49af
commit
c233db3fc8
4 changed files with 20 additions and 1 deletions
|
@ -2309,6 +2309,9 @@
|
||||||
"osdSetupElementsTitle": {
|
"osdSetupElementsTitle": {
|
||||||
"message": "Elements"
|
"message": "Elements"
|
||||||
},
|
},
|
||||||
|
"osdSetupElementsSwitchAll": {
|
||||||
|
"message": "Switch all"
|
||||||
|
},
|
||||||
"osdSetupPreviewTitle": {
|
"osdSetupPreviewTitle": {
|
||||||
"message": "Preview (drag to change position)"
|
"message": "Preview (drag to change position)"
|
||||||
},
|
},
|
||||||
|
|
|
@ -316,6 +316,10 @@
|
||||||
background: rgba(255,255,255,0.4);
|
background: rgba(255,255,255,0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tab-osd .switch-all-elements {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
.tab-osd .preview .char[draggable="true"] {
|
.tab-osd .preview .char[draggable="true"] {
|
||||||
cursor: move;
|
cursor: move;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,13 @@
|
||||||
<div class="spacer_right">
|
<div class="spacer_right">
|
||||||
<div class="gui_box grey">
|
<div class="gui_box grey">
|
||||||
<div class="gui_box_titlebar" style="margin-bottom: 0px;">
|
<div class="gui_box_titlebar" style="margin-bottom: 0px;">
|
||||||
<div class="spacer_box_title" i18n="osdSetupElementsTitle" />
|
<div class="spacer_box_title">
|
||||||
|
<span i18n="osdSetupElementsTitle" />
|
||||||
|
<span class="switch-all-elements">
|
||||||
|
<label for="switch-all"><span i18n="osdSetupElementsSwitchAll" />: </label>
|
||||||
|
<input type="checkbox" checked id="switch-all" name="switch-all" class="togglesmall"></input>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="spacer_box">
|
<div class="spacer_box">
|
||||||
<div id="element-fields" class="switchable-fields"></div>
|
<div id="element-fields" class="switchable-fields"></div>
|
||||||
|
|
|
@ -1532,6 +1532,12 @@ TABS.osd.initialize = function (callback) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Switch all elements
|
||||||
|
$('input#switch-all').change(function () {
|
||||||
|
var new_state = $(this).is(':checked');
|
||||||
|
$('#element-fields input[type=checkbox]').prop('checked', new_state).change();
|
||||||
|
})
|
||||||
|
|
||||||
$(document).on('click', 'span.progressLabel a.save_font', function () {
|
$(document).on('click', 'span.progressLabel a.save_font', function () {
|
||||||
chrome.fileSystem.chooseEntry({type: 'saveFile', suggestedName: 'baseflight', accepts: [{extensions: ['mcm']}]}, function (fileEntry) {
|
chrome.fileSystem.chooseEntry({type: 'saveFile', suggestedName: 'baseflight', accepts: [{extensions: ['mcm']}]}, function (fileEntry) {
|
||||||
if (chrome.runtime.lastError) {
|
if (chrome.runtime.lastError) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue