MCPcopy Create free account
hub / github.com/EasyRPG/Player / DoUpdate

Method DoUpdate

src/input_source.cpp:53–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53void Input::UiSource::DoUpdate(bool system_only) {
54 keystates = DisplayUi->GetKeyStates();
55
56 pressed_buttons = {};
57
58 UpdateGamepad();
59 UpdateTouch();
60
61 for (auto& bm: cfg.buttons) {
62 if (keymask[bm.second]) {
63 continue;
64 }
65
66 if (!system_only || Input::IsSystemButton(bm.first)) {
67 pressed_buttons[bm.first] = pressed_buttons[bm.first] || keystates[bm.second] || keystates_virtual[bm.second];
68 }
69 }
70 keystates_virtual = {};
71
72 Record();
73
74 mouse_pos = DisplayUi->GetMousePosition();
75}
76
77void Input::UiSource::Update() {
78 DoUpdate(false);

Callers

nothing calls this directly

Calls 2

IsSystemButtonFunction · 0.85
GetMousePositionMethod · 0.80

Tested by

no test coverage detected