Added GetMainTitle to Song to bypass ShowNativeLanguage pref.
This commit is contained in:
@@ -1568,6 +1568,7 @@
|
||||
<Function name='GetLastBeat'/>
|
||||
<Function name='GetLastSecond'/>
|
||||
<Function name='GetLyricsPath'/>
|
||||
<Function name='GetMainTitle'/>
|
||||
<Function name='GetMusicPath'/>
|
||||
<Function name='GetOneSteps'/>
|
||||
<Function name='GetOrigin'/>
|
||||
|
||||
@@ -4586,6 +4586,10 @@ save yourself some time, copy this for undocumented things:
|
||||
<Function name='GetLyricsPath' return='string' arguments=''>
|
||||
Gets the path to the lyrics.
|
||||
</Function>
|
||||
<Function name='GetMainTitle' return='string' arguments=''>
|
||||
GetDisplayMainTitle checks the ShowNativeLanguage pref and returns the transliterated title is that pref is false.<br />
|
||||
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.
|
||||
</Function>
|
||||
<Function name='GetMusicPath' return='string' arguments=''>
|
||||
Gets the path to the music file.
|
||||
</Function>
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user