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

Class InputSession

src/OpenLoco/include/OpenLoco/Ui/TextInput.h:12–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10 constexpr int16_t textboxPadding = 4;
11
12 struct InputSession
13 {
14 std::string buffer; // 0x011369A0
15 size_t cursorPosition; // 0x01136FA2
16 int16_t xOffset; // 0x01136FA4
17 uint8_t cursorFrame; // 0x011370A9
18 uint32_t inputLenLimit;
19
20 InputSession() = default;
21 InputSession(const std::string initialString, uint32_t inputSize)
22 {
23 buffer = initialString;
24 cursorPosition = buffer.length();
25 cursorFrame = 0;
26 xOffset = 0;
27 inputLenLimit = inputSize;
28 };
29
30 bool handleInput(uint32_t charCode, uint32_t keyCode);
31 bool needsReoffsetting(int16_t containerWidth);
32 void calculateTextOffset(int16_t containerWidth);
33 void clearInput();
34 void sanitizeInput();
35 };
36}

Callers 4

internalOpenFunction · 0.85
openFunction · 0.85
openFunction · 0.85
openTextInputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected