Make window title a strings.lua string instead.

This commit is contained in:
hispidence 2021-08-15 23:23:33 +01:00
parent fcccbde1be
commit b574a9b899
5 changed files with 2 additions and 17 deletions

View file

@ -65,13 +65,6 @@ __(not yet implemented)__
*/
m_lua->set_function("SetTitleScreenImagePath", &GameFlow::SetTitleScreenImagePath, this);
/*** The string ID of the title of the game
__(not yet implemented)__
@function SetWindowTitleKey
@tparam string string ID of the title as set in TombIDE.
*/
m_lua->set_function("SetWindowTitleKey", &GameFlow::SetWindowTitleKey, this);
/*** settings.lua.
These functions are called in settings.lua, a file which holds your local settings.
settings.lua shouldn't be bundled with any finished levels/games.
@ -157,12 +150,6 @@ void GameFlow::SetTitleScreenImagePath(std::string const& path)
TitleScreenImagePath = path;
}
void GameFlow::SetWindowTitleKey(std::string const& key)
{
// TODO FIXME: I need to actually implement this
WindowTitleKey = key;
}
void GameFlow::SetAudioTracks(sol::as_table_t<std::vector<GameScriptAudioTrack>>&& src)
{
std::vector<GameScriptAudioTrack> tracks = std::move(src);

View file

@ -35,7 +35,6 @@ public:
TITLE_TYPE TitleType{ TITLE_TYPE::FLYBY };
std::string IntroImagePath{};
std::string TitleScreenImagePath{};
std::string WindowTitleKey{};
// Selected language set
std::vector<GameScriptLevel*> Levels;
@ -56,5 +55,4 @@ public:
bool DoGameflow();
void SetIntroImagePath(std::string const& path);
void SetTitleScreenImagePath(std::string const& path);
void SetWindowTitleKey(std::string const& key);
};

View file

@ -15,7 +15,6 @@ struct GameScriptSettings
bool EnableDynamicShadows;
bool EnableWaterCaustics;
bool Windowed;
std::string WindowTitle;
int DrawingDistance;
bool ShowRendererSteps;
bool ShowDebugInfo;

View file

@ -1,6 +1,7 @@
#pragma once
// Define std::string ids
#define STRING_WINDOW_TITLE "window_title"
#define STRING_PASSPORT "passport"
#define STRING_LARA_HOME "lara_home"
#define STRING_CONTROLS "controls"

View file

@ -246,7 +246,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
App.WindowHandle = CreateWindowEx(
0,
"TombEngine",
g_GameFlow->GetSettings()->WindowTitle.c_str(),
g_GameFlow->GetString(STRING_WINDOW_TITLE),
WS_OVERLAPPED | WS_CAPTION | WS_MINIMIZEBOX,
CW_USEDEFAULT, // TODO: change this to center of screen !!!
CW_USEDEFAULT,