MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / MakeNumberKeys

Function MakeNumberKeys

src/osk_gui.cpp:257–266  ·  view source on GitHub ↗

Construct the row containing the digit keys. */

Source from the content-addressed store, hash-verified

255
256/** Construct the row containing the digit keys. */
257static std::unique_ptr<NWidgetBase> MakeNumberKeys()
258{
259 std::unique_ptr<NWidgetHorizontal> hor = std::make_unique<NWidgetHorizontalLTR>();
260 hor->SetPIP(0, INTER_KEY_SPACE, 0);
261
262 for (WidgetID widnum = WID_OSK_NUMBERS_FIRST; widnum <= WID_OSK_NUMBERS_LAST; widnum++) {
263 AddKey(hor, KEY_PADDING, 2, WWT_PUSHBTN, widnum, {});
264 }
265 return hor;
266}
267
268/** Construct the qwerty row keys. */
269static std::unique_ptr<NWidgetBase> MakeQwertyKeys()

Callers

nothing calls this directly

Calls 2

AddKeyFunction · 0.85
SetPIPMethod · 0.80

Tested by

no test coverage detected