mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
21384: Added Menu Option
This commit is contained in:
parent
53fe5736d8
commit
c92e22fd20
4 changed files with 10 additions and 0 deletions
|
@ -200,6 +200,9 @@ Menu::Menu() {
|
|||
addCheckableActionToQMenuAndActionHash(avatarMenu, MenuOption::EnableAvatarCollisions, 0, true,
|
||||
avatar.get(), SLOT(updateMotionBehaviorFromMenu()));
|
||||
|
||||
addCheckableActionToQMenuAndActionHash(avatarMenu, MenuOption::EnableFlying, 0, true,
|
||||
avatar.get(), SLOT(setFlyingEnabled(bool)));
|
||||
|
||||
// Avatar > AvatarBookmarks related menus -- Note: the AvatarBookmarks class adds its own submenus here.
|
||||
auto avatarBookmarks = DependencyManager::get<AvatarBookmarks>();
|
||||
avatarBookmarks->setupMenus(this, avatarMenu);
|
||||
|
|
|
@ -96,6 +96,7 @@ namespace MenuOption {
|
|||
const QString DontRenderEntitiesAsScene = "Don't Render Entities as Scene";
|
||||
const QString EchoLocalAudio = "Echo Local Audio";
|
||||
const QString EchoServerAudio = "Echo Server Audio";
|
||||
const QString EnableFlying = "Enable Flying";
|
||||
const QString EnableAvatarCollisions = "Enable Avatar Collisions";
|
||||
const QString EnableInverseKinematics = "Enable Inverse Kinematics";
|
||||
const QString EntityScriptServerLog = "Entity Script Server Log";
|
||||
|
|
|
@ -2475,6 +2475,11 @@ void MyAvatar::setFlyingEnabled(bool enabled) {
|
|||
|
||||
_enableFlying = enabled;
|
||||
}
|
||||
|
||||
bool MyAvatar::getFlyingEnabled() {
|
||||
return _enableFlying;
|
||||
}
|
||||
|
||||
void MyAvatar::setCollisionsEnabled(bool enabled) {
|
||||
|
||||
if (QThread::currentThread() != thread()) {
|
||||
|
|
|
@ -492,6 +492,7 @@ public:
|
|||
bool hasDriveInput() const;
|
||||
|
||||
Q_INVOKABLE void setFlyingEnabled(bool enabled);
|
||||
Q_INVOKABLE bool getFlyingEnabled();
|
||||
|
||||
Q_INVOKABLE void setCollisionsEnabled(bool enabled);
|
||||
Q_INVOKABLE bool getCollisionsEnabled();
|
||||
|
|
Loading…
Reference in a new issue