core::rect<s32> rect(0, 0, size.X, 40);
rect += v2s32(4, 0);
std::string t = "Minetest " VERSION_STRING;
- if(m_data->selected_game != ""){
+ if(m_data->selected_game_name != ""){
t += "/";
- t += m_data->selected_game;
+ t += m_data->selected_game_name;
}
Environment->addStaticText(narrow_to_wide(t).c_str(),
rect, false, true, this, -1);
eid <= GUI_ID_GAME_BUTTON_MAX){
m_data->selected_game =
m_data->games[eid - GUI_ID_GAME_BUTTON_FIRST].id;
+ m_data->selected_game_name =
+ m_data->games[eid - GUI_ID_GAME_BUTTON_FIRST].name;
regenerateGui(m_screensize_old);
}
}
// Generic
int selected_tab;
std::string selected_game;
+ std::string selected_game_name;
// Client options
std::string servername;
std::string serverdescription;
// Generic
selected_tab(0),
selected_game("minetest"),
+ selected_game_name("Minetest"),
// Client opts
fancy_trees(false),
smooth_lighting(false),
menudata.selected_tab = g_settings->getS32("selected_mainmenu_tab");
if(g_settings->exists("selected_serverlist"))
menudata.selected_serverlist = g_settings->getS32("selected_serverlist");
- if(g_settings->exists("selected_mainmenu_game"))
+ if(g_settings->exists("selected_mainmenu_game")){
menudata.selected_game = g_settings->get("selected_mainmenu_game");
+ menudata.selected_game_name = findSubgame(menudata.selected_game).name;
+ }
menudata.address = narrow_to_wide(address);
menudata.name = narrow_to_wide(playername);
menudata.port = narrow_to_wide(itos(port));