Construct the top row keys (cancel, ok, backspace). */
| 243 | |
| 244 | /** Construct the top row keys (cancel, ok, backspace). */ |
| 245 | static std::unique_ptr<NWidgetBase> MakeTopKeys() |
| 246 | { |
| 247 | auto hor = std::make_unique<NWidgetHorizontal>(); |
| 248 | hor->SetPIP(0, INTER_KEY_SPACE, 0); |
| 249 | |
| 250 | AddKey(hor, TOP_KEY_PADDING, 6 * 2, WWT_TEXTBTN, WID_OSK_CANCEL, WidgetData{.string = STR_BUTTON_CANCEL}); |
| 251 | AddKey(hor, TOP_KEY_PADDING, 6 * 2, WWT_TEXTBTN, WID_OSK_OK, WidgetData{.string = STR_BUTTON_OK}); |
| 252 | AddKey(hor, TOP_KEY_PADDING, 2 * 2, WWT_PUSHIMGBTN, WID_OSK_BACKSPACE, WidgetData{.sprite = SPR_OSK_BACKSPACE}); |
| 253 | return hor; |
| 254 | } |
| 255 | |
| 256 | /** Construct the row containing the digit keys. */ |
| 257 | static std::unique_ptr<NWidgetBase> MakeNumberKeys() |