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

Function MakeQwertyKeys

src/osk_gui.cpp:269–280  ·  view source on GitHub ↗

Construct the qwerty row keys. */

Source from the content-addressed store, hash-verified

267
268/** Construct the qwerty row keys. */
269static std::unique_ptr<NWidgetBase> MakeQwertyKeys()
270{
271 std::unique_ptr<NWidgetHorizontal> hor = std::make_unique<NWidgetHorizontalLTR>();
272 hor->SetPIP(0, INTER_KEY_SPACE, 0);
273
274 AddKey(hor, KEY_PADDING, 3, WWT_PUSHIMGBTN, WID_OSK_SPECIAL, WidgetData{.sprite = SPR_OSK_SPECIAL});
275 for (WidgetID widnum = WID_OSK_QWERTY_FIRST; widnum <= WID_OSK_QWERTY_LAST; widnum++) {
276 AddKey(hor, KEY_PADDING, 2, WWT_PUSHBTN, widnum, {});
277 }
278 AddKey(hor, KEY_PADDING, 1, NWID_SPACER, 0, {});
279 return hor;
280}
281
282/** Construct the asdfg row keys. */
283static std::unique_ptr<NWidgetBase> MakeAsdfgKeys()

Callers

nothing calls this directly

Calls 2

AddKeyFunction · 0.85
SetPIPMethod · 0.80

Tested by

no test coverage detected