mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Get menu background image from selected game
This commit is contained in:
parent
b28734c82c
commit
084be3599a
7 changed files with 172 additions and 136 deletions
|
@ -22,6 +22,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "filesys.h"
|
||||
#include "settings.h"
|
||||
#include "log.h"
|
||||
#ifndef SERVER
|
||||
#include "tile.h" // getImagePath
|
||||
#endif
|
||||
#include "util/string.h"
|
||||
|
||||
bool getGameMinetestConfig(const std::string &game_path, Settings &conf)
|
||||
|
@ -94,7 +97,16 @@ SubgameSpec findSubgame(const std::string &id)
|
|||
std::string game_name = getGameName(game_path);
|
||||
if(game_name == "")
|
||||
game_name = id;
|
||||
return SubgameSpec(id, game_path, gamemod_path, mods_paths, game_name);
|
||||
std::string menubackground_path;
|
||||
std::string menuoverlay_path;
|
||||
std::string menuicon_path;
|
||||
#ifndef SERVER
|
||||
menubackground_path = getImagePath(game_path + DIR_DELIM + "menu/background.png");
|
||||
menuoverlay_path = getImagePath(game_path + DIR_DELIM + "menu/overlay.png");
|
||||
menuicon_path = getImagePath(game_path + DIR_DELIM + "menu/icon.png");
|
||||
#endif
|
||||
return SubgameSpec(id, game_path, gamemod_path, mods_paths, game_name,
|
||||
menubackground_path, menuoverlay_path, menuicon_path);
|
||||
}
|
||||
|
||||
SubgameSpec findWorldSubgame(const std::string &world_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue