MP Create: display game title in details area
This commit is contained in:
parent
ae2a3c53e0
commit
d6cff9b089
2 changed files with 25 additions and 0 deletions
|
@ -67,6 +67,24 @@
|
|||
|
||||
[grid]
|
||||
|
||||
[row]
|
||||
grow_factor = 0
|
||||
|
||||
[column]
|
||||
border = "all"
|
||||
border_size = 5
|
||||
horizontal_grow = "true"
|
||||
|
||||
[label]
|
||||
definition = "default_large"
|
||||
id = "game_title"
|
||||
[/label]
|
||||
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
|
||||
[row]
|
||||
grow_factor = 0
|
||||
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
#include "utils/functional.hpp"
|
||||
#endif
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
namespace gui2
|
||||
{
|
||||
|
||||
|
@ -808,6 +810,11 @@ void tmp_create_game::update_details(twindow& window)
|
|||
config_engine_->update_initial_cfg(create_engine_.current_level().data());
|
||||
config_engine_->set_default_values();
|
||||
|
||||
// Set the title, with newlines replaced. Newlines are sometimes found in SP Campaign names
|
||||
std::string title = create_engine_.current_level().name();
|
||||
boost::replace_all(title, "\n", " " + utils::unicode_em_dash + " ");
|
||||
find_widget<tcontrol>(&window, "game_title", false).set_label(title);
|
||||
|
||||
show_description(window, create_engine_.current_level().description());
|
||||
|
||||
switch(create_engine_.current_level_type().v) {
|
||||
|
|
Loading…
Add table
Reference in a new issue