| 1845 | } |
| 1846 | |
| 1847 | void BattleView::updateSelectionMode() |
| 1848 | { |
| 1849 | if (battle.battleViewSelectedUnits.empty()) |
| 1850 | { |
| 1851 | if (modifierLCtrl || modifierRCtrl) |
| 1852 | { |
| 1853 | if (modifierLAlt || modifierRAlt) |
| 1854 | { |
| 1855 | selectionState = BattleSelectionState::NormalCtrlAlt; |
| 1856 | } |
| 1857 | else |
| 1858 | { |
| 1859 | selectionState = BattleSelectionState::NormalCtrl; |
| 1860 | } |
| 1861 | } |
| 1862 | else |
| 1863 | { |
| 1864 | selectionState = BattleSelectionState::Normal; |
| 1865 | } |
| 1866 | } |
| 1867 | else |
| 1868 | { |
| 1869 | if (selectionState == BattleSelectionState::ThrowLeft || |
| 1870 | selectionState == BattleSelectionState::ThrowRight || |
| 1871 | selectionState == BattleSelectionState::TeleportLeft || |
| 1872 | selectionState == BattleSelectionState::TeleportRight || |
| 1873 | selectionState == BattleSelectionState::PsiControl || |
| 1874 | selectionState == BattleSelectionState::PsiPanic || |
| 1875 | selectionState == BattleSelectionState::PsiStun || |
| 1876 | selectionState == BattleSelectionState::PsiProbe || |
| 1877 | selectionState == BattleSelectionState::FireLeft || |
| 1878 | selectionState == BattleSelectionState::FireRight) |
| 1879 | { |
| 1880 | // Cannot cancel out of action here |
| 1881 | } |
| 1882 | else if (modifierLCtrl || modifierRCtrl) |
| 1883 | { |
| 1884 | if (modifierLAlt || modifierRAlt) |
| 1885 | { |
| 1886 | selectionState = BattleSelectionState::NormalCtrlAlt; |
| 1887 | } |
| 1888 | else |
| 1889 | { |
| 1890 | selectionState = BattleSelectionState::NormalCtrl; |
| 1891 | } |
| 1892 | } |
| 1893 | else if (modifierLShift || modifierRShift) |
| 1894 | { |
| 1895 | selectionState = BattleSelectionState::FireAny; |
| 1896 | } |
| 1897 | else if (modifierLAlt || modifierRAlt) |
| 1898 | { |
| 1899 | selectionState = BattleSelectionState::NormalAlt; |
| 1900 | } |
| 1901 | else |
| 1902 | { |
| 1903 | selectionState = BattleSelectionState::Normal; |
| 1904 | } |
nothing calls this directly
no test coverage detected