MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / keyUp

Function keyUp

src/OpenLoco/src/Ui/Windows/ObjectSelectionWindow.cpp:1671–1696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1669 }
1670
1671 static bool keyUp(Window& w, uint32_t charCode, uint32_t keyCode)
1672 {
1673 if (!Input::isFocused(w.type, w.number, widx::textInput))
1674 {
1675 return false;
1676 }
1677
1678 if (!inputSession.handleInput(charCode, keyCode))
1679 {
1680 return false;
1681 }
1682
1683 int containerWidth = widgets[widx::textInput].width() - 2;
1684 if (inputSession.needsReoffsetting(containerWidth))
1685 {
1686 inputSession.calculateTextOffset(containerWidth);
1687 }
1688
1689 inputSession.cursorFrame = 0;
1690
1691 applyFilterToObjectList(FilterFlags(w.var_858));
1692
1693 w.initScrollWidgets();
1694 w.invalidate();
1695 return true;
1696 }
1697
1698 static constexpr WindowEventList kEvents = {
1699 .onClose = onClose,

Callers

nothing calls this directly

Calls 9

isFocusedFunction · 0.85
applyFilterToObjectListFunction · 0.85
FilterFlagsEnum · 0.85
handleInputMethod · 0.80
needsReoffsettingMethod · 0.80
calculateTextOffsetMethod · 0.80
initScrollWidgetsMethod · 0.80
widthMethod · 0.45
invalidateMethod · 0.45

Tested by

no test coverage detected