| 1082 | |
| 1083 | void DisplayConfigure::OnButtonClicked(int idc) |
| 1084 | { |
| 1085 | auto& input = InputSubsystem::Instance(); |
| 1086 | switch (idc) |
| 1087 | { |
| 1088 | case IDC_CONFIG_DEFAULT: |
| 1089 | { |
| 1090 | UserActionDesc* userActionDesc = InputSubsystem::GetUserActionDesc(); |
| 1091 | for (int i = 0; i < UAN; i++) |
| 1092 | { |
| 1093 | _keys->SetKeys(i, userActionDesc[i].keys); |
| 1094 | } |
| 1095 | } |
| 1096 | { |
| 1097 | input.SetReverseMouse(false); |
| 1098 | C3DActiveText* ctrl = static_cast<C3DActiveText*>(GetCtrl(IDC_CONFIG_YREVERSED)); |
| 1099 | ctrl->SetText(LocalizeString(IDS_CONFIG_YNORMAL)); |
| 1100 | } |
| 1101 | { |
| 1102 | input.SetJoystickEnabled(true); |
| 1103 | C3DActiveText* ctrl = static_cast<C3DActiveText*>(GetCtrl(IDC_CONFIG_JOYSTICK)); |
| 1104 | ctrl->SetText(LocalizeString(IDS_CONFIG_JOYSTICK_ENABLED)); |
| 1105 | } |
| 1106 | { |
| 1107 | input.SetMouseButtonsReversed(false); |
| 1108 | C3DActiveText* ctrl = static_cast<C3DActiveText*>(GetCtrl(IDC_CONFIG_BUTTONS)); |
| 1109 | ctrl->SetText(LocalizeString(IDS_LEFT_BUTTON)); |
| 1110 | } |
| 1111 | { |
| 1112 | input.SetMouseSensitivityX(1.0); |
| 1113 | C3DSlider* ctrl = static_cast<C3DSlider*>(GetCtrl(IDC_CONFIG_XAXIS)); |
| 1114 | ctrl->SetThumbPos(1.0); |
| 1115 | } |
| 1116 | { |
| 1117 | input.SetMouseSensitivityY(1.0); |
| 1118 | C3DSlider* ctrl = static_cast<C3DSlider*>(GetCtrl(IDC_CONFIG_YAXIS)); |
| 1119 | ctrl->SetThumbPos(1.0); |
| 1120 | } |
| 1121 | break; |
| 1122 | case IDC_CONFIG_YREVERSED: |
| 1123 | { |
nothing calls this directly
no test coverage detected