mirror of
https://github.com/overte-org/overte.git
synced 2025-06-05 22:32:29 +02:00
button toggle
This commit is contained in:
parent
95a92fc5eb
commit
5bed68ac4c
1 changed files with 8 additions and 1 deletions
|
@ -19,9 +19,16 @@ var button = tablet.addButton({
|
||||||
icon: "icons/tablet-icons/people-i.svg",
|
icon: "icons/tablet-icons/people-i.svg",
|
||||||
text: "Users"
|
text: "Users"
|
||||||
});
|
});
|
||||||
|
var showUsersOverlays = false;
|
||||||
function onClicked() {
|
function onClicked() {
|
||||||
|
print(showUsersOverlays);
|
||||||
// hide/show users overlays
|
// hide/show users overlays
|
||||||
|
if (showUsersOverlays) {
|
||||||
|
showUsersOverlays = false;
|
||||||
|
} else {
|
||||||
|
showUsersOverlays = true;
|
||||||
|
}
|
||||||
|
button.editProperties({isActive: showUsersOverlays});
|
||||||
}
|
}
|
||||||
button.clicked.connect(onClicked);
|
button.clicked.connect(onClicked);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue