Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all
Unified · Split
| @@ -571,9 +571,8 @@ void Application::keyPressEvent(QKeyEvent* event) { · 570 unmodified lines | ||
| 571 | 571 | _myAvatar.getHand().setRaveGloveEffectsMode((QKeyEvent*)event); |
| 572 | 572 | } |
| 573 | 573 | |
| 574 | − bool alt = event->modifiers().testFlag(Qt::AltModifier); | |
| 575 | − bool meta = event->modifiers().testFlag(Qt::MetaModifier); | |
| 576 | − bool shifted = event->modifiers().testFlag(Qt::ShiftModifier); | |
| 574 | + bool isMeta = event->modifiers().testFlag(Qt::MetaModifier); | |
| 575 | + bool isShifted = event->modifiers().testFlag(Qt::ShiftModifier); | |
| 577 | 576 | switch (event->key()) { |
| 578 | 577 | case Qt::Key_BracketLeft: |
| 579 | 578 | _viewFrustumOffsetYaw -= 0.5; |
| @@ -646,9 +645,9 @@ void Application::keyPressEvent(QKeyEvent* event) { · 66 unmodified lines | ||
| 646 | 645 | break; |
| 647 | 646 | |
| 648 | 647 | case Qt::Key_C: |
| 649 | − if (shifted) { | |
| 648 | + if (isShifted) { | |
| 650 | 649 | _occlusionCulling->trigger(); |
| 651 | − } else if (meta) { | |
| 650 | + } else if (isMeta) { | |
| 652 | 651 | chooseVoxelPaintColor(); |
| 653 | 652 | } else { |
| 654 | 653 | _myAvatar.setDriveKeys(DOWN, 1); |
| @@ -660,7 +659,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 5 unmodified lines | ||
| 660 | 659 | break; |
| 661 | 660 | |
| 662 | 661 | case Qt::Key_S: |
| 663 | − if (shifted) { | |
| 662 | + if (isShifted) { | |
| 664 | 663 | doTreeStats(); |
| 665 | 664 | } else { |
| 666 | 665 | _myAvatar.setDriveKeys(BACK, 1); |
| @@ -673,7 +672,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 6 unmodified lines | ||
| 673 | 672 | break; |
| 674 | 673 | |
| 675 | 674 | case Qt::Key_G: |
| 676 | − if (shifted) { | |
| 675 | + if (isShifted) { | |
| 677 | 676 | _gravityUse->trigger(); |
| 678 | 677 | } else { |
| 679 | 678 | _eyedropperMode->trigger(); |
| @@ -681,7 +680,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 1 unmodified line | ||
| 681 | 680 | break; |
| 682 | 681 | |
| 683 | 682 | case Qt::Key_A: |
| 684 | − if (shifted) { | |
| 683 | + if (isShifted) { | |
| 685 | 684 | _renderAtmosphereOn->trigger(); |
| 686 | 685 | } else { |
| 687 | 686 | _myAvatar.setDriveKeys(ROT_LEFT, 1); |
| @@ -701,23 +700,23 @@ void Application::keyPressEvent(QKeyEvent* event) { · 13 unmodified lines | ||
| 701 | 700 | break; |
| 702 | 701 | |
| 703 | 702 | case Qt::Key_Up: |
| 704 | − _myAvatar.setDriveKeys(shifted ? UP : FWD, 1); | |
| 703 | + _myAvatar.setDriveKeys(isShifted ? UP : FWD, 1); | |
| 705 | 704 | break; |
| 706 | 705 | |
| 707 | 706 | case Qt::Key_Down: |
| 708 | − _myAvatar.setDriveKeys(shifted ? DOWN : BACK, 1); | |
| 707 | + _myAvatar.setDriveKeys(isShifted ? DOWN : BACK, 1); | |
| 709 | 708 | break; |
| 710 | 709 | |
| 711 | 710 | case Qt::Key_Left: |
| 712 | − _myAvatar.setDriveKeys(shifted ? LEFT : ROT_LEFT, 1); | |
| 711 | + _myAvatar.setDriveKeys(isShifted ? LEFT : ROT_LEFT, 1); | |
| 713 | 712 | break; |
| 714 | 713 | |
| 715 | 714 | case Qt::Key_Right: |
| 716 | − _myAvatar.setDriveKeys(shifted ? RIGHT : ROT_RIGHT, 1); | |
| 715 | + _myAvatar.setDriveKeys(isShifted ? RIGHT : ROT_RIGHT, 1); | |
| 717 | 716 | break; |
| 718 | 717 | |
| 719 | 718 | case Qt::Key_I: |
| 720 | − if (shifted) { | |
| 719 | + if (isShifted) { | |
| 721 | 720 | _myCamera.setEyeOffsetOrientation(glm::normalize( |
| 722 | 721 | glm::quat(glm::vec3(0.002f, 0, 0)) * _myCamera.getEyeOffsetOrientation())); |
| 723 | 722 | } else { |
| @@ -727,7 +726,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines | ||
| 727 | 726 | break; |
| 728 | 727 | |
| 729 | 728 | case Qt::Key_K: |
| 730 | − if (shifted) { | |
| 729 | + if (isShifted) { | |
| 731 | 730 | _myCamera.setEyeOffsetOrientation(glm::normalize( |
| 732 | 731 | glm::quat(glm::vec3(-0.002f, 0, 0)) * _myCamera.getEyeOffsetOrientation())); |
| 733 | 732 | } else { |
| @@ -737,7 +736,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines | ||
| 737 | 736 | break; |
| 738 | 737 | |
| 739 | 738 | case Qt::Key_J: |
| 740 | − if (shifted) { | |
| 739 | + if (isShifted) { | |
| 741 | 740 | _myCamera.setEyeOffsetOrientation(glm::normalize( |
| 742 | 741 | glm::quat(glm::vec3(0, 0.002f, 0)) * _myCamera.getEyeOffsetOrientation())); |
| 743 | 742 | } else { |
| @@ -747,7 +746,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines | ||
| 747 | 746 | break; |
| 748 | 747 | |
| 749 | 748 | case Qt::Key_M: |
| 750 | − if (shifted) { | |
| 749 | + if (isShifted) { | |
| 751 | 750 | _myCamera.setEyeOffsetOrientation(glm::normalize( |
| 752 | 751 | glm::quat(glm::vec3(0, -0.002f, 0)) * _myCamera.getEyeOffsetOrientation())); |
| 753 | 752 | } else { |
| @@ -757,7 +756,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines | ||
| 757 | 756 | break; |
| 758 | 757 | |
| 759 | 758 | case Qt::Key_U: |
| 760 | − if (shifted) { | |
| 759 | + if (isShifted) { | |
| 761 | 760 | _myCamera.setEyeOffsetOrientation(glm::normalize( |
| 762 | 761 | glm::quat(glm::vec3(0, 0, -0.002f)) * _myCamera.getEyeOffsetOrientation())); |
| 763 | 762 | } else { |
| @@ -767,7 +766,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines | ||
| 767 | 766 | break; |
| 768 | 767 | |
| 769 | 768 | case Qt::Key_Y: |
| 770 | − if (shifted) { | |
| 769 | + if (isShifted) { | |
| 771 | 770 | _myCamera.setEyeOffsetOrientation(glm::normalize( |
| 772 | 771 | glm::quat(glm::vec3(0, 0, 0.002f)) * _myCamera.getEyeOffsetOrientation())); |
| 773 | 772 | } else { |
| @@ -782,14 +781,14 @@ void Application::keyPressEvent(QKeyEvent* event) { · 8 unmodified lines | ||
| 782 | 781 | _lookingInMirror->trigger(); |
| 783 | 782 | break; |
| 784 | 783 | case Qt::Key_F: |
| 785 | − if (shifted) { | |
| 784 | + if (isShifted) { | |
| 786 | 785 | _frustumOn->trigger(); |
| 787 | 786 | } else { |
| 788 | 787 | _fullScreenMode->trigger(); |
| 789 | 788 | } |
| 790 | 789 | break; |
| 791 | 790 | case Qt::Key_V: |
| 792 | − if (shifted) { | |
| 791 | + if (isShifted) { | |
| 793 | 792 | _renderVoxels->trigger(); |
| 794 | 793 | } else { |
| 795 | 794 | _addVoxelMode->trigger(); |
| @@ -799,7 +798,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines | ||
| 799 | 798 | _manualFirstPerson->trigger(); |
| 800 | 799 | break; |
| 801 | 800 | case Qt::Key_R: |
| 802 | − if (shifted) { | |
| 801 | + if (isShifted) { | |
| 803 | 802 | _frustumRenderModeAction->trigger(); |
| 804 | 803 | } else { |
| 805 | 804 | _deleteVoxelMode->trigger(); |
| @@ -809,7 +808,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines | ||
| 809 | 808 | _colorVoxelMode->trigger(); |
| 810 | 809 | break; |
| 811 | 810 | case Qt::Key_O: |
| 812 | − if (shifted) { | |
| 811 | + if (isShifted) { | |
| 813 | 812 | _viewFrustumFromOffset->trigger(); |
| 814 | 813 | } else { |
| 815 | 814 | _selectVoxelMode->trigger(); |
| @@ -825,14 +824,10 @@ void Application::keyPressEvent(QKeyEvent* event) { · 9 unmodified lines | ||
| 825 | 824 | } |
| 826 | 825 | break; |
| 827 | 826 | case Qt::Key_Plus: |
| 828 | − if (alt) { | |
| 829 | − increaseAvatarSize(); | |
| 830 | − } | |
| 827 | + increaseAvatarSize(); | |
| 831 | 828 | break; |
| 832 | 829 | case Qt::Key_Minus: |
| 833 | − if (alt) { | |
| 834 | − decreaseAvatarSize(); | |
| 835 | − } | |
| 830 | + decreaseAvatarSize(); | |
| 836 | 831 | break; |
| 837 | 832 | |
| 838 | 833 | case Qt::Key_1: |
| @@ -1930,8 +1925,8 @@ void Application::initMenu() { · 1091 unmodified lines | ||
| 1930 | 1925 | "First Person", this, SLOT(setRenderFirstPerson(bool)), Qt::Key_P))->setCheckable(true); |
| 1931 | 1926 | (_manualThirdPerson = renderMenu->addAction( |
| 1932 | 1927 | "Third Person", this, SLOT(setRenderThirdPerson(bool))))->setCheckable(true); |
| 1933 | − renderMenu->addAction("Increase Avatar Size", this, SLOT(increaseAvatarSize()), Qt::ALT | Qt::Key_Plus); | |
| 1934 | − renderMenu->addAction("Decrease Avatar Size", this, SLOT(decreaseAvatarSize()), Qt::ALT | Qt::Key_Minus); | |
| 1928 | + renderMenu->addAction("Increase Avatar Size", this, SLOT(increaseAvatarSize()), Qt::Key_Plus); | |
| 1929 | + renderMenu->addAction("Decrease Avatar Size", this, SLOT(decreaseAvatarSize()), Qt::Key_Minus); | |
| 1935 | 1930 | |
| 1936 | 1931 | |
| 1937 | 1932 | QMenu* toolsMenu = menuBar->addMenu("Tools"); |