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

Method update_tip_text

crawl-ref/source/tilereg-cmd.cc:88–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88bool CommandRegion::update_tip_text(string& tip)
89{
90 if (m_cursor == NO_CURSOR)
91 return false;
92
93 unsigned int item_idx = cursor_index();
94 if (item_idx >= m_items.size() || m_items[item_idx].empty())
95 return false;
96
97 const command_type cmd = (command_type) m_items[item_idx].idx;
98 tip = make_stringf("[L-Click] %s",
99 get_command_description(cmd, true).c_str());
100
101 if (command_to_key(cmd) != '\0')
102 {
103 tip += " (%)";
104 insert_commands(tip, { cmd });
105 }
106
107 // tip += "\n[R-Click] Describe";
108
109 return true;
110}
111
112bool CommandRegion::update_alt_text(string &alt)
113{

Callers

nothing calls this directly

Calls 6

make_stringfFunction · 0.85
get_command_descriptionFunction · 0.85
command_to_keyFunction · 0.85
insert_commandsFunction · 0.85
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected