minor fixes

This commit is contained in:
Subhraman Sarkar 2024-08-19 18:17:24 +05:30 committed by Celtic Minstrel
parent b46a04bc1f
commit 518e733dd2
2 changed files with 6 additions and 5 deletions

View file

@ -364,7 +364,7 @@ config rich_label::get_parsed_text(const config& parsed_text)
// setup column width
unsigned columns = child["col"].to_int();
unsigned width = child["width"].to_int();
width = width > 0 ? width : w_;
width = (width > 0) ? width : w_;
col_width = width/columns;
// start on a new line
@ -378,7 +378,7 @@ config rich_label::get_parsed_text(const config& parsed_text)
new_text_block = true;
is_image = false;
DBG_GUI_RL << "start table : " << "col=" << columns;
DBG_GUI_RL << "start table : " << "col=" << columns << " width=" << width;
DBG_GUI_RL << "col_width : " << col_width;
} else if(tag.key == "jump") {
@ -465,12 +465,13 @@ config rich_label::get_parsed_text(const config& parsed_text)
new_text_block = false;
}
DBG_GUI_RL << "end table: " << max_row_height;
col_width = 0;
in_table = false;
is_image = false;
is_text = false;
col_width = 0;
row_y = 0;
max_row_height = 0;
} else {
std::string line = child["text"];

View file

@ -143,7 +143,7 @@ std::string terrain_topic_generator::operator()() const {
<< ")~BLIT("<< "terrain/" << type_.icon_image() << "_30.png)" << "'</img>";
if (!type_.editor_image().empty())
ss << "<img>src='" << type_.editor_image() << "'</img>";
ss << "<img>src='" << type_.editor_image() << "'</img><br/>";
if (!type_.help_topic_text().empty())
ss << "\n" << type_.help_topic_text().str() << "\n";