0x004C6202
| 1868 | |
| 1869 | // 0x004C6202 |
| 1870 | void processMouseWheel() |
| 1871 | { |
| 1872 | int wheel = 0; |
| 1873 | |
| 1874 | for (; _cursorWheel > 0; _cursorWheel--) |
| 1875 | { |
| 1876 | wheel -= 17; |
| 1877 | } |
| 1878 | |
| 1879 | for (; _cursorWheel < 0; _cursorWheel++) |
| 1880 | { |
| 1881 | wheel += 17; |
| 1882 | } |
| 1883 | |
| 1884 | if (Tutorial::state() != Tutorial::State::none) |
| 1885 | { |
| 1886 | return; |
| 1887 | } |
| 1888 | |
| 1889 | if (Input::hasFlag(Input::Flags::rightMousePressed)) |
| 1890 | { |
| 1891 | if (SceneManager::isTitleMode()) |
| 1892 | { |
| 1893 | return; |
| 1894 | } |
| 1895 | |
| 1896 | auto main = WindowManager::getMainWindow(); |
| 1897 | if (main != nullptr && wheel != 0) |
| 1898 | { |
| 1899 | |
| 1900 | if (wheel > 0) |
| 1901 | { |
| 1902 | main->viewportRotateRight(); |
| 1903 | } |
| 1904 | else if (wheel < 0) |
| 1905 | { |
| 1906 | main->viewportRotateLeft(); |
| 1907 | } |
| 1908 | TownManager::updateLabels(); |
| 1909 | StationManager::updateLabels(); |
| 1910 | Windows::MapWindow::centerOnViewPoint(); |
| 1911 | } |
| 1912 | |
| 1913 | return; |
| 1914 | } |
| 1915 | |
| 1916 | if (wheel == 0) |
| 1917 | { |
| 1918 | return; |
| 1919 | } |
| 1920 | |
| 1921 | WindowManager::wheelInput(wheel); |
| 1922 | } |
| 1923 | |
| 1924 | Ui::WindowType getPressedWindowType() |
| 1925 | { |
no test coverage detected