mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 23:36:41 +02:00
Merge branch 'menu-updates' of github.com:vladest/hifi into menu-updates
This commit is contained in:
commit
c6ff301aac
4 changed files with 15 additions and 3 deletions
|
@ -27,6 +27,7 @@ Rectangle {
|
||||||
sourceSize.height: 75
|
sourceSize.height: 75
|
||||||
source: "../../../images/about-highfidelity.png"
|
source: "../../../images/about-highfidelity.png"
|
||||||
}
|
}
|
||||||
|
Item { height: 30; width: 1 }
|
||||||
Column {
|
Column {
|
||||||
id: buildColumm
|
id: buildColumm
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
#include <QDate>
|
||||||
|
#include <QLocale>
|
||||||
|
|
||||||
#include "AboutUtil.h"
|
#include "AboutUtil.h"
|
||||||
#include "BuildInfo.h"
|
#include "BuildInfo.h"
|
||||||
|
@ -17,7 +19,11 @@
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include <OffscreenQmlDialog.h>
|
#include <OffscreenQmlDialog.h>
|
||||||
|
|
||||||
AboutUtil::AboutUtil(QObject *parent) : QObject(parent) {}
|
AboutUtil::AboutUtil(QObject *parent) : QObject(parent) {
|
||||||
|
QLocale locale_;
|
||||||
|
m_DateConverted = QDate::fromString(BuildInfo::BUILD_TIME, "dd/MM/yyyy").
|
||||||
|
toString(locale_.dateFormat(QLocale::ShortFormat));
|
||||||
|
}
|
||||||
|
|
||||||
AboutUtil *AboutUtil::getInstance()
|
AboutUtil *AboutUtil::getInstance()
|
||||||
{
|
{
|
||||||
|
@ -27,7 +33,7 @@ AboutUtil *AboutUtil::getInstance()
|
||||||
|
|
||||||
QString AboutUtil::buildDate() const
|
QString AboutUtil::buildDate() const
|
||||||
{
|
{
|
||||||
return BuildInfo::BUILD_TIME;
|
return m_DateConverted;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString AboutUtil::buildVersion() const
|
QString AboutUtil::buildVersion() const
|
||||||
|
|
|
@ -35,6 +35,8 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
void openUrl(const QString &url) const;
|
void openUrl(const QString &url) const;
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
QString m_DateConverted;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_AboutUtil_h
|
#endif // hifi_AboutUtil_h
|
||||||
|
|
|
@ -252,9 +252,12 @@ void setupPreferences() {
|
||||||
static const QString MOVEMENT{ "VR Movement" };
|
static const QString MOVEMENT{ "VR Movement" };
|
||||||
|
|
||||||
{
|
{
|
||||||
|
auto getterFJ = [=]()->bool { return myAvatar->getFlyingEnabled(); };
|
||||||
|
auto setterFJ = [=](bool value) { myAvatar->setFlyingEnabled(value); };
|
||||||
|
preferences->addPreference(new CheckPreference(MOVEMENT, "Flying & jumping", getterFJ, setterFJ));
|
||||||
auto getter = [=]()->bool { return myAvatar->getSnapTurn(); };
|
auto getter = [=]()->bool { return myAvatar->getSnapTurn(); };
|
||||||
auto setter = [=](bool value) { myAvatar->setSnapTurn(value); };
|
auto setter = [=](bool value) { myAvatar->setSnapTurn(value); };
|
||||||
preferences->addPreference(new CheckPreference(MOVEMENT, "Snap turn rotation", getter, setter));
|
preferences->addPreference(new CheckPreference(MOVEMENT, "Snap turn / Smooth turn", getter, setter));
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Update with advanced movement logic, test that it works
|
//TODO: Update with advanced movement logic, test that it works
|
||||||
|
|
Loading…
Reference in a new issue