MCPcopy Create free account
hub / github.com/crawl/crawl / hints_starting_screen

Function hints_starting_screen

crawl-ref/source/hints.cc:398–418  ·  view source on GitHub ↗

Prints the hints mode welcome screen.

Source from the content-addressed store, hash-verified

396
397// Prints the hints mode welcome screen.
398void hints_starting_screen()
399{
400 string text = getHintString("welcome");
401 _replace_static_tags(text);
402 trim_string(text);
403
404 auto prompt_ui = make_shared<Text>(formatted_string::parse_string(text));
405 prompt_ui->set_wrap_text(true);
406#ifdef USE_TILE_LOCAL
407 prompt_ui->max_size().width = 800;
408#else
409 prompt_ui->max_size().width = 80;
410#endif
411
412 bool done = false;
413 auto popup = make_shared<ui::Popup>(prompt_ui);
414 popup->on_keydown_event([&](const KeyEvent&) { return done = true; });
415
416 mouse_control mc(MOUSE_MODE_MORE);
417 ui::run_layout(std::move(popup), done);
418}
419
420// Called each turn from _input. Better name welcome.
421void hints_new_turn()

Callers 1

_startup_hints_modeFunction · 0.85

Calls 5

getHintStringFunction · 0.85
_replace_static_tagsFunction · 0.85
parse_stringFunction · 0.85
run_layoutFunction · 0.85
set_wrap_textMethod · 0.80

Tested by

no test coverage detected