Help Browser: Show topic title
This commit is contained in:
parent
bbf6df2ddf
commit
ada7b50403
2 changed files with 23 additions and 1 deletions
|
@ -171,6 +171,23 @@
|
|||
|
||||
[page_definition]
|
||||
|
||||
[row]
|
||||
grow_factor = 1
|
||||
|
||||
[column]
|
||||
border = "left,right"
|
||||
border_size = 5
|
||||
horizontal_grow = true
|
||||
vertical_grow = true
|
||||
|
||||
[label]
|
||||
definition = "title"
|
||||
id = "topic_title"
|
||||
[/label]
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[row]
|
||||
grow_factor = 1
|
||||
|
||||
|
|
|
@ -134,10 +134,11 @@ static std::string format_help_text(const config& cfg)
|
|||
}
|
||||
ss << "<big>" << font::escape_text(item.cfg["text"]) << "</big>";
|
||||
} else if(item.key == "jump") {
|
||||
// Seems like this creates something invisible?
|
||||
// This appears to be something akin to tab stops.
|
||||
if(item.cfg["amount"].empty() && item.cfg["to"].empty()) {
|
||||
throw help::parse_error("Jump markup must have either a to or an amount attribute.");
|
||||
}
|
||||
ss << '\t';
|
||||
} else if(item.key == "format") {
|
||||
if(item.cfg["text"].empty()) {
|
||||
throw help::parse_error("Header markup must have text attribute.");
|
||||
|
@ -205,6 +206,10 @@ void help_browser::on_topic_select()
|
|||
item["label"] = format_help_text(topic->text.parsed_text());
|
||||
data.emplace("topic_text", item);
|
||||
|
||||
item.clear();
|
||||
item["label"] = topic->title;
|
||||
data.emplace("topic_title", item);
|
||||
|
||||
parsed_pages_.emplace(topic_id, topic_pages.get_page_count());
|
||||
topic_pages.add_page(data);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue