mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 12:30:40 +02:00
Tablet goto button now properly tracks address bar shown state
This commit is contained in:
parent
353b38286a
commit
e30d77eba1
1 changed files with 1 additions and 3 deletions
|
@ -14,7 +14,6 @@
|
||||||
(function() { // BEGIN LOCAL_SCOPE
|
(function() { // BEGIN LOCAL_SCOPE
|
||||||
|
|
||||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||||
var isActive = false
|
|
||||||
var button = tablet.addButton({
|
var button = tablet.addButton({
|
||||||
icon: "icons/tablet-icons/goto-i.svg",
|
icon: "icons/tablet-icons/goto-i.svg",
|
||||||
text:"GOTO"
|
text:"GOTO"
|
||||||
|
@ -22,14 +21,13 @@ var button = tablet.addButton({
|
||||||
|
|
||||||
|
|
||||||
function onAddressBarShown(visible) {
|
function onAddressBarShown(visible) {
|
||||||
|
button.editProperties({isActive: visible});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setActive(active) {
|
function setActive(active) {
|
||||||
isActive = active;
|
isActive = active;
|
||||||
}
|
}
|
||||||
function onClicked(){
|
function onClicked(){
|
||||||
setActive(!isActive);
|
|
||||||
button.editProperties({isActive: isActive});
|
|
||||||
DialogsManager.toggleAddressBar();
|
DialogsManager.toggleAddressBar();
|
||||||
}
|
}
|
||||||
button.clicked.connect(onClicked);
|
button.clicked.connect(onClicked);
|
||||||
|
|
Loading…
Reference in a new issue