fix LocalizedString::Load doesn't fill the value
Localize loading messages
This commit is contained in:
@@ -51,7 +51,9 @@ void LocalizedString::Load( const RString &sSection, const RString &sName )
|
||||
{
|
||||
m_sSection = sSection;
|
||||
m_sName = sName;
|
||||
m_sValue = sName;
|
||||
m_sValue = "????";
|
||||
|
||||
Refresh();
|
||||
}
|
||||
|
||||
LocalizedString::operator RString() const
|
||||
|
||||
@@ -56,6 +56,8 @@ int NetworkSyncManager::GetSMOnlineSalt()
|
||||
return m_iSalt;
|
||||
}
|
||||
|
||||
static LocalizedString INITIALIZING_SERVER ( "NetworkSyncManager", "Initializing server..." );
|
||||
static LocalizedString INITIALIZING_CLIENT_NETWORK ( "NetworkSyncManager", "Initializing Client Network..." );
|
||||
NetworkSyncManager::NetworkSyncManager( LoadingWindow *ld )
|
||||
{
|
||||
LANserver = NULL; //So we know if it has been created yet
|
||||
@@ -63,7 +65,7 @@ NetworkSyncManager::NetworkSyncManager( LoadingWindow *ld )
|
||||
|
||||
if( GetCommandlineArgument( "runserver" ))
|
||||
{
|
||||
ld->SetText("Initializing server...");
|
||||
ld->SetText( INITIALIZING_SERVER );
|
||||
LANserver = new StepManiaLanServer;
|
||||
isLanServer = true;
|
||||
GetCommandlineArgument( "runserver", &LANserver->servername );
|
||||
@@ -71,7 +73,7 @@ NetworkSyncManager::NetworkSyncManager( LoadingWindow *ld )
|
||||
else
|
||||
isLanServer = false;
|
||||
|
||||
ld->SetText("Initializing Client Network...");
|
||||
ld->SetText( INITIALIZING_CLIENT_NETWORK );
|
||||
NetPlayerClient = new EzSockets;
|
||||
NetPlayerClient->blocking = false;
|
||||
m_ServerVersion = 0;
|
||||
|
||||
@@ -71,12 +71,13 @@ void SongManager::InitAll( LoadingWindow *ld )
|
||||
InitAutogenCourses();
|
||||
}
|
||||
|
||||
static LocalizedString RELOADING ( "SongManager", "Reloading..." );
|
||||
void SongManager::Reload( LoadingWindow *ld )
|
||||
{
|
||||
FlushDirCache();
|
||||
|
||||
if( ld )
|
||||
ld->SetText( "Reloading ..." );
|
||||
ld->SetText( RELOADING );
|
||||
|
||||
// save scores before unloading songs, of the scores will be lost
|
||||
PROFILEMAN->SaveMachineProfile();
|
||||
@@ -152,6 +153,7 @@ void SongManager::AddGroup( CString sDir, CString sGroupDirName )
|
||||
m_sSongGroupBannerPaths.push_back( sBannerPath );
|
||||
}
|
||||
|
||||
static LocalizedString LOADING_SONGS ( "SongManager", "Loading songs..." );
|
||||
void SongManager::LoadStepManiaSongDir( CString sDir, LoadingWindow *ld )
|
||||
{
|
||||
/* Make sure sDir has a trailing slash. */
|
||||
@@ -187,7 +189,7 @@ void SongManager::LoadStepManiaSongDir( CString sDir, LoadingWindow *ld )
|
||||
// this is a song directory. Load a new song!
|
||||
if( ld )
|
||||
{
|
||||
ld->SetText( ssprintf("Loading songs...\n%s\n%s",
|
||||
ld->SetText( LOADING_SONGS.GetValue()+ssprintf("\n%s\n%s",
|
||||
Basename(sGroupDirName).c_str(),
|
||||
Basename(sSongDirName).c_str()));
|
||||
ld->Paint();
|
||||
@@ -491,6 +493,7 @@ int SongManager::GetNumStagesForSong( const Song* pSong )
|
||||
return 1;
|
||||
}
|
||||
|
||||
static LocalizedString LOADING_COURSES ( "SongManager", "Loading courses..." );
|
||||
void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
|
||||
{
|
||||
LOG->Trace( "Loading courses." );
|
||||
@@ -510,7 +513,7 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
|
||||
|
||||
if( ld )
|
||||
{
|
||||
ld->SetText( ssprintf("Loading courses...\n%s\n%s",
|
||||
ld->SetText( LOADING_COURSES.GetValue()+ssprintf("\n%s\n%s",
|
||||
"Courses",
|
||||
Basename(saCourseFiles[i]).c_str()));
|
||||
ld->Paint();
|
||||
@@ -537,7 +540,7 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
|
||||
{
|
||||
if( ld )
|
||||
{
|
||||
ld->SetText( ssprintf("Loading courses...\n%s\n%s",
|
||||
ld->SetText( LOADING_COURSES.GetValue()+ssprintf("\n%s\n%s",
|
||||
Basename(*sCourseGroup).c_str(),
|
||||
Basename(*sCoursePath).c_str()));
|
||||
ld->Paint();
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "RageSurface.h"
|
||||
#include "RageSurfaceUtils.h"
|
||||
#include "ProductInfo.h"
|
||||
#include "LocalizedString.h"
|
||||
|
||||
#include "RageSurfaceUtils_Zoom.h"
|
||||
static HBITMAP g_hBitmap = NULL;
|
||||
@@ -102,13 +103,14 @@ void LoadingWindow_Win32::SetIcon( const RageSurface *pIcon )
|
||||
SetClassLong( hwnd, GCL_HICON, (LONG) m_hIcon );
|
||||
}
|
||||
|
||||
static LocalizedString ENTER_MAIN_TITLE ("LoadingWindow_Win32","Initializing hardware...");
|
||||
LoadingWindow_Win32::LoadingWindow_Win32()
|
||||
{
|
||||
m_hIcon = NULL;
|
||||
hwnd = CreateDialog( handle.Get(), MAKEINTRESOURCE(IDD_LOADING_DIALOG), NULL, WndProc );
|
||||
for( unsigned i = 0; i < 3; ++i )
|
||||
text[i] = "ABC"; /* always set on first call */
|
||||
SetText( "Initializing hardware..." );
|
||||
SetText( ENTER_MAIN_TITLE );
|
||||
Paint();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user