Showing the changes to interface/src/Application.cpp (1 of 6 files). Show all
Unified · Split
| @@ -153,7 +153,6 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 152 unmodified lines | ||
| 153 | 153 | _touchAvgY(0.0f), |
| 154 | 154 | _isTouchPressed(false), |
| 155 | 155 | _mousePressed(false), |
| 156 | − _chatEntryOn(false), | |
| 157 | 156 | _audio(&_audioScope, STARTUP_JITTER_SAMPLES), |
| 158 | 157 | _enableProcessVoxelsThread(true), |
| 159 | 158 | _voxelProcessor(), |
| @@ -698,21 +697,6 @@ void Application::keyPressEvent(QKeyEvent* event) { · 538 unmodified lines | ||
| 698 | 697 | } |
| 699 | 698 | |
| 700 | 699 | if (activeWindow() == _window) { |
| 701 | − if (_chatEntryOn) { | |
| 702 | − if (_chatEntry.keyPressEvent(event)) { | |
| 703 | − _myAvatar->setKeyState(event->key() == Qt::Key_Backspace || event->key() == Qt::Key_Delete ? | |
| 704 | − DELETE_KEY_DOWN : INSERT_KEY_DOWN); | |
| 705 | − _myAvatar->setChatMessage(string(_chatEntry.getContents().size(), SOLID_BLOCK_CHAR)); | |
| 706 | − | |
| 707 | − } else { | |
| 708 | − _myAvatar->setChatMessage(_chatEntry.getContents()); | |
| 709 | − _chatEntry.clear(); | |
| 710 | − _chatEntryOn = false; | |
| 711 | − setMenuShortcutsEnabled(true); | |
| 712 | − } | |
| 713 | − return; | |
| 714 | − } | |
| 715 | − | |
| 716 | 700 | bool isShifted = event->modifiers().testFlag(Qt::ShiftModifier); |
| 717 | 701 | bool isMeta = event->modifiers().testFlag(Qt::ControlModifier); |
| 718 | 702 | switch (event->key()) { |
| @@ -793,10 +777,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 74 unmodified lines | ||
| 793 | 777 | |
| 794 | 778 | case Qt::Key_Return: |
| 795 | 779 | case Qt::Key_Enter: |
| 796 | − _chatEntryOn = true; | |
| 797 | − _myAvatar->setKeyState(NO_KEY_DOWN); | |
| 798 | − _myAvatar->setChatMessage(string()); | |
| 799 | − setMenuShortcutsEnabled(false); | |
| 780 | + Menu::getInstance()->triggerOption(MenuOption::Chat); | |
| 800 | 781 | break; |
| 801 | 782 | |
| 802 | 783 | case Qt::Key_Up: |
| @@ -939,11 +920,6 @@ void Application::keyReleaseEvent(QKeyEvent* event) { · 136 unmodified lines | ||
| 939 | 920 | |
| 940 | 921 | |
| 941 | 922 | if (activeWindow() == _window) { |
| 942 | − if (_chatEntryOn) { | |
| 943 | − _myAvatar->setKeyState(NO_KEY_DOWN); | |
| 944 | − return; | |
| 945 | − } | |
| 946 | − | |
| 947 | 923 | switch (event->key()) { |
| 948 | 924 | case Qt::Key_E: |
| 949 | 925 | _myAvatar->setDriveKeys(UP, 0); |
| @@ -2483,11 +2459,6 @@ void Application::displayOverlay() { · 1533 unmodified lines | ||
| 2483 | 2459 | } |
| 2484 | 2460 | } |
| 2485 | 2461 | |
| 2486 | − // Show chat entry field | |
| 2487 | − if (_chatEntryOn) { | |
| 2488 | − _chatEntry.render(_glWidget->width(), _glWidget->height()); | |
| 2489 | − } | |
| 2490 | − | |
| 2491 | 2462 | // Show on-screen msec timer |
| 2492 | 2463 | if (Menu::getInstance()->isOptionChecked(MenuOption::FrameTimer)) { |
| 2493 | 2464 | char frameTimer[10]; |