MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / OnSimulate

Method OnSimulate

engine/Poseidon/UI/DisplayUI.cpp:992–1082  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

990 for (int i = 0; i < N_MOUSE_BUTTONS; i++)
991 {
992 if (i == 0)
993 {
994 continue;
995 }
996 if (input.GetMouseButtonToDo(i))
997 {
998 dik = INPUT_DEVICE_MOUSE + i;
999 count++;
1000 }
1001 }
1002 for (int i = 0; i < N_JOYSTICK_BUTTONS; i++)
1003 {
1004 if (input.GetStickButtonToDo(i))
1005 {
1006 dik = INPUT_DEVICE_STICK + i;
1007 count++;
1008 }
1009 }
1010 for (int i = 0; i < N_JOYSTICK_POV; i++)
1011 {
1012 if (input.GetStickPovToDo(i))
1013 {
1014 dik = INPUT_DEVICE_STICK_POV + i;
1015 count++;
1016 }
1017 }
1018 }
1019 else
1020 {
1021 for (int i = 0; i < N_JOYSTICK_AXES; i++)
1022 {
1023 if (input.ConsumeAxisBigActive(i))
1024 {
1025 dik = INPUT_DEVICE_STICK_AXIS + i;
1026 count++;
1027 }
1028 }
1029 }
1030 if (count != 1)
1031 {
1032 return;
1033 }
1034
1035 if (dik == SDL_SCANCODE_BACKSPACE)
1036 {
1037 _keys->RemoveKey(index);
1038 }
1039 else if (!IsReservedKey(dik))
1040 {
1041 _keys->AddKey(index, dik);
1042 }
1043}
1044
1045Control* DisplayConfigure::OnCreateCtrl(int type, int idc, const ParamEntry& cls)
1046{
1047 auto& input = InputSubsystem::Instance();
1048 switch (idc)
1049 {

Callers

nothing calls this directly

Calls 12

IsReservedKeyFunction · 0.85
IsFocusedMethod · 0.80
CheckIgnoredKeyMethod · 0.80
IsKeyPressedMethod · 0.80
GetMouseButtonToDoMethod · 0.80
GetStickButtonToDoMethod · 0.80
GetStickPovToDoMethod · 0.80
ConsumeAxisBigActiveMethod · 0.80
RemoveKeyMethod · 0.80
AddKeyMethod · 0.80
GetModeMethod · 0.45
GetCurSelMethod · 0.45

Tested by

no test coverage detected