| 1120 | } |
| 1121 | break; |
| 1122 | case IDC_CONFIG_YREVERSED: |
| 1123 | { |
| 1124 | input.ToggleReverseMouse(); |
| 1125 | C3DActiveText* ctrl = static_cast<C3DActiveText*>(GetCtrl(IDC_CONFIG_YREVERSED)); |
| 1126 | if (input.IsReverseMouse()) |
| 1127 | { |
| 1128 | ctrl->SetText(LocalizeString(IDS_CONFIG_YREVERSED)); |
| 1129 | } |
| 1130 | else |
| 1131 | { |
| 1132 | ctrl->SetText(LocalizeString(IDS_CONFIG_YNORMAL)); |
| 1133 | } |
| 1134 | } |
| 1135 | break; |
| 1136 | case IDC_CONFIG_JOYSTICK: |
| 1137 | { |
| 1138 | input.ToggleJoystickEnabled(); |
| 1139 | C3DActiveText* ctrl = static_cast<C3DActiveText*>(GetCtrl(IDC_CONFIG_JOYSTICK)); |
| 1140 | if (input.IsJoystickEnabled()) |
| 1141 | { |
| 1142 | ctrl->SetText(LocalizeString(IDS_CONFIG_JOYSTICK_ENABLED)); |
| 1143 | } |
| 1144 | else |
| 1145 | { |
| 1146 | ctrl->SetText(LocalizeString(IDS_CONFIG_JOYSTICK_DISABLED)); |
| 1147 | } |
| 1148 | } |
| 1149 | break; |
| 1150 | case IDC_CONFIG_BUTTONS: |
| 1151 | { |
| 1152 | input.ToggleMouseButtonsReversed(); |
| 1153 | C3DActiveText* ctrl = static_cast<C3DActiveText*>(GetCtrl(IDC_CONFIG_BUTTONS)); |
| 1154 | if (input.IsMouseButtonsReversed()) |
| 1155 | { |
| 1156 | ctrl->SetText(LocalizeString(IDS_RIGHT_BUTTON)); |
| 1157 | } |
| 1158 | else |
| 1159 | { |
| 1160 | ctrl->SetText(LocalizeString(IDS_LEFT_BUTTON)); |
| 1161 | } |
| 1162 | } |
| 1163 | break; |
| 1164 | default: |
| 1165 | Display::OnButtonClicked(idc); |
| 1166 | break; |
| 1167 | } |
| 1168 | } |
| 1169 | |
| 1170 | void DisplayConfigure::OnSliderPosChanged(int idc, float pos) |
| 1171 | { |
| 1172 | auto& input = InputSubsystem::Instance(); |
| 1173 | switch (idc) |
| 1174 | { |
| 1175 | case IDC_CONFIG_XAXIS: |
| 1176 | input.SetMouseSensitivityX(pos); |
| 1177 | break; |
| 1178 | case IDC_CONFIG_YAXIS: |
| 1179 | input.SetMouseSensitivityY(pos); |
nothing calls this directly
no test coverage detected