mirror of
https://github.com/overte-org/overte.git
synced 2025-04-05 13:08:29 +02:00
fix some fallout from toolbar changes
This commit is contained in:
parent
ad5c3f0b44
commit
204652514e
4 changed files with 11 additions and 32 deletions
|
@ -187,9 +187,6 @@ Window {
|
|||
ToolbarButton {
|
||||
id: homeButton
|
||||
imageURL: "../images/home.svg"
|
||||
buttonState: 1
|
||||
defaultState: 1
|
||||
hoverState: 2
|
||||
onClicked: {
|
||||
addressBarDialog.loadHome();
|
||||
root.shown = false;
|
||||
|
@ -204,9 +201,6 @@ Window {
|
|||
ToolbarButton {
|
||||
id: backArrow;
|
||||
imageURL: "../images/backward.svg";
|
||||
hoverState: addressBarDialog.backEnabled ? 2 : 0;
|
||||
defaultState: addressBarDialog.backEnabled ? 1 : 0;
|
||||
buttonState: addressBarDialog.backEnabled ? 1 : 0;
|
||||
onClicked: addressBarDialog.loadBack();
|
||||
anchors {
|
||||
left: homeButton.right
|
||||
|
@ -216,9 +210,6 @@ Window {
|
|||
ToolbarButton {
|
||||
id: forwardArrow;
|
||||
imageURL: "../images/forward.svg";
|
||||
hoverState: addressBarDialog.forwardEnabled ? 2 : 0;
|
||||
defaultState: addressBarDialog.forwardEnabled ? 1 : 0;
|
||||
buttonState: addressBarDialog.forwardEnabled ? 1 : 0;
|
||||
onClicked: addressBarDialog.loadForward();
|
||||
anchors {
|
||||
left: backArrow.right
|
||||
|
|
|
@ -50,23 +50,17 @@ if (Settings.getValue("HUDUIEnabled")) {
|
|||
// Disable them in hmd.
|
||||
var desktopOnlyViews = ['Mirror', 'Independent Mode', 'Entity Mode'];
|
||||
function onHmdChanged(isHmd) {
|
||||
if (Settings.getValue("HUDUIEnabled")) {
|
||||
button.writeProperty('buttonState', isHmd ? 0 : 1);
|
||||
button.writeProperty('defaultState', isHmd ? 0 : 1);
|
||||
button.writeProperty('hoverState', isHmd ? 2 : 3);
|
||||
//TODO change button icon when the hmd changes
|
||||
if (isHmd) {
|
||||
button.editProperties({
|
||||
icon: "icons/tablet-icons/switch-a.svg",
|
||||
text: "DESKTOP"
|
||||
});
|
||||
} else {
|
||||
//TODO change button icon when the hmd changes
|
||||
if (isHmd) {
|
||||
button.editProperties({
|
||||
icon: "icons/tablet-icons/switch-a.svg",
|
||||
text: "DESKTOP"
|
||||
});
|
||||
} else {
|
||||
button.editProperties({
|
||||
icon: "icons/tablet-icons/switch-i.svg",
|
||||
text: "VR"
|
||||
});
|
||||
}
|
||||
button.editProperties({
|
||||
icon: "icons/tablet-icons/switch-i.svg",
|
||||
text: "VR"
|
||||
});
|
||||
}
|
||||
desktopOnlyViews.forEach(function (view) {
|
||||
Menu.setMenuEnabled("View>" + view, !isHmd);
|
||||
|
|
|
@ -26,9 +26,6 @@ if (Settings.getValue("HUDUIEnabled")) {
|
|||
objectName: buttonName,
|
||||
imageURL: Script.resolvePath("assets/images/tools/people.svg"),
|
||||
visible: true,
|
||||
buttonState: 1,
|
||||
defaultState: 1,
|
||||
hoverState: 3,
|
||||
alpha: 0.9
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -16,9 +16,6 @@ var steamInviteButton = toolBar.addButton({
|
|||
objectName: "steamInvite",
|
||||
imageURL: Script.resolvePath("assets/images/tools/steam-invite.svg"),
|
||||
visible: Steam.isRunning,
|
||||
buttonState: 1,
|
||||
defaultState: 1,
|
||||
hoverState: 3,
|
||||
alpha: 0.9
|
||||
});
|
||||
|
||||
|
@ -28,4 +25,4 @@ steamInviteButton.clicked.connect(function(){
|
|||
|
||||
Script.scriptEnding.connect(function () {
|
||||
toolBar.removeButton("steamInvite");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue