diff --git a/Docs/Luadoc/Lua.xml b/Docs/Luadoc/Lua.xml index 9f3e1e415e..89ece30f15 100644 --- a/Docs/Luadoc/Lua.xml +++ b/Docs/Luadoc/Lua.xml @@ -1568,6 +1568,7 @@ + diff --git a/Docs/Luadoc/LuaDocumentation.xml b/Docs/Luadoc/LuaDocumentation.xml index f4c435805f..01691ae881 100644 --- a/Docs/Luadoc/LuaDocumentation.xml +++ b/Docs/Luadoc/LuaDocumentation.xml @@ -4586,6 +4586,10 @@ save yourself some time, copy this for undocumented things: Gets the path to the lyrics. + + GetDisplayMainTitle checks the ShowNativeLanguage pref and returns the transliterated title is that pref is false.
+ GetMainTitle (this function) does not check that pref. Instead, it directly returns the title, exactly as it is in the #TITLE field in the simfile. +
Gets the path to the music file. diff --git a/src/Song.cpp b/src/Song.cpp index 3ef6a5532d..c65b5aa6b4 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -1726,6 +1726,11 @@ RString Song::GetDisplayArtist() const return m_sArtist; } +RString Song::GetMainTitle() const +{ + return m_sMainTitle; +} + RString Song::GetDisplayFullTitle() const { RString Title = GetDisplayMainTitle(); @@ -1955,6 +1960,10 @@ public: { lua_pushstring(L, p->GetDisplayMainTitle() ); return 1; } + static int GetMainTitle(T* p, lua_State* L) + { + lua_pushstring(L, p->GetMainTitle()); return 1; + } static int GetTranslitMainTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetTranslitMainTitle() ); return 1; @@ -2303,6 +2312,7 @@ public: ADD_METHOD( GetDisplayFullTitle ); ADD_METHOD( GetTranslitFullTitle ); ADD_METHOD( GetDisplayMainTitle ); + ADD_METHOD(GetMainTitle); ADD_METHOD( GetTranslitMainTitle ); ADD_METHOD( GetDisplaySubTitle ); ADD_METHOD( GetTranslitSubTitle ); diff --git a/src/Song.h b/src/Song.h index b7151f623b..8058df65ad 100644 --- a/src/Song.h +++ b/src/Song.h @@ -193,6 +193,7 @@ public: RString GetDisplayMainTitle() const; RString GetDisplaySubTitle() const; RString GetDisplayArtist() const; + RString GetMainTitle() const; /** * @brief Retrieve the transliterated title, or the main title if there is no translit.