Showing the changes to interface/src/Application.cpp (1 of 5 files). Show all
Unified · Split
| @@ -1218,6 +1218,11 @@ void Application::mouseMoveEvent(QMouseEvent* event) { · 1217 unmodified lines | ||
| 1218 | 1218 | } |
| 1219 | 1219 | } |
| 1220 | 1220 | |
| 1221 | +const bool MAKE_SOUND_ON_VOXEL_HOVER = false; | |
| 1222 | +const bool MAKE_SOUND_ON_VOXEL_CLICK = true; | |
| 1223 | +const float HOVER_VOXEL_FREQUENCY = 7040.f; | |
| 1224 | +const float HOVER_VOXEL_DECAY = 0.999f; | |
| 1225 | + | |
| 1221 | 1226 | void Application::mousePressEvent(QMouseEvent* event) { |
| 1222 | 1227 | _controllerScriptingInterface.emitMousePressEvent(event); // send events to any registered scripts |
| 1223 | 1228 | |
| @@ -1320,7 +1325,7 @@ void Application::touchUpdateEvent(QTouchEvent* event) { · 96 unmodified lines | ||
| 1320 | 1325 | } |
| 1321 | 1326 | |
| 1322 | 1327 | void Application::touchBeginEvent(QTouchEvent* event) { |
| 1323 | − TouchEvent thisEvent(*event, _lastTouchEvent); | |
| 1328 | + TouchEvent thisEvent(*event); // on touch begin, we don't compare to last event | |
| 1324 | 1329 | _controllerScriptingInterface.emitTouchBeginEvent(thisEvent); // send events to any registered scripts |
| 1325 | 1330 | touchUpdateEvent(event); |
| 1326 | 1331 | _lastTouchEvent = thisEvent; |
| @@ -2007,12 +2012,9 @@ void Application::updateHoverVoxels(float deltaTime, float& distance, BoxFace& f · 680 unmodified lines | ||
| 2007 | 2012 | bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings); |
| 2008 | 2013 | PerformanceWarning warn(showWarnings, "Application::updateHoverVoxels()"); |
| 2009 | 2014 | |
| 2010 | − // Check for a new hover voxel | |
| 2011 | 2015 | if (!_mousePressed) { |
| 2012 | − { | |
| 2013 | − PerformanceWarning warn(showWarnings, "Application::updateHoverVoxels() _voxels.findRayIntersection()"); | |
| 2014 | − _isHoverVoxel = _voxels.findRayIntersection(_mouseRayOrigin, _mouseRayDirection, _hoverVoxel, distance, face); | |
| 2015 | − } | |
| 2016 | + PerformanceWarning warn(showWarnings, "Application::updateHoverVoxels() _voxels.findRayIntersection()"); | |
| 2017 | + _isHoverVoxel = _voxels.findRayIntersection(_mouseRayOrigin, _mouseRayDirection, _hoverVoxel, distance, face); | |
| 2016 | 2018 | } |
| 2017 | 2019 | } |
| 2018 | 2020 | |