mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 19:02:55 +02:00
Open and close avatar selector with Ctrl-A
This commit is contained in:
parent
24178b72fb
commit
63d0efcdec
2 changed files with 25 additions and 10 deletions
|
@ -89,7 +89,7 @@ var DRONE_VOLUME = 0.3;
|
||||||
|
|
||||||
function drawLobby() {
|
function drawLobby() {
|
||||||
if (!panelWall) {
|
if (!panelWall) {
|
||||||
print("Adding overlays for the lobby panel wall and orb shell.");
|
print("Adding overlays for the avatar selector panel wall and orb shell.");
|
||||||
|
|
||||||
var cameraEuler = Quat.safeEulerAngles(Camera.orientation);
|
var cameraEuler = Quat.safeEulerAngles(Camera.orientation);
|
||||||
var towardsMe = Quat.angleAxis(cameraEuler.y + 180, { x: 0, y: 1, z: 0 });
|
var towardsMe = Quat.angleAxis(cameraEuler.y + 180, { x: 0, y: 1, z: 0 });
|
||||||
|
@ -294,7 +294,14 @@ function actionStartEvent(event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function backStartEvent() {
|
var control = false;
|
||||||
|
|
||||||
|
function keyPressEvent(event) {
|
||||||
|
if (event.text === "CONTROL") {
|
||||||
|
control = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (control && event.text === "a") {
|
||||||
if (!panelWall) {
|
if (!panelWall) {
|
||||||
toggleEnvironmentRendering(false);
|
toggleEnvironmentRendering(false);
|
||||||
drawLobby();
|
drawLobby();
|
||||||
|
@ -303,6 +310,13 @@ function backStartEvent() {
|
||||||
cleanupLobby();
|
cleanupLobby();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function keyReleaseEvent(event) {
|
||||||
|
if (event.text === "CONTROL") {
|
||||||
|
control = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var CLEANUP_EPSILON_DISTANCE = 0.05;
|
var CLEANUP_EPSILON_DISTANCE = 0.05;
|
||||||
|
|
||||||
|
@ -394,7 +408,8 @@ function mouseMoveEvent(event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.actionStartEvent.connect(actionStartEvent);
|
Controller.actionStartEvent.connect(actionStartEvent);
|
||||||
Controller.backStartEvent.connect(backStartEvent);
|
Controller.keyPressEvent.connect(keyPressEvent);
|
||||||
|
Controller.keyReleaseEvent.connect(keyReleaseEvent);
|
||||||
Script.update.connect(update);
|
Script.update.connect(update);
|
||||||
Script.scriptEnding.connect(maybeCleanupLobby);
|
Script.scriptEnding.connect(maybeCleanupLobby);
|
||||||
Controller.mouseMoveEvent.connect(mouseMoveEvent);
|
Controller.mouseMoveEvent.connect(mouseMoveEvent);
|
||||||
|
|
|
@ -1020,7 +1020,7 @@ void Application::keyPressEvent(QKeyEvent* event) {
|
||||||
case Qt::Key_A:
|
case Qt::Key_A:
|
||||||
if (isShifted) {
|
if (isShifted) {
|
||||||
Menu::getInstance()->triggerOption(MenuOption::Atmosphere);
|
Menu::getInstance()->triggerOption(MenuOption::Atmosphere);
|
||||||
} else {
|
} else if (!isMeta) {
|
||||||
_myAvatar->setDriveKeys(ROT_LEFT, 1.0f);
|
_myAvatar->setDriveKeys(ROT_LEFT, 1.0f);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue