make more strings localizable
move dialog localization into archutil adjust dialog layout for pseudoloc strings
This commit is contained in:
@@ -62,7 +62,7 @@ IntDir=.\../Debug6
|
||||
TargetDir=\cvs\stepmania\Program
|
||||
TargetName=StepMania-debug
|
||||
SOURCE="$(InputPath)"
|
||||
PreLink_Cmds=archutils\Win32\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PreLink_Cmds=archutils\Win32\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PostBuild_Cmds=archutils\Win32\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi
|
||||
# End Special Build Tool
|
||||
|
||||
@@ -99,7 +99,7 @@ IntDir=.\../Release6
|
||||
TargetDir=\cvs\stepmania\Program
|
||||
TargetName=StepMania
|
||||
SOURCE="$(InputPath)"
|
||||
PreLink_Cmds=archutils\Win32\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PreLink_Cmds=archutils\Win32\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PostBuild_Cmds=archutils\Win32\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi
|
||||
# End Special Build Tool
|
||||
|
||||
@@ -1699,6 +1699,14 @@ SOURCE=.\archutils\Win32\DebugInfoHunt.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\archutils\Win32\DialogUtil.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\archutils\Win32\DialogUtil.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\archutils\Win32\GetFileInformation.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -3697,6 +3705,14 @@ SOURCE=.\cursor1.cur
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\archutils\Win32\DialogCrashHeader.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\archutils\Win32\DialogErrorHeader.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\error.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -3705,6 +3721,10 @@ SOURCE=.\error2.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\archutils\Win32\header.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\loading.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -142,14 +142,17 @@ void LoadingWindow_Win32::SetText( CString sText )
|
||||
while( asMessageLines.size() < 3 )
|
||||
asMessageLines.push_back( "" );
|
||||
|
||||
const int msgs[] = { IDC_STATIC_MESSAGE1, IDC_STATIC_MESSAGE2, IDC_STATIC_MESSAGE3 };
|
||||
const int msgid[] = { IDC_STATIC_MESSAGE1, IDC_STATIC_MESSAGE2, IDC_STATIC_MESSAGE3 };
|
||||
for( unsigned i = 0; i < 3; ++i )
|
||||
{
|
||||
if( text[i] == asMessageLines[i] )
|
||||
continue;
|
||||
text[i] = asMessageLines[i];
|
||||
|
||||
SendDlgItemMessage( hwnd, msgs[i], WM_SETTEXT, 0, (LPARAM)asMessageLines[i].c_str());
|
||||
HWND hwndItem = ::GetDlgItem( hwnd, msgid[i] );
|
||||
|
||||
wstring w = RStringToWstring( asMessageLines[i] );
|
||||
::SetWindowTextW( hwndItem, w.c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB |
@@ -0,0 +1,110 @@
|
||||
#include "global.h"
|
||||
#include "DialogUtil.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
// Create*Font copied from MFC's CFont
|
||||
|
||||
// pLogFont->nHeight is interpreted as PointSize * 10
|
||||
static HFONT CreatePointFontIndirect(const LOGFONT* lpLogFont)
|
||||
{
|
||||
HDC hDC = ::GetDC(NULL);
|
||||
|
||||
// convert nPointSize to logical units based on pDC
|
||||
LOGFONT logFont = *lpLogFont;
|
||||
POINT pt;
|
||||
pt.y = ::GetDeviceCaps(hDC, LOGPIXELSY) * logFont.lfHeight;
|
||||
pt.y /= 720; // 72 points/inch, 10 decipoints/point
|
||||
pt.x = 0;
|
||||
::DPtoLP(hDC, &pt, 1);
|
||||
POINT ptOrg = { 0, 0 };
|
||||
::DPtoLP(hDC, &ptOrg, 1);
|
||||
logFont.lfHeight = -abs(pt.y - ptOrg.y);
|
||||
|
||||
ReleaseDC(NULL, hDC);
|
||||
|
||||
return ::CreateFontIndirect(&logFont);
|
||||
}
|
||||
|
||||
// nPointSize is actually scaled 10x
|
||||
static HFONT CreatePointFont(int nPointSize, LPCTSTR lpszFaceName)
|
||||
{
|
||||
ASSERT(lpszFaceName);
|
||||
|
||||
LOGFONT logFont;
|
||||
memset(&logFont, 0, sizeof(LOGFONT));
|
||||
logFont.lfCharSet = DEFAULT_CHARSET;
|
||||
logFont.lfHeight = nPointSize;
|
||||
lstrcpyn(logFont.lfFaceName, lpszFaceName, strlen(logFont.lfFaceName));
|
||||
|
||||
return ::CreatePointFontIndirect(&logFont);
|
||||
}
|
||||
|
||||
void DialogUtil::SetHeaderFont( HWND hdlg, int nID )
|
||||
{
|
||||
ASSERT( hdlg );
|
||||
|
||||
HWND hControl = ::GetDlgItem( hdlg, nID );
|
||||
ASSERT( hControl );
|
||||
|
||||
// TODO: Fix font leak
|
||||
const int FONT_POINTS = 16;
|
||||
HFONT hfont = CreatePointFont( FONT_POINTS*10, "Arial Black" );
|
||||
::SendMessage( hControl, WM_SETFONT, (WPARAM)hfont, TRUE );
|
||||
}
|
||||
|
||||
void DialogUtil::LocalizeDialogAndContents( HWND hdlg )
|
||||
{
|
||||
// TODO: No SetWindowTextW on Win9x
|
||||
|
||||
const int LARGE_STRING = 256;
|
||||
char szTemp[LARGE_STRING] = "";
|
||||
RString sGroup;
|
||||
|
||||
{
|
||||
::GetWindowText( hdlg, szTemp, ARRAYSIZE(szTemp) );
|
||||
RString s = szTemp;
|
||||
sGroup = "Tools-"+s;
|
||||
s = THEME->GetString( sGroup, s );
|
||||
wstring w = RStringToWstring( s );
|
||||
::SetWindowTextW( hdlg, w.c_str() );
|
||||
}
|
||||
|
||||
for( HWND hwndChild = ::GetTopWindow(hdlg); hwndChild != NULL; hwndChild = ::GetNextWindow(hwndChild,GW_HWNDNEXT) )
|
||||
{
|
||||
::GetWindowText( hwndChild, szTemp, ARRAYSIZE(szTemp) );
|
||||
RString s = szTemp;
|
||||
if( s.empty() )
|
||||
continue;
|
||||
s = THEME->GetString( sGroup, s );
|
||||
wstring w = RStringToWstring( s );
|
||||
::SetWindowTextW( hwndChild, w.c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* (c) 2002-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
#ifndef DialogUtil_H
|
||||
#define DialogUtil_H
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
namespace DialogUtil
|
||||
{
|
||||
void SetHeaderFont( HWND hdlg, int nID );
|
||||
void LocalizeDialogAndContents( HWND hdlg );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2002-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -1,16 +1,17 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by WindowsResources.rc
|
||||
//
|
||||
#define IDC_CRASH_SAVE 16
|
||||
#define IDD_ERROR_DIALOG 111
|
||||
#define IDD_LOADING_DIALOG 116
|
||||
#define BITMAP_LOADING 117
|
||||
#define BITMAP_CRASH 121
|
||||
#define BITMAP_ERROR 129
|
||||
#define IDD_OK 118
|
||||
#define IDD_DRIVER 119
|
||||
#define IDD_DISASM_CRASH 120
|
||||
#define BITMAP_CRASH 121
|
||||
#define BITMAP_ERROR 129
|
||||
#define IDB_HEADER 131
|
||||
#define IDC_SHOCKWAVEFLASH1 1000
|
||||
#define IDC_BUTTON_RESTART 1001
|
||||
#define IDM_TOGGLEFULLSCREEN 1002
|
||||
@@ -44,7 +45,7 @@
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 131
|
||||
#define _APS_NEXT_RESOURCE_VALUE 132
|
||||
#define _APS_NEXT_COMMAND_VALUE 40009
|
||||
#define _APS_NEXT_CONTROL_VALUE 1021
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "WindowsResources.h"
|
||||
|
||||
@@ -26,10 +26,10 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_ERROR_DIALOG DIALOGEX 0, 0, 332, 234
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION
|
||||
IDD_ERROR_DIALOG DIALOG DISCARDABLE 0, 0, 332, 234
|
||||
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION
|
||||
CAPTION "Error"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",IDOK,265,215,60,15
|
||||
EDITTEXT IDC_EDIT_ERROR,5,80,320,130,ES_MULTILINE | ES_READONLY |
|
||||
@@ -37,13 +37,13 @@ BEGIN
|
||||
PUSHBUTTON "View Log",IDC_BUTTON_VIEW_LOG,8,215,74,15
|
||||
PUSHBUTTON "Report the Error",IDC_BUTTON_REPORT,90,215,76,15
|
||||
PUSHBUTTON "Restart Game",IDC_BUTTON_RESTART,175,215,80,15
|
||||
CONTROL 129,IDC_STATIC,"Static",SS_BITMAP,0,0,332,38
|
||||
CONTROL 131,IDC_STATIC,"Static",SS_BITMAP,0,0,332,38
|
||||
LTEXT "Sorry! A fatal error has occurred.\r\n\r\nSpecific details about the error may be shown in the box below:",
|
||||
IDC_STATIC,7,46,298,28
|
||||
END
|
||||
|
||||
IDD_LOADING_DIALOG DIALOG 0, 0, 312, 82
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE
|
||||
IDD_LOADING_DIALOG DIALOG DISCARDABLE 0, 0, 312, 82
|
||||
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
CTEXT "line1",IDC_STATIC_MESSAGE1,0,41,310,10,SS_NOPREFIX |
|
||||
@@ -55,11 +55,13 @@ BEGIN
|
||||
CONTROL "",IDC_SPLASH,"Static",SS_BITMAP,0,0,310,25
|
||||
END
|
||||
|
||||
IDD_DISASM_CRASH DIALOGEX 0, 0, 399, 151
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION
|
||||
IDD_DISASM_CRASH DIALOG DISCARDABLE 0, 0, 399, 151
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
|
||||
CAPTION "Error"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
CONTROL 131,IDC_STATIC,"Static",SS_BITMAP,1,0,332,38
|
||||
CONTROL 131,IDC_STATIC,"Static",SS_BITMAP,66,0,332,38
|
||||
PUSHBUTTON "&View crash dump",IDC_CRASH_SAVE,1,135,70,15
|
||||
PUSHBUTTON "View &Log",IDC_VIEW_LOG,75,135,70,15
|
||||
PUSHBUTTON "Report the &Error",IDC_BUTTON_REPORT,210,135,76,15
|
||||
@@ -69,15 +71,13 @@ BEGIN
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "crash reason: programmer needs good whack on head",
|
||||
IDC_STATIC_BOMBREASON,8,120,219,8
|
||||
CONTROL 121,IDC_STATIC,"Static",SS_BITMAP,1,2,396,36
|
||||
LTEXT "A fatal error has occurred. Diagnostic information has been saved to a file called ""crashinfo.txt"" in the game program directory. Hit ""View crash dump"" to view it. Please include this file in all bug reports.",
|
||||
IDC_STATIC,8,41,382,19
|
||||
LTEXT "Estimated call stack",IDC_STATIC,7,64,64,8
|
||||
END
|
||||
|
||||
IDD_OK DIALOG 0, 0, 318, 87
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP |
|
||||
WS_CAPTION
|
||||
IDD_OK DIALOG DISCARDABLE 0, 0, 318, 87
|
||||
STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION
|
||||
CAPTION "Prompt"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
@@ -90,8 +90,8 @@ BEGIN
|
||||
END
|
||||
|
||||
IDD_DRIVER DIALOGEX 0, 0, 286, 125
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP |
|
||||
WS_CAPTION | WS_SYSMENU
|
||||
STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Outdated Drivers"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
@@ -109,7 +109,7 @@ END
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
GUIDELINES DESIGNINFO MOVEABLE PURE
|
||||
BEGIN
|
||||
IDD_LOADING_DIALOG, DIALOG
|
||||
BEGIN
|
||||
@@ -152,18 +152,18 @@ END
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
1 TEXTINCLUDE MOVEABLE PURE
|
||||
BEGIN
|
||||
"WindowsResources.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
2 TEXTINCLUDE MOVEABLE PURE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
3 TEXTINCLUDE MOVEABLE PURE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
@@ -179,8 +179,9 @@ END
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_ICON ICON "StepMania.ICO"
|
||||
IDI_ICON ICON DISCARDABLE "StepMania.ICO"
|
||||
|
||||
#ifndef _MAC
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
@@ -203,14 +204,14 @@ BEGIN
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "http://www.stepmania.com"
|
||||
VALUE "FileDescription", "StepMania"
|
||||
VALUE "FileVersion", "1, 0, 0, 1"
|
||||
VALUE "InternalName", "StepMania"
|
||||
VALUE "LegalCopyright", "Copyright © 2001-2002"
|
||||
VALUE "OriginalFilename", "StepMania.exe"
|
||||
VALUE "ProductName", " StepMania"
|
||||
VALUE "ProductVersion", "1, 0, 0, 1"
|
||||
VALUE "CompanyName", "http://www.stepmania.com\0"
|
||||
VALUE "FileDescription", "StepMania\0"
|
||||
VALUE "FileVersion", "1, 0, 0, 1\0"
|
||||
VALUE "InternalName", "StepMania\0"
|
||||
VALUE "LegalCopyright", "Copyright © 2001-2002\0"
|
||||
VALUE "OriginalFilename", "StepMania.exe\0"
|
||||
VALUE "ProductName", " StepMania\0"
|
||||
VALUE "ProductVersion", "1, 0, 0, 1\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
@@ -219,14 +220,15 @@ BEGIN
|
||||
END
|
||||
END
|
||||
|
||||
#endif // !_MAC
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmap
|
||||
//
|
||||
|
||||
BITMAP_ERROR BITMAP "DialogCrashHeader.bmp"
|
||||
BITMAP_CRASH BITMAP "DialogErrorHeader.bmp"
|
||||
IDB_HEADER BITMAP DISCARDABLE "header.bmp"
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
@@ -227,12 +227,6 @@
|
||||
<File
|
||||
RelativePath=".\smpackage\StdAfx.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\smpackage\TransparentStatic.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\smpackage\TransparentStatic.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\smpackage\TreeCtrlEx.cpp">
|
||||
</File>
|
||||
@@ -300,6 +294,12 @@
|
||||
<File
|
||||
RelativePath=".\archutils\Win32\arch_time.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\archutils\Win32\DialogUtil.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\archutils\Win32\DialogUtil.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\archutils\Win32\RegistryAccess.cpp">
|
||||
</File>
|
||||
@@ -568,6 +568,9 @@
|
||||
<File
|
||||
RelativePath=".\LuaReference.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ThemeMetric.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Global Singletons"
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#include "IniFile.h"
|
||||
#include "SMPackageUtil.h"
|
||||
#include "SpecialFiles.h"
|
||||
#include ".\changegamesettings.h"
|
||||
#include "archutils/Win32/DialogUtil.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
@@ -41,6 +43,7 @@ void ChangeGameSettings::DoDataExchange(CDataExchange* pDX)
|
||||
BEGIN_MESSAGE_MAP(ChangeGameSettings, CDialog)
|
||||
//{{AFX_MSG_MAP(ChangeGameSettings)
|
||||
//}}AFX_MSG_MAP
|
||||
ON_WM_CTLCOLOR()
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -51,7 +54,7 @@ BOOL ChangeGameSettings::OnInitDialog()
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
SMPackageUtil::LocalizeDialogAndContents( *this );
|
||||
DialogUtil::LocalizeDialogAndContents( *this );
|
||||
|
||||
//
|
||||
// Fill the radio buttons
|
||||
@@ -139,6 +142,21 @@ void ChangeGameSettings::OnOK()
|
||||
CDialog::OnOK();
|
||||
}
|
||||
|
||||
HBRUSH ChangeGameSettings::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
|
||||
{
|
||||
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
|
||||
|
||||
// TODO: Change any attributes of the DC here
|
||||
if( pWnd->GetDlgCtrlID() == IDC_STATIC_HEADER_TEXT )
|
||||
{
|
||||
hbr = (HBRUSH)::GetStockObject(HOLLOW_BRUSH);
|
||||
pDC->SetBkMode(TRANSPARENT);
|
||||
}
|
||||
|
||||
// TODO: Return a different brush if the default is not desired
|
||||
return hbr;
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2002-2005 Chris Danford
|
||||
* All rights reserved.
|
||||
|
||||
@@ -39,6 +39,8 @@ protected:
|
||||
virtual void OnOK();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "RageUtil.h"
|
||||
#include "SMPackageUtil.h"
|
||||
#include ".\createlanguagedlg.h"
|
||||
#include "archutils/Win32/DialogUtil.h"
|
||||
|
||||
// CreateLanguageDlg dialog
|
||||
|
||||
@@ -33,7 +34,7 @@ BOOL CreateLanguageDlg::OnInitDialog()
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
SMPackageUtil::LocalizeDialogAndContents( *this );
|
||||
DialogUtil::LocalizeDialogAndContents( *this );
|
||||
|
||||
vector<const LanguageInfo*> v;
|
||||
GetLanguageInfos( v );
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
#include "stdafx.h"
|
||||
#include "smpackage.h"
|
||||
#include "EditInsallations.h"
|
||||
#include "smpackageUtil.h"
|
||||
#include "SMPackageUtil.h"
|
||||
#include "archutils/Win32/DialogUtil.h"
|
||||
#include ".\editinsallations.h"
|
||||
#include "LocalizedString.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
@@ -43,6 +46,7 @@ BEGIN_MESSAGE_MAP(EditInsallations, CDialog)
|
||||
ON_BN_CLICKED(IDC_BUTTON_MAKE_DEFAULT, OnButtonMakeDefault)
|
||||
ON_BN_CLICKED(IDC_BUTTON_ADD, OnButtonAdd)
|
||||
//}}AFX_MSG_MAP
|
||||
ON_LBN_SELCHANGE(IDC_LIST, OnLbnSelchangeList)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -53,7 +57,7 @@ BOOL EditInsallations::OnInitDialog()
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
SMPackageUtil::LocalizeDialogAndContents( *this );
|
||||
DialogUtil::LocalizeDialogAndContents( *this );
|
||||
|
||||
vector<RString> vs;
|
||||
SMPackageUtil::GetStepManiaInstallDirs( vs );
|
||||
@@ -69,17 +73,8 @@ BOOL EditInsallations::OnInitDialog()
|
||||
void EditInsallations::OnButtonRemove()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
if( m_list.GetCount() == 1 )
|
||||
{
|
||||
AfxMessageBox( "You cannot remove the list item in the list." );
|
||||
return;
|
||||
}
|
||||
|
||||
if( m_list.GetCurSel() == LB_ERR )
|
||||
{
|
||||
AfxMessageBox( "You must select an item from the list first." );
|
||||
return;
|
||||
}
|
||||
ASSERT( m_list.GetCount() > 1 ); // cannot remove the list item in the list
|
||||
ASSERT( m_list.GetCurSel() != LB_ERR );
|
||||
|
||||
m_list.DeleteString( m_list.GetCurSel() );
|
||||
}
|
||||
@@ -87,11 +82,7 @@ void EditInsallations::OnButtonRemove()
|
||||
void EditInsallations::OnButtonMakeDefault()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
if( m_list.GetCurSel() == LB_ERR )
|
||||
{
|
||||
AfxMessageBox( "You must select an item from the list first." );
|
||||
return;
|
||||
}
|
||||
ASSERT( m_list.GetCurSel() != LB_ERR );
|
||||
|
||||
CString sText;
|
||||
m_list.GetText( m_list.GetCurSel(), sText );
|
||||
@@ -99,6 +90,7 @@ void EditInsallations::OnButtonMakeDefault()
|
||||
m_list.InsertString( 0, sText );
|
||||
}
|
||||
|
||||
static LocalizedString YOU_MUST_TYPE_IN ("EditInstallations","You must type a program directory before clicking Add.");
|
||||
void EditInsallations::OnButtonAdd()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
@@ -107,7 +99,7 @@ void EditInsallations::OnButtonAdd()
|
||||
|
||||
if( sText == "" )
|
||||
{
|
||||
AfxMessageBox( "You must type a SM or DWI program directory before clicking add." );
|
||||
AfxMessageBox( YOU_MUST_TYPE_IN.GetValue() );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -129,6 +121,16 @@ void EditInsallations::OnOK()
|
||||
CDialog::OnOK();
|
||||
}
|
||||
|
||||
void EditInsallations::OnLbnSelchangeList()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
bool bSomethingSelected = m_list.GetCurSel() != LB_ERR;
|
||||
bool bMoreThanOne = m_list.GetCurSel() != LB_ERR;
|
||||
|
||||
this->GetDlgItem(IDC_BUTTON_MAKE_DEFAULT)->EnableWindow( bSomethingSelected );
|
||||
this->GetDlgItem(IDC_BUTTON_REMOVE)->EnableWindow( bMoreThanOne );
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2002-2005 Chris Danford
|
||||
* All rights reserved.
|
||||
|
||||
@@ -45,6 +45,8 @@ protected:
|
||||
virtual void OnOK();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
afx_msg void OnLbnSelchangeList();
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "smpackage.h"
|
||||
#include "EnterComment.h"
|
||||
#include "SMPackageUtil.h"
|
||||
#include "archutils/Win32/DialogUtil.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
@@ -42,7 +42,7 @@ BOOL EnterComment::OnInitDialog()
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
SMPackageUtil::LocalizeDialogAndContents( *this );
|
||||
DialogUtil::LocalizeDialogAndContents( *this );
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "smpackage.h"
|
||||
#include "EnterName.h"
|
||||
#include "SMPackageUtil.h"
|
||||
#include "archutils/Win32/DialogUtil.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
@@ -39,7 +39,7 @@ BOOL EnterName::OnInitDialog()
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
SMPackageUtil::LocalizeDialogAndContents( *this );
|
||||
DialogUtil::LocalizeDialogAndContents( *this );
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#include "RageFileManager.h"
|
||||
#include ".\languagesdlg.h"
|
||||
#include "CsvFile.h"
|
||||
#include "archutils/Win32/DialogUtil.h"
|
||||
#include "LocalizedString.h"
|
||||
|
||||
// LanguagesDlg dialog
|
||||
|
||||
@@ -42,7 +44,7 @@ BOOL LanguagesDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
SMPackageUtil::LocalizeDialogAndContents( *this );
|
||||
DialogUtil::LocalizeDialogAndContents( *this );
|
||||
|
||||
vector<RString> vs;
|
||||
GetDirListing( SpecialFiles::THEMES_DIR+"*", vs, true );
|
||||
@@ -217,6 +219,7 @@ void LanguagesDlg::OnBnClickedButtonCreate()
|
||||
OnSelchangeListLanguages();
|
||||
}
|
||||
|
||||
static LocalizedString THIS_WILL_PERMANENTLY_DELETE( "LanguagesDlg", "This will permanently delete '%s'. Continue?" );
|
||||
void LanguagesDlg::OnBnClickedButtonDelete()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
@@ -228,7 +231,7 @@ void LanguagesDlg::OnBnClickedButtonDelete()
|
||||
|
||||
RString sLanguageFile = GetLanguageFile( sTheme, sLanguage );
|
||||
|
||||
int iRet = MessageBox( ssprintf("This will permanently delete '%s'. Continue?",sLanguageFile.c_str()), NULL, MB_OKCANCEL );
|
||||
int iRet = MessageBox( ssprintf(THIS_WILL_PERMANENTLY_DELETE.GetValue(),sLanguageFile.c_str()), NULL, MB_OKCANCEL );
|
||||
if( iRet != IDOK )
|
||||
return;
|
||||
|
||||
@@ -243,6 +246,9 @@ struct TranslationLine
|
||||
RString sSection, sID, sBaseLanguage, sCurrentLanguage;
|
||||
};
|
||||
|
||||
static LocalizedString FAILED_TO_SAVE ( "LanguagesDlg", "Failed to save '%s'." );
|
||||
static LocalizedString THERE_ARE_NO_STRINGS_TO_EXPORT ( "LanguagesDlg", "There are no strings to export for this language." );
|
||||
static LocalizedString EXPORTED_TO_YOUR_DESKTOP ( "LanguagesDlg", "Exported to your Desktop as '%s'." );
|
||||
void LanguagesDlg::OnBnClickedButtonExport()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
@@ -289,15 +295,22 @@ void LanguagesDlg::OnBnClickedButtonExport()
|
||||
RString sFullFile = "Desktop/"+sFile;
|
||||
if( iNumExpored == 0 )
|
||||
{
|
||||
MessageBox( "There are no strings to export for this language." );
|
||||
MessageBox( THERE_ARE_NO_STRINGS_TO_EXPORT.GetValue() );
|
||||
return;
|
||||
}
|
||||
|
||||
if( csv.WriteFile(sFullFile) )
|
||||
MessageBox( ssprintf("Exported to your Desktop as '%s'.",sFile.c_str()) );
|
||||
MessageBox( ssprintf(EXPORTED_TO_YOUR_DESKTOP.GetValue(),sFile.c_str()) );
|
||||
else
|
||||
MessageBox( ssprintf("Failed to save '%s'.",sFullFile.c_str()) );
|
||||
MessageBox( ssprintf(FAILED_TO_SAVE.GetValue(),sFullFile.c_str()) );
|
||||
}
|
||||
|
||||
static LocalizedString ERROR_READING_FILE ( "LanguagesDlg", "Error reading file '%s'." );
|
||||
static LocalizedString ERROR_PARSING_FILE ( "LanguagesDlg", "Error parsing file '%s'." );
|
||||
static LocalizedString IMPORTING_THESE_STRINGS_WILL_OVERRIDE( "LanguagesDlg", "Importing these strings will override all data in '%s'. Continue?" );
|
||||
static LocalizedString ERROR_READING ( "LanguagesDlg", "Error reading '%s'." );
|
||||
static LocalizedString ERROR_READING_EACH_LINE_MUST_HAVE ( "LanguagesDlg", "Error reading '%s': Each line must have either 3 or 4 values. This row has %d values." );
|
||||
static LocalizedString IMPORTED_STRINGS_INTO ( "LanguagesDlg", "Imported %d strings into '%s'. %d empty strings were ignored." );
|
||||
void LanguagesDlg::OnBnClickedButtonImport()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
@@ -322,20 +335,20 @@ void LanguagesDlg::OnBnClickedButtonImport()
|
||||
RageFileOsAbsolute cvsFile;
|
||||
if( !cvsFile.Open(sCsvFile) )
|
||||
{
|
||||
MessageBox( ssprintf("Error reading file '%s'.",sCsvFile.c_str()) );
|
||||
MessageBox( ssprintf(ERROR_READING_FILE.GetValue(),sCsvFile.c_str()) );
|
||||
return;
|
||||
}
|
||||
CsvFile csv;
|
||||
if( !csv.ReadFile(cvsFile) )
|
||||
{
|
||||
MessageBox( ssprintf("Error parsing file '%s'.",sCsvFile.c_str()) );
|
||||
MessageBox( ssprintf(ERROR_PARSING_FILE.GetValue(),sCsvFile.c_str()) );
|
||||
return;
|
||||
}
|
||||
|
||||
RString sLanguageFile = GetLanguageFile( sTheme, sLanguage );
|
||||
|
||||
{
|
||||
int iRet = MessageBox( ssprintf("Importing these strings will override all data in '%s'. Continue?",sLanguageFile.c_str()), NULL, MB_OKCANCEL );
|
||||
int iRet = MessageBox( ssprintf(IMPORTING_THESE_STRINGS_WILL_OVERRIDE.GetValue(),sLanguageFile.c_str()), NULL, MB_OKCANCEL );
|
||||
if( iRet != IDOK )
|
||||
return;
|
||||
}
|
||||
@@ -343,7 +356,7 @@ void LanguagesDlg::OnBnClickedButtonImport()
|
||||
IniFile ini;
|
||||
if( !ini.ReadFile(sLanguageFile) )
|
||||
{
|
||||
MessageBox( ssprintf("Error reading '%s'.",sLanguageFile.c_str()) );
|
||||
MessageBox( ssprintf(ERROR_READING.GetValue(),sLanguageFile.c_str()) );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -355,7 +368,7 @@ void LanguagesDlg::OnBnClickedButtonImport()
|
||||
int iNumValues = line->size();
|
||||
if( iNumValues != 3 && iNumValues != 4 )
|
||||
{
|
||||
MessageBox( ssprintf("Error reading '%s': Each line must have either 3 or 4 values. This row has %d values",sCsvFile.c_str(),iNumValues) );
|
||||
MessageBox( ssprintf(ERROR_READING_EACH_LINE_MUST_HAVE.GetValue(),sCsvFile.c_str(),iNumValues) );
|
||||
return;
|
||||
}
|
||||
tl.sSection = (*line)[0];
|
||||
@@ -375,9 +388,9 @@ void LanguagesDlg::OnBnClickedButtonImport()
|
||||
}
|
||||
|
||||
if( ini.WriteFile(sLanguageFile) )
|
||||
MessageBox( ssprintf("Imported %d strings into '%s'. %d empty strings were ignored.",iNumImported,sLanguageFile.c_str(),iNumIgnored) );
|
||||
MessageBox( ssprintf(IMPORTED_STRINGS_INTO.GetValue(),iNumImported,sLanguageFile.c_str(),iNumIgnored) );
|
||||
else
|
||||
MessageBox( ssprintf("Failed to save '%s'.",sLanguageFile.c_str()) );
|
||||
MessageBox( ssprintf(FAILED_TO_SAVE.GetValue(),sLanguageFile.c_str()) );
|
||||
|
||||
OnSelchangeListThemes();
|
||||
}
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
#include "ProductInfo.h"
|
||||
#include "mainmenudlg.h"
|
||||
#include "LanguagesDlg.h"
|
||||
#include ".\mainmenudlg.h"
|
||||
#include "archutils/Win32/DialogUtil.h"
|
||||
#include "LocalizedString.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
@@ -43,7 +46,6 @@ void MainMenuDlg::DoDataExchange(CDataExchange* pDX)
|
||||
//{{AFX_DATA_MAP(MainMenuDlg)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
//}}AFX_DATA_MAP
|
||||
DDX_Control(pDX, IDC_STATIC_HEADER_TEXT, m_staticHeaderText);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +61,8 @@ BEGIN_MESSAGE_MAP(MainMenuDlg, CDialog)
|
||||
//}}AFX_MSG_MAP
|
||||
ON_BN_CLICKED(IDC_BUTTON_LAUNCH_GAME, OnBnClickedButtonLaunchGame)
|
||||
ON_BN_CLICKED(IDC_LANGUAGES, OnBnClickedLanguages)
|
||||
ON_WM_CTLCOLOR()
|
||||
ON_WM_ERASEBKGND()
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -103,15 +107,23 @@ RString GetLastErrorString()
|
||||
return s;
|
||||
}
|
||||
|
||||
static LocalizedString MUSIC_FILE ( "MainMenuDlg", "Music file" );
|
||||
static LocalizedString FAILED_TO_CREATE_DIRECTORY ( "MainMenuDlg", "Failed to create directory '%s': %s" );
|
||||
static LocalizedString FAILED_TO_CREATE_SONG_DIRECTORY ( "MainMenuDlg", "Failed to create song directory '%s': %s" );
|
||||
static LocalizedString FAILED_TO_COPY_MUSIC_FILE ( "MainMenuDlg", "Failed to copy music file '%s' to '%s': %s" );
|
||||
static LocalizedString FAILED_TO_CREATE_THE_SONG_FILE ( "MainMenuDlg", "Failed to create the song file '%s'" );
|
||||
static LocalizedString SUCCESS_CREATED_THE_SONG ( "MainMenuDlg", "Success. Created the song '%s'" );
|
||||
void MainMenuDlg::OnCreateSong()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
ASSERT(0);
|
||||
// fix compile
|
||||
CFileDialog dialog (
|
||||
TRUE, // file open?
|
||||
NULL, // default file extension
|
||||
NULL, // default file name
|
||||
OFN_HIDEREADONLY | OFN_NOCHANGEDIR, // flags
|
||||
"Music file (*.mp3;*.ogg)|*.mp3;*.ogg|||"
|
||||
""//MUSIC_FILE.GetValue()+" (*.mp3;*.ogg)|*.mp3;*.ogg|||"
|
||||
);
|
||||
int iRet = dialog.DoModal();
|
||||
RString sMusicFile = dialog.GetPathName();
|
||||
@@ -131,7 +143,7 @@ void MainMenuDlg::OnCreateSong()
|
||||
// This failure is ok. We probably created this directory already while importing another song.
|
||||
break;
|
||||
default:
|
||||
MessageBox( "Failed to create directory '" + sSongDirectory + "': " + GetLastErrorString() );
|
||||
MessageBox( ssprintf(FAILED_TO_CREATE_DIRECTORY.GetValue(),sSongDirectory.c_str(),GetLastErrorString().c_str()) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -140,7 +152,7 @@ void MainMenuDlg::OnCreateSong()
|
||||
bSuccess = CreateDirectory( sSongDirectory, NULL ); // CreateDirectory doesn't like a trailing slash
|
||||
if( !bSuccess )
|
||||
{
|
||||
MessageBox( "Failed to create song directory '" + sSongDirectory + "': " + GetLastErrorString() );
|
||||
MessageBox( ssprintf(FAILED_TO_CREATE_SONG_DIRECTORY.GetValue(),sSongDirectory.c_str(),GetLastErrorString().c_str()) );
|
||||
return;
|
||||
}
|
||||
sSongDirectory += "\\";
|
||||
@@ -149,7 +161,7 @@ void MainMenuDlg::OnCreateSong()
|
||||
bSuccess = CopyFile( sMusicFile, sNewMusicFile, TRUE );
|
||||
if( !bSuccess )
|
||||
{
|
||||
MessageBox( "Failed to copy music file to '" + sNewMusicFile + "': " + GetLastErrorString() );
|
||||
MessageBox( ssprintf(FAILED_TO_COPY_MUSIC_FILE.GetValue(),sMusicFile.c_str(),sNewMusicFile.c_str(),GetLastErrorString().c_str()) );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -159,12 +171,12 @@ void MainMenuDlg::OnCreateSong()
|
||||
FILE *fp = fopen( sNewSongFile, "w" );
|
||||
if( fp == NULL )
|
||||
{
|
||||
MessageBox( "Failed to create the song file '" + sNewSongFile + "'" );
|
||||
MessageBox( ssprintf(FAILED_TO_CREATE_THE_SONG_FILE.GetValue(),sNewSongFile.c_str()) );
|
||||
return;
|
||||
}
|
||||
fclose( fp );
|
||||
|
||||
MessageBox( "Success. Created the song '" + sSongDirectory + "'" );
|
||||
MessageBox( ssprintf(SUCCESS_CREATED_THE_SONG.GetValue(),sSongDirectory.c_str()) );
|
||||
}
|
||||
|
||||
BOOL MainMenuDlg::OnInitDialog()
|
||||
@@ -172,8 +184,8 @@ BOOL MainMenuDlg::OnInitDialog()
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
SMPackageUtil::LocalizeDialogAndContents( *this );
|
||||
SMPackageUtil::SetHeaderFont( *this );
|
||||
DialogUtil::LocalizeDialogAndContents( *this );
|
||||
DialogUtil::SetHeaderFont( *this, IDC_STATIC_HEADER_TEXT );
|
||||
|
||||
TCHAR szCurDir[MAX_PATH];
|
||||
GetCurrentDirectory( ARRAYSIZE(szCurDir), szCurDir );
|
||||
@@ -185,18 +197,20 @@ BOOL MainMenuDlg::OnInitDialog()
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
static LocalizedString FAILED_TO_DELETE_FILE ( "MainMenuDlg", "Failed to delete file '%s'." );
|
||||
static LocalizedString IS_ALREADY_CLEARED ( "MainMenuDlg", "'%s' is already cleared." );
|
||||
void MainMenuDlg::OnBnClickedClearKeymaps()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
|
||||
if( !DoesFileExist( SpecialFiles::KEYMAPS_PATH ) )
|
||||
{
|
||||
MessageBox( SpecialFiles::KEYMAPS_PATH + " is already cleared." );
|
||||
MessageBox( ssprintf(IS_ALREADY_CLEARED.GetValue(),SpecialFiles::KEYMAPS_PATH.c_str()) );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !DeleteFile( SpecialFiles::KEYMAPS_PATH ) )
|
||||
MessageBox( "Failed to delete file " + SpecialFiles::KEYMAPS_PATH + "." );
|
||||
MessageBox( ssprintf(FAILED_TO_DELETE_FILE.GetValue(), SpecialFiles::KEYMAPS_PATH.c_str()) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,36 +221,39 @@ void MainMenuDlg::OnBnClickedChangePreferences()
|
||||
dlg.DoModal();
|
||||
}
|
||||
|
||||
static LocalizedString DOESNT_EXIST_IT_WILL_BE_CREATED ( "MainMenuDlg", "'%s' doesn't exist. It will be created next time you start the game." );
|
||||
static LocalizedString FAILED_TO_OPEN ( "MainMenuDlg", "Failed to open '%s': %s" );
|
||||
void MainMenuDlg::OnBnClickedOpenPreferences()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
if( !DoesFileExist( SpecialFiles::PREFERENCES_INI_PATH ) )
|
||||
{
|
||||
MessageBox( SpecialFiles::PREFERENCES_INI_PATH + " doesn't exist. It will be created next time you start the game." );
|
||||
MessageBox( ssprintf(DOESNT_EXIST_IT_WILL_BE_CREATED.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str()) );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( NULL == ::ShellExecute( this->m_hWnd, "open", SpecialFiles::PREFERENCES_INI_PATH, "", "", SW_SHOWNORMAL ) )
|
||||
MessageBox( "Failed to open " + SpecialFiles::PREFERENCES_INI_PATH + ": " + GetLastErrorString() );
|
||||
MessageBox( ssprintf(FAILED_TO_OPEN.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str(),GetLastErrorString().c_str()) );
|
||||
}
|
||||
}
|
||||
|
||||
static LocalizedString CLEARED( "MainMenuDlg", "'%s' cleared" );
|
||||
void MainMenuDlg::OnBnClickedClearPreferences()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
if( !DoesFileExist( SpecialFiles::PREFERENCES_INI_PATH ) )
|
||||
{
|
||||
MessageBox( SpecialFiles::PREFERENCES_INI_PATH + " is already cleared." );
|
||||
MessageBox( ssprintf(IS_ALREADY_CLEARED.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str()) );
|
||||
return;
|
||||
}
|
||||
|
||||
if( !DeleteFile( SpecialFiles::PREFERENCES_INI_PATH ) )
|
||||
{
|
||||
MessageBox( "Failed to delete file " + SpecialFiles::PREFERENCES_INI_PATH + "." );
|
||||
MessageBox( ssprintf(FAILED_TO_DELETE_FILE.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str()) );
|
||||
return;
|
||||
}
|
||||
|
||||
MessageBox( SpecialFiles::PREFERENCES_INI_PATH + " cleared." );
|
||||
MessageBox( ssprintf(CLEARED.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str()) );
|
||||
}
|
||||
|
||||
void MainMenuDlg::OnBnClickedButtonLaunchGame()
|
||||
@@ -253,6 +270,21 @@ void MainMenuDlg::OnBnClickedLanguages()
|
||||
dlg.DoModal();
|
||||
}
|
||||
|
||||
HBRUSH MainMenuDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
|
||||
{
|
||||
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
|
||||
|
||||
// TODO: Change any attributes of the DC here
|
||||
if( pWnd->GetDlgCtrlID() == IDC_STATIC_HEADER_TEXT )
|
||||
{
|
||||
hbr = (HBRUSH)::GetStockObject(HOLLOW_BRUSH);
|
||||
pDC->SetBkMode(TRANSPARENT);
|
||||
}
|
||||
|
||||
// TODO: Return a different brush if the default is not desired
|
||||
return hbr;
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2002-2005 Chris Danford
|
||||
* All rights reserved.
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
// MainMenuDlg.h : header file
|
||||
//
|
||||
|
||||
#include "TransparentStatic.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// MainMenuDlg dialog
|
||||
|
||||
@@ -34,7 +32,6 @@ public:
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
CTransparentStatic m_staticHeaderText;
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(MainMenuDlg)
|
||||
@@ -53,6 +50,7 @@ protected:
|
||||
public:
|
||||
afx_msg void OnBnClickedButtonLaunchGame();
|
||||
afx_msg void OnBnClickedLanguages();
|
||||
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#include <algorithm>
|
||||
#include "RageFileManager.h"
|
||||
#include "RageFileDriverZip.h"
|
||||
#include "archutils/Win32/DialogUtil.h"
|
||||
#include "LocalizedString.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
@@ -48,7 +50,6 @@ void CSMPackageInstallDlg::DoDataExchange(CDataExchange* pDX)
|
||||
DDX_Control(pDX, IDC_BUTTON_EDIT, m_buttonEdit);
|
||||
DDX_Control(pDX, IDC_COMBO_DIR, m_comboDir);
|
||||
//}}AFX_DATA_MAP
|
||||
DDX_Control(pDX, IDC_STATIC_HEADER_TEXT, m_staticHeaderText);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +58,7 @@ BEGIN_MESSAGE_MAP(CSMPackageInstallDlg, CDialog)
|
||||
ON_WM_PAINT()
|
||||
ON_BN_CLICKED(IDC_BUTTON_EDIT, OnButtonEdit)
|
||||
//}}AFX_MSG_MAP
|
||||
ON_WM_CTLCOLOR()
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
@@ -68,6 +70,7 @@ static bool CompareStringNoCase( const RString &s1, const RString &s2 )
|
||||
return s1.CompareNoCase( s2 ) < 0;
|
||||
}
|
||||
|
||||
static LocalizedString IS_NOT_A_VALID_ZIP( "CSMPackageInstallDlg", "'%s' is not a valid zip archive." );
|
||||
BOOL CSMPackageInstallDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
@@ -78,13 +81,13 @@ BOOL CSMPackageInstallDlg::OnInitDialog()
|
||||
SetIcon(m_hIcon, FALSE); // Set small icon
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
SMPackageUtil::LocalizeDialogAndContents( *this );
|
||||
SMPackageUtil::SetHeaderFont( *this );
|
||||
DialogUtil::LocalizeDialogAndContents( *this );
|
||||
DialogUtil::SetHeaderFont( *this, IDC_STATIC_HEADER_TEXT );
|
||||
|
||||
// mount the zip
|
||||
if( !FILEMAN->Mount( "zip", m_sPackagePath, TEMP_MOUNT_POINT ) )
|
||||
{
|
||||
AfxMessageBox( ssprintf("'%s' is not a valid zip archive.", m_sPackagePath), MB_ICONSTOP );
|
||||
AfxMessageBox( ssprintf(IS_NOT_A_VALID_ZIP.GetValue(), m_sPackagePath), MB_ICONSTOP );
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
@@ -161,6 +164,7 @@ void CSMPackageInstallDlg::OnPaint()
|
||||
}
|
||||
}
|
||||
#include <direct.h>
|
||||
#include ".\smpackageinstalldlg.h"
|
||||
|
||||
bool CSMPackageInstallDlg::CheckPackages()
|
||||
{
|
||||
@@ -236,6 +240,9 @@ bool CSMPackageInstallDlg::CheckPackages()
|
||||
return true;
|
||||
}
|
||||
|
||||
static LocalizedString NO_INSTALLATIONS ("CSMPackageInstallDlg", "No Installations found. Exiting.");
|
||||
static LocalizedString ERROR_COPYING_FILE ("CSMPackageInstallDlg", "Error copying file '%s'");
|
||||
static LocalizedString PACKAGE_INSTALLED_SUCCESSFULLY ("CSMPackageInstallDlg","Package installed successfully!");
|
||||
void CSMPackageInstallDlg::OnOK()
|
||||
{
|
||||
// TODO: Add extra validation here
|
||||
@@ -255,7 +262,7 @@ void CSMPackageInstallDlg::OnOK()
|
||||
int iSelectedInstallDirIndex = m_comboDir.GetCurSel();
|
||||
if( iSelectedInstallDirIndex == -1 )
|
||||
{
|
||||
MessageBox( "No Installations", "Error", MB_OK|MB_ICONEXCLAMATION );
|
||||
MessageBox( NO_INSTALLATIONS.GetValue(), NULL, MB_OK|MB_ICONEXCLAMATION );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -326,8 +333,8 @@ retry_unzip:
|
||||
RString sTo = sInstallDir + sTo;
|
||||
if( !FileCopy( sFile, sTo ) )
|
||||
{
|
||||
RString sError = ssprintf( "Error copying file '%s'", sBareFile.c_str() );
|
||||
switch( MessageBox( sError, "Error Extracting File", MB_ABORTRETRYIGNORE|MB_ICONEXCLAMATION ) )
|
||||
RString sError = ssprintf( ERROR_COPYING_FILE.GetValue(), sBareFile.c_str() );
|
||||
switch( MessageBox( sError, NULL, MB_ABORTRETRYIGNORE|MB_ICONEXCLAMATION ) )
|
||||
{
|
||||
case IDABORT:
|
||||
exit(1);
|
||||
@@ -344,7 +351,7 @@ retry_unzip:
|
||||
pProgress1->StepIt(); //increase the progress bar of 1 step
|
||||
}
|
||||
|
||||
AfxMessageBox( "Package installed successfully!" );
|
||||
AfxMessageBox( PACKAGE_INSTALLED_SUCCESSFULLY.GetValue() );
|
||||
|
||||
// close the dialog
|
||||
CDialog::OnOK();
|
||||
@@ -375,6 +382,21 @@ void CSMPackageInstallDlg::RefreshInstallationList()
|
||||
m_comboDir.SetCurSel( 0 ); // guaranteed to be at least one item
|
||||
}
|
||||
|
||||
HBRUSH CSMPackageInstallDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
|
||||
{
|
||||
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
|
||||
|
||||
// TODO: Change any attributes of the DC here
|
||||
if( pWnd->GetDlgCtrlID() == IDC_STATIC_HEADER_TEXT )
|
||||
{
|
||||
hbr = (HBRUSH)::GetStockObject(HOLLOW_BRUSH);
|
||||
pDC->SetBkMode(TRANSPARENT);
|
||||
}
|
||||
|
||||
// TODO: Return a different brush if the default is not desired
|
||||
return hbr;
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2002-2005 Chris Danford
|
||||
* All rights reserved.
|
||||
@@ -398,4 +420,4 @@ void CSMPackageInstallDlg::RefreshInstallationList()
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
*/
|
||||
@@ -7,8 +7,6 @@
|
||||
// SMPackageInstallDlg.h : header file
|
||||
//
|
||||
|
||||
#include "TransparentStatic.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CSMPackageInstallDlg dialog
|
||||
|
||||
@@ -40,7 +38,6 @@ protected:
|
||||
|
||||
HICON m_hIcon;
|
||||
RString m_sPackagePath;
|
||||
CTransparentStatic m_staticHeaderText;
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CSMPackageInstallDlg)
|
||||
@@ -50,6 +47,8 @@ protected:
|
||||
afx_msg void OnButtonEdit();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
#include "ProductInfo.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageFileManager.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "resource.h"
|
||||
#include "LocalizedString.h"
|
||||
|
||||
void SMPackageUtil::WriteStepManiaInstallDirs( const vector<RString>& asInstallDirsToWrite )
|
||||
{
|
||||
@@ -164,19 +164,22 @@ bool SMPackageUtil::IsValidPackageDirectory( RString path )
|
||||
return true;
|
||||
}
|
||||
|
||||
static LocalizedString COULD_NOT_FIND( "SMPackageUtil", "Could not find '%s'." );
|
||||
bool SMPackageUtil::LaunchGame()
|
||||
{
|
||||
PROCESS_INFORMATION pi;
|
||||
STARTUPINFO si;
|
||||
ZeroMemory( &si, sizeof(si) );
|
||||
|
||||
RString sFile = PRODUCT_NAME ".exe";
|
||||
RString sExe = PRODUCT_NAME ".exe";
|
||||
RString sFile = sExe;
|
||||
if( !DoesFileExist(sFile) )
|
||||
{
|
||||
sFile = "Program\\" + sFile;
|
||||
if( !DoesFileExist(sFile) )
|
||||
{
|
||||
MessageBox( NULL, "Could not find " PRODUCT_NAME ".exe", "Error", MB_ICONEXCLAMATION );
|
||||
RString sError = ssprintf( COULD_NOT_FIND.GetValue(), sExe.c_str() );
|
||||
::MessageBox( NULL, sError, NULL, MB_OK|MB_ICONEXCLAMATION );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -212,36 +215,6 @@ RString SMPackageUtil::GetLanguageCodeFromDisplayString( const RString &sDisplay
|
||||
return s;
|
||||
}
|
||||
|
||||
void SMPackageUtil::SetHeaderFont( CDialog &dlg )
|
||||
{
|
||||
CWnd *pWnd = dlg.GetDlgItem( IDC_STATIC_HEADER_TEXT );
|
||||
ASSERT( pWnd );
|
||||
CFont *pFont = new CFont;
|
||||
const int FONT_POINTS = 16;
|
||||
pFont->CreatePointFont( FONT_POINTS*10, "Arial Black" );
|
||||
pWnd->SetFont( pFont );
|
||||
}
|
||||
|
||||
void SMPackageUtil::LocalizeDialogAndContents( CDialog &dlg )
|
||||
{
|
||||
CString sTemp;
|
||||
dlg.GetWindowText( sTemp );
|
||||
RString sGroup = "Tools-"+sTemp;
|
||||
dlg.GetWindowText( sTemp );
|
||||
RString s = sTemp;
|
||||
dlg.SetWindowText( THEME->GetString(sGroup,s) );
|
||||
|
||||
for( CWnd *pChild = dlg.GetTopWindow(); pChild != NULL; pChild = pChild->GetNextWindow() )
|
||||
{
|
||||
pChild->GetWindowText( sTemp );
|
||||
RString s = sTemp;
|
||||
if( s.empty() )
|
||||
continue;
|
||||
s = THEME->GetString( sGroup, s );
|
||||
pChild->SetWindowText( s );
|
||||
}
|
||||
}
|
||||
|
||||
static const RString TEMP_MOUNT_POINT = "/@package/";
|
||||
|
||||
RageFileOsAbsolute::~RageFileOsAbsolute()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "smpackage.h"
|
||||
#include "ShowComment.h"
|
||||
#include "SMPackageUtil.h"
|
||||
#include "archutils/Win32/DialogUtil.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
@@ -50,7 +50,7 @@ BOOL ShowComment::OnInitDialog()
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
SMPackageUtil::LocalizeDialogAndContents( *this );
|
||||
DialogUtil::LocalizeDialogAndContents( *this );
|
||||
|
||||
m_edit.SetWindowText( m_sComment );
|
||||
|
||||
|
||||
@@ -15,10 +15,13 @@
|
||||
#include "IniFile.h"
|
||||
#include "RageFileDriverMemory.h"
|
||||
#include "archutils/Win32/SpecialDirs.h"
|
||||
#include "archutils/Win32/DialogUtil.h"
|
||||
#include "LocalizedString.h"
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <set>
|
||||
#include ".\smpackageexportdlg.h"
|
||||
using namespace std;
|
||||
|
||||
#ifdef _DEBUG
|
||||
@@ -49,7 +52,6 @@ void CSmpackageExportDlg::DoDataExchange(CDataExchange* pDX)
|
||||
DDX_Control(pDX, IDC_BUTTON_EXPORT_AS_ONE, m_buttonExportAsOne);
|
||||
DDX_Control(pDX, IDC_TREE, m_tree);
|
||||
//}}AFX_DATA_MAP
|
||||
DDX_Control(pDX, IDC_STATIC_HEADER_TEXT, m_staticHeaderText);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +64,7 @@ BEGIN_MESSAGE_MAP(CSmpackageExportDlg, CDialog)
|
||||
ON_CBN_SELCHANGE(IDC_COMBO_DIR, OnSelchangeComboDir)
|
||||
ON_BN_CLICKED(IDC_BUTTON_OPEN, OnButtonOpen)
|
||||
//}}AFX_MSG_MAP
|
||||
ON_WM_CTLCOLOR()
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -72,8 +75,7 @@ BOOL CSmpackageExportDlg::OnInitDialog()
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
SMPackageUtil::LocalizeDialogAndContents( *this );
|
||||
SMPackageUtil::SetHeaderFont( *this );
|
||||
DialogUtil::LocalizeDialogAndContents( *this );
|
||||
|
||||
RefreshInstallationList();
|
||||
|
||||
@@ -95,6 +97,7 @@ RString ReplaceInvalidFileNameChars( RString sOldFileName )
|
||||
return sNewFileName;
|
||||
}
|
||||
|
||||
static LocalizedString ERROR_ADDING_FILE ( "SmpackageExportDlg", "Error adding file '%s'." );
|
||||
static bool ExportPackage( RString sPackageName, const vector<RString>& asDirectoriesToExport, RString sComment )
|
||||
{
|
||||
CZipArchive zip;
|
||||
@@ -187,7 +190,7 @@ static bool ExportPackage( RString sPackageName, const vector<RString>& asDirect
|
||||
}
|
||||
catch (CException* e)
|
||||
{
|
||||
AfxMessageBox( ssprintf("Error adding file '%s'.", sFilePath) );
|
||||
AfxMessageBox( ssprintf(ERROR_ADDING_FILE.GetValue(), sFilePath.c_str()) );
|
||||
zip.Close();
|
||||
e->Delete();
|
||||
return false;
|
||||
@@ -219,14 +222,16 @@ bool CSmpackageExportDlg::MakeComment( RString &comment )
|
||||
return true;
|
||||
}
|
||||
|
||||
static LocalizedString NO_ITEMS_ARE_CHECKED ( "CSmpackageExportDlg", "No items are checked." );
|
||||
static LocalizedString SUCCESSFULLY_EXPORTED( "CSmpackageExportDlg", "Successfully exported package '%s' to your Desktop." );
|
||||
void CSmpackageExportDlg::OnButtonExportAsOne()
|
||||
{
|
||||
vector<RString> asPaths;
|
||||
GetCheckedPaths( asPaths );
|
||||
|
||||
if( asPaths.size() == 0 )
|
||||
if( asPaths.size() >= 0 )
|
||||
{
|
||||
AfxMessageBox( "No items are checked" );
|
||||
AfxMessageBox( NO_ITEMS_ARE_CHECKED.GetValue() );
|
||||
return;
|
||||
}
|
||||
else if( asPaths.size() == 1 )
|
||||
@@ -250,9 +255,11 @@ void CSmpackageExportDlg::OnButtonExportAsOne()
|
||||
return; // cancelled
|
||||
|
||||
if( ExportPackage( sPackageName, asPaths, sComment ) )
|
||||
AfxMessageBox( ssprintf("Successfully exported package '%s' to your Desktop.",sPackageName) );
|
||||
AfxMessageBox( ssprintf(SUCCESSFULLY_EXPORTED.GetValue(),sPackageName.c_str()) );
|
||||
}
|
||||
|
||||
static LocalizedString THE_FOLLOWING_PACKAGES_WERE_EXPORTED ("CSmpackageExportDlg","The following packages were exported to your Desktop:");
|
||||
static LocalizedString THE_FOLLOWING_PACKAGES_FAILED ("CSmpackageExportDlg","The following packages failed to export:");
|
||||
void CSmpackageExportDlg::OnButtonExportAsIndividual()
|
||||
{
|
||||
vector<RString> asPaths;
|
||||
@@ -260,7 +267,7 @@ void CSmpackageExportDlg::OnButtonExportAsIndividual()
|
||||
|
||||
if( asPaths.size() == 0 )
|
||||
{
|
||||
AfxMessageBox( "No items are checked" );
|
||||
AfxMessageBox( NO_ITEMS_ARE_CHECKED.GetValue() );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -292,10 +299,15 @@ void CSmpackageExportDlg::OnButtonExportAsIndividual()
|
||||
}
|
||||
|
||||
RString sMessage;
|
||||
if( asFailedPackages.size() == 0 )
|
||||
sMessage = ssprintf("Successfully exported the package%s '%s' to your Desktop.", asFailedPackages.size()>1?"s":"", join("', '",asExportedPackages) );
|
||||
else
|
||||
sMessage = ssprintf(" The packages %s failed to export.", join(", ",asFailedPackages) );
|
||||
if( asExportedPackages.size() > 0 )
|
||||
sMessage += THE_FOLLOWING_PACKAGES_WERE_EXPORTED.GetValue()+"\n\n"+join( "\n", asExportedPackages );
|
||||
|
||||
if( asFailedPackages.size() > 0 )
|
||||
{
|
||||
if( !sMessage.empty() )
|
||||
sMessage += "\n\n";
|
||||
sMessage += THE_FOLLOWING_PACKAGES_FAILED.GetValue()+"\n\n"+join( "\n", asFailedPackages );
|
||||
}
|
||||
AfxMessageBox( sMessage );
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "afxtempl.h"
|
||||
#include "TransparentStatic.h"
|
||||
|
||||
// SmpackageExportDlg.h : header file
|
||||
//
|
||||
@@ -46,8 +45,6 @@ protected:
|
||||
void GetCheckedPaths( vector<RString>& aCheckedItemsOut );
|
||||
bool MakeComment( RString &comment );
|
||||
|
||||
CTransparentStatic m_staticHeaderText;
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CSmpackageExportDlg)
|
||||
virtual BOOL OnInitDialog();
|
||||
@@ -59,6 +56,7 @@ protected:
|
||||
afx_msg void OnButtonOpen();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
// TransparentStatic.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "TransparentStatic.h"
|
||||
|
||||
|
||||
// CTransparentStatic
|
||||
|
||||
IMPLEMENT_DYNAMIC(CTransparentStatic, CStatic)
|
||||
CTransparentStatic::CTransparentStatic()
|
||||
{
|
||||
}
|
||||
|
||||
CTransparentStatic::~CTransparentStatic()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CTransparentStatic, CStatic)
|
||||
ON_MESSAGE(WM_SETTEXT,OnSetText)
|
||||
ON_WM_CTLCOLOR_REFLECT()
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
|
||||
// CTransparentStatic message handlers
|
||||
|
||||
LRESULT CTransparentStatic::OnSetText(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
LRESULT Result = Default();
|
||||
CRect Rect;
|
||||
GetWindowRect(&Rect);
|
||||
GetParent()->ScreenToClient(&Rect);
|
||||
GetParent()->InvalidateRect(&Rect);
|
||||
GetParent()->UpdateWindow();
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
||||
HBRUSH CTransparentStatic::CtlColor(CDC* pDC, UINT /*nCtlColor*/)
|
||||
{
|
||||
pDC->SetBkMode(TRANSPARENT);
|
||||
return (HBRUSH)GetStockObject(NULL_BRUSH);
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
// CTransparentStatic
|
||||
|
||||
class CTransparentStatic : public CStatic
|
||||
{
|
||||
DECLARE_DYNAMIC(CTransparentStatic)
|
||||
|
||||
public:
|
||||
CTransparentStatic();
|
||||
virtual ~CTransparentStatic();
|
||||
|
||||
protected:
|
||||
afx_msg LRESULT OnSetText(WPARAM,LPARAM);
|
||||
afx_msg HBRUSH CtlColor(CDC* /*pDC*/, UINT /*nCtlColor*/);
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "smpackage.h"
|
||||
#include "UninstallOld.h"
|
||||
#include "SMPackageUtil.h"
|
||||
#include "archutils/Win32/DialogUtil.h"
|
||||
|
||||
// UninstallOld dialog
|
||||
|
||||
@@ -30,7 +31,7 @@ BOOL UninstallOld::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
SMPackageUtil::LocalizeDialogAndContents( *this );
|
||||
DialogUtil::LocalizeDialogAndContents( *this );
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
@@ -16,6 +16,8 @@
|
||||
#define IDD_CHANGE_GAME_SETTINGS 149
|
||||
#define IDD_LANGUAGES 150
|
||||
#define IDD_CREATE_LANGUAGE 151
|
||||
#define IDB_BITMAP1 153
|
||||
#define IDB_BITMAP2 154
|
||||
#define IDC_LIST_SONGS 1000
|
||||
#define IDC_LIST 1000
|
||||
#define IDC_BUTTON_PLAY 1001
|
||||
@@ -91,7 +93,7 @@
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 153
|
||||
#define _APS_NEXT_RESOURCE_VALUE 155
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1068
|
||||
#define _APS_NEXT_SYMED_VALUE 104
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "ThemeManager.h"
|
||||
#include "SpecialFiles.h"
|
||||
#include "IniFile.h"
|
||||
|
||||
#include "LocalizedString.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
@@ -40,6 +40,8 @@ CSmpackageApp theApp;
|
||||
#include "ProductInfo.h"
|
||||
extern RString GetLastErrorString();
|
||||
|
||||
static LocalizedString FAILED_TO_OPEN ( "CSmpackageApp", "Failed to open '%s': %s" );
|
||||
static LocalizedString THE_FILE_DOES_NOT_EXIST ( "CSmpackageApp", "The file '%s' does not exist. Aborting installation." );
|
||||
BOOL CSmpackageApp::InitInstance()
|
||||
{
|
||||
TCHAR szCurrentDirectory[MAX_PATH];
|
||||
@@ -68,7 +70,7 @@ BOOL CSmpackageApp::InitInstance()
|
||||
RString sPersonalDir = SpecialDirs::GetMyDocumentsDir();
|
||||
RString sFile = sPersonalDir + PRODUCT_ID +"/Save/MachineProfile/Stats.xml";
|
||||
if( NULL == ::ShellExecute( NULL, "open", sFile, "", "", SW_SHOWNORMAL ) )
|
||||
AfxMessageBox( "Failed to open '" + sFile + "': " + GetLastErrorString() );
|
||||
AfxMessageBox( ssprintf(FAILED_TO_OPEN.GetValue(),sFile.c_str(),GetLastErrorString().c_str()) );
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
@@ -87,7 +89,7 @@ BOOL CSmpackageApp::InitInstance()
|
||||
{
|
||||
if( !FILEMAN->DoesFileExist(sPath) )
|
||||
{
|
||||
AfxMessageBox( ssprintf("The file '%s' does not exist. Aborting installation.",sPath), MB_ICONERROR );
|
||||
AfxMessageBox( ssprintf(THE_FILE_DOES_NOT_EXIST.GetValue(),sPath.c_str()), MB_ICONERROR );
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -123,8 +125,7 @@ BOOL CSmpackageApp::InitInstance()
|
||||
bool bPseudoLocalize;
|
||||
ini.GetValue( "PseudoLocalize", "Language", bPseudoLocalize );
|
||||
|
||||
THEME->SwitchThemeAndLanguage( SpecialFiles::BASE_THEME_NAME, sLanguage );
|
||||
THEME->SetPseudoLocalilze( bPseudoLocalize );
|
||||
THEME->SwitchThemeAndLanguage( SpecialFiles::BASE_THEME_NAME, sLanguage, bPseudoLocalize );
|
||||
|
||||
|
||||
// Show the Manager Dialog
|
||||
|
||||
@@ -99,62 +99,62 @@ BEGIN
|
||||
LTEXT "Install a package",IDC_STATIC_HEADER_TEXT,5,2,280,24
|
||||
END
|
||||
|
||||
IDD_EXPORTER DIALOGEX 0, 0, 332, 234
|
||||
IDD_EXPORTER DIALOGEX 0, 0, 349, 222
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP |
|
||||
WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "StepMania Tools"
|
||||
CAPTION "Export Packages"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",IDOK,255,215,69,14
|
||||
PUSHBUTTON "Launch Game",IDC_BUTTON_PLAY,5,215,70,15
|
||||
PUSHBUTTON "Export As One",IDC_BUTTON_EXPORT_AS_ONE,255,104,69,15
|
||||
CONTROL 1045,IDC_STATIC,"Static",SS_BITMAP,0,0,332,38
|
||||
DEFPUSHBUTTON "Close",IDOK,284,201,57,14
|
||||
PUSHBUTTON "Launch Game",IDC_BUTTON_PLAY,7,200,70,15
|
||||
PUSHBUTTON "Export As One",IDC_BUTTON_EXPORT_AS_ONE,255,87,86,15
|
||||
PUSHBUTTON "Export As Individual",IDC_BUTTON_EXPORT_AS_INDIVIDUAL,
|
||||
255,137,69,15
|
||||
255,120,86,15
|
||||
CONTROL "Tree2",IDC_TREE,"SysTreeView32",TVS_HASBUTTONS |
|
||||
TVS_HASLINES | TVS_LINESATROOT | TVS_CHECKBOXES |
|
||||
WS_BORDER | WS_TABSTOP,7,61,239,151
|
||||
COMBOBOX IDC_COMBO_DIR,74,40,170,105,CBS_DROPDOWNLIST |
|
||||
WS_BORDER | WS_TABSTOP,7,43,239,151
|
||||
COMBOBOX IDC_COMBO_DIR,16,17,229,105,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Edit Installations",IDC_BUTTON_EDIT,253,39,71,14
|
||||
LTEXT "Select Installation:",IDC_STATIC,7,42,66,11
|
||||
PUSHBUTTON "Open Program Folder",IDC_BUTTON_OPEN,83,215,79,15
|
||||
LTEXT "Export Packages",IDC_STATIC_HEADER_TEXT,5,2,280,24
|
||||
PUSHBUTTON "Edit Installations",IDC_BUTTON_EDIT,250,16,85,14
|
||||
PUSHBUTTON "Open Program Folder",IDC_BUTTON_OPEN,88,200,93,15
|
||||
GROUPBOX "Installation",IDC_STATIC,7,7,334,29
|
||||
END
|
||||
|
||||
IDD_DIALOG_NAME DIALOG 0, 0, 261, 58
|
||||
IDD_DIALOG_NAME DIALOGEX 0, 0, 261, 58
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Name Your Package"
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Please enter a name for your new package:",IDC_STATIC,7,
|
||||
7,179,12
|
||||
LTEXT "Enter a name for your new package:",IDC_STATIC,7,7,188,
|
||||
12
|
||||
EDITTEXT IDC_EDIT,17,20,178,13,ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,204,7,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,204,24,50,14
|
||||
DEFPUSHBUTTON "OK",IDOK,200,7,54,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,200,24,54,14
|
||||
LTEXT "NOTE: (leave off the "".smzip"" extension)",IDC_STATIC,
|
||||
18,38,179,12
|
||||
END
|
||||
|
||||
IDD_EDIT_INSTALLATIONS DIALOG 0, 0, 233, 220
|
||||
IDD_EDIT_INSTALLATIONS DIALOGEX 0, 0, 243, 221
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Edit Installations"
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,117,198,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,175,198,50,14
|
||||
LISTBOX IDC_LIST,17,21,136,89,LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
|
||||
DEFPUSHBUTTON "OK",IDOK,125,199,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,185,199,50,14
|
||||
LISTBOX IDC_LIST,17,30,136,80,LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
EDITTEXT IDC_EDIT,19,168,136,13,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Add",IDC_BUTTON_ADD,165,168,50,14
|
||||
PUSHBUTTON "Remove",IDC_BUTTON_REMOVE,164,44,50,15
|
||||
PUSHBUTTON "Make Default",IDC_BUTTON_MAKE_DEFAULT,164,24,50,15
|
||||
GROUPBOX "Add New Installation",IDC_STATIC,7,130,218,59
|
||||
GROUPBOX "Current Installations (the top installation is the default)",
|
||||
IDC_STATIC,7,7,218,114
|
||||
EDITTEXT IDC_EDIT,19,167,136,13,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Add",IDC_BUTTON_ADD,165,167,50,14
|
||||
PUSHBUTTON "Remove",IDC_BUTTON_REMOVE,160,54,68,15,WS_DISABLED
|
||||
PUSHBUTTON "Make Default",IDC_BUTTON_MAKE_DEFAULT,160,34,68,15,
|
||||
WS_DISABLED
|
||||
GROUPBOX "Add New Installation",IDC_STATIC,7,130,228,59
|
||||
GROUPBOX "Current Installations",IDC_STATIC,7,7,228,114
|
||||
LTEXT "Enter the complete path to a StepMania or DWI installation\r\ne.g. ""C:\\Program Files\\StepMania""",
|
||||
IDC_STATIC,18,144,196,17
|
||||
LTEXT "The top installation is the default.",IDC_STATIC,19,17,
|
||||
196,12
|
||||
END
|
||||
|
||||
IDD_MENU DIALOGEX 0, 0, 332, 284
|
||||
@@ -165,35 +165,35 @@ BEGIN
|
||||
DEFPUSHBUTTON "Exit",IDOK,275,263,50,14
|
||||
CONTROL 1045,IDC_STATIC,"Static",SS_BITMAP,0,0,332,38
|
||||
GROUPBOX "Installation",IDC_STATIC,7,41,318,28
|
||||
PUSHBUTTON "Edit Installations",IDC_EDIT_INSTALLATIONS,241,49,75,15
|
||||
PUSHBUTTON "Edit Installations",IDC_EDIT_INSTALLATIONS,233,49,83,15
|
||||
GROUPBOX "Create and Share",IDC_STATIC,7,176,318,78
|
||||
PUSHBUTTON "Export Packages",IDC_EXPORT_PACKAGES,14,190,83,15
|
||||
LTEXT "Create .smzip package files to share with other users. Packages can contain songs, courses, themes, backgrounds, and more.",
|
||||
IDC_STATIC,106,190,215,18
|
||||
PUSHBUTTON "Create Song",IDC_CREATE_SONG,14,211,83,15
|
||||
PUSHBUTTON "Export Packages",IDC_EXPORT_PACKAGES,14,190,91,15
|
||||
LTEXT "Create .smzip package files to share with other users.",
|
||||
IDC_STATIC,109,190,213,18
|
||||
PUSHBUTTON "Create Song",IDC_CREATE_SONG,14,211,91,15
|
||||
LTEXT "Create a new song in from your favorite mp3 or ogg music file.",
|
||||
IDC_STATIC,106,211,215,20
|
||||
IDC_STATIC,109,211,213,20
|
||||
GROUPBOX "Troubleshooting",IDC_STATIC,7,73,318,99
|
||||
PUSHBUTTON "Change Preferences",IDC_CHANGE_PREFERENCES,15,85,83,15
|
||||
PUSHBUTTON "Open Preferences",IDC_OPEN_PREFERENCES,15,127,83,15
|
||||
PUSHBUTTON "Change Preferences",IDC_CHANGE_PREFERENCES,14,85,91,15
|
||||
PUSHBUTTON "Open Preferences",IDC_OPEN_PREFERENCES,14,127,91,15
|
||||
LTEXT "Change the graphics API, sound API, and other settings that the game will use.",
|
||||
IDC_STATIC,106,85,215,18
|
||||
PUSHBUTTON "Clear Preferences",IDC_CLEAR_PREFERENCES,15,106,83,15
|
||||
PUSHBUTTON "Clear Mappings",IDC_CLEAR_KEYMAPS,15,148,83,15
|
||||
EDITTEXT IDC_EDIT_INSTALLATION,16,51,219,12,ES_AUTOHSCROLL |
|
||||
IDC_STATIC,110,85,213,18
|
||||
PUSHBUTTON "Clear Preferences",IDC_CLEAR_PREFERENCES,14,106,91,15
|
||||
PUSHBUTTON "Clear Mappings",IDC_CLEAR_KEYMAPS,14,148,91,15
|
||||
EDITTEXT IDC_EDIT_INSTALLATION,16,51,210,12,ES_AUTOHSCROLL |
|
||||
ES_READONLY
|
||||
LTEXT "Erase all of your keyboard and joystick mappings if you've made a mistake.",
|
||||
IDC_STATIC,106,148,214,18
|
||||
PUSHBUTTON "Launch Game",IDC_BUTTON_LAUNCH_GAME,189,263,70,14
|
||||
PUSHBUTTON "Languages",IDC_LANGUAGES,14,232,83,15
|
||||
IDC_STATIC,109,148,213,18
|
||||
PUSHBUTTON "Launch Game",IDC_BUTTON_LAUNCH_GAME,183,263,76,14
|
||||
PUSHBUTTON "Languages",IDC_LANGUAGES,14,232,91,15
|
||||
LTEXT "Create a new or manage existing language translations.",
|
||||
IDC_STATIC,106,232,215,20
|
||||
IDC_STATIC,109,232,213,20
|
||||
LTEXT "StepMania Tools Main Menu",IDC_STATIC_HEADER_TEXT,5,2,
|
||||
280,24
|
||||
LTEXT "Open the preferences file to make changes by hand.",
|
||||
IDC_STATIC,106,127,214,18
|
||||
IDC_STATIC,109,127,213,18
|
||||
LTEXT "Clear all preferences if you've made changes and the game won't start.",
|
||||
IDC_STATIC,106,106,214,18
|
||||
IDC_STATIC,109,106,213,18
|
||||
END
|
||||
|
||||
IDD_ENTER_COMMENT DIALOGEX 0, 0, 312, 202
|
||||
@@ -239,80 +239,80 @@ BEGIN
|
||||
CTEXT "Delete old packages?",IDC_STATIC,55,119,166,12
|
||||
END
|
||||
|
||||
IDD_CHANGE_GAME_SETTINGS DIALOGEX 0, 0, 162, 282
|
||||
IDD_CHANGE_GAME_SETTINGS DIALOGEX 0, 0, 162, 287
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Change Game Settings"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,49,260,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,104,260,50,14
|
||||
DEFPUSHBUTTON "OK",IDOK,49,265,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,104,265,50,14
|
||||
GROUPBOX "Graphics API",IDC_STATIC,7,7,147,66
|
||||
CONTROL "Default (recommended)",IDC_RADIO_DEFAULT,"Button",
|
||||
BS_AUTORADIOBUTTON | WS_GROUP,25,22,105,12
|
||||
CONTROL "OpenGL",IDC_RADIO_OPENGL,"Button",BS_AUTORADIOBUTTON,25,
|
||||
38,105,12
|
||||
BS_AUTORADIOBUTTON | WS_GROUP,21,22,129,12
|
||||
CONTROL "OpenGL",IDC_RADIO_OPENGL,"Button",BS_AUTORADIOBUTTON,21,
|
||||
38,129,12
|
||||
CONTROL "Direct3D",IDC_RADIO_DIRECT3D,"Button",
|
||||
BS_AUTORADIOBUTTON,25,54,105,12
|
||||
BS_AUTORADIOBUTTON,21,54,129,12
|
||||
GROUPBOX "Sound API",IDC_STATIC,7,77,147,100
|
||||
CONTROL "Default (recommended)",IDC_RADIO_SOUND_DEFAULT,"Button",
|
||||
BS_AUTORADIOBUTTON | WS_GROUP,25,92,105,12
|
||||
BS_AUTORADIOBUTTON | WS_GROUP,21,92,129,12
|
||||
CONTROL "DirectSound Hardware",
|
||||
IDC_RADIO_SOUND_DIRECTSOUND_HARDWARE,"Button",
|
||||
BS_AUTORADIOBUTTON,25,108,105,12
|
||||
BS_AUTORADIOBUTTON,21,108,129,12
|
||||
CONTROL "DirectSound Software",
|
||||
IDC_RADIO_SOUND_DIRECTSOUND_SOFTWARE,"Button",
|
||||
BS_AUTORADIOBUTTON,25,124,105,12
|
||||
BS_AUTORADIOBUTTON,21,124,129,12
|
||||
CONTROL "WaveOut",IDC_RADIO_SOUND_WAVEOUT,"Button",
|
||||
BS_AUTORADIOBUTTON,25,140,105,12
|
||||
BS_AUTORADIOBUTTON,21,140,129,12
|
||||
CONTROL "Null (no sound)",IDC_RADIO_SOUND_NULL,"Button",
|
||||
BS_AUTORADIOBUTTON,25,156,105,12
|
||||
BS_AUTORADIOBUTTON,21,156,129,12
|
||||
GROUPBOX "Logging",IDC_STATIC,7,181,147,50
|
||||
CONTROL "Log to Disk",IDC_CHECK_LOG_TO_DISK,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,26,197,106,10
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,21,197,129,10
|
||||
CONTROL "Show Log Window",IDC_CHECK_SHOW_LOG_WINDOW,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,26,213,106,10
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,21,213,129,10
|
||||
LTEXT "Tip: Change these only if you experience problems when using the default settings.",
|
||||
IDC_STATIC,7,234,147,26
|
||||
END
|
||||
|
||||
IDD_LANGUAGES DIALOGEX 0, 0, 329, 188
|
||||
IDD_LANGUAGES DIALOGEX 0, 0, 337, 189
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Language Translations"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",IDOK,272,167,50,14
|
||||
DEFPUSHBUTTON "Close",IDOK,280,168,50,14
|
||||
LTEXT "Themes",IDC_STATIC,7,7,101,10
|
||||
LTEXT "Languages",IDC_STATIC,118,7,98,10
|
||||
PUSHBUTTON "Create Language",IDC_BUTTON_CREATE,226,41,91,15
|
||||
PUSHBUTTON "Delete Language",IDC_BUTTON_DELETE,226,62,91,15
|
||||
PUSHBUTTON "Export CSV",IDC_BUTTON_EXPORT,226,83,91,15
|
||||
PUSHBUTTON "Import CSV",IDC_BUTTON_IMPORT,226,123,91,15
|
||||
PUSHBUTTON "Create Language",IDC_BUTTON_CREATE,230,41,91,15
|
||||
PUSHBUTTON "Delete Language",IDC_BUTTON_DELETE,230,62,91,15
|
||||
PUSHBUTTON "Export CSV",IDC_BUTTON_EXPORT,230,83,91,15
|
||||
PUSHBUTTON "Import CSV",IDC_BUTTON_IMPORT,230,123,91,15
|
||||
LTEXT "- Create a new language\n- Export the theme strings to a CSV\n- Edit the CSV using Excel or a text editor\n- Import the CSV file back into the same language",
|
||||
IDC_STATIC,7,144,240,37
|
||||
LTEXT "Selection details",IDC_STATIC,222,7,100,9
|
||||
LTEXT "Total Strings:",IDC_STATIC,225,17,62,10
|
||||
LTEXT "Need translation:",IDC_STATIC,225,28,69,10
|
||||
LTEXT "",IDC_STATIC_TOTAL_STRINGS,296,18,26,10
|
||||
LTEXT "",IDC_STATIC_NEED_TRANSLATION,296,27,26,10
|
||||
IDC_STATIC,7,145,258,37
|
||||
LTEXT "Selection details",IDC_STATIC,230,7,100,9
|
||||
LTEXT "Total Strings:",IDC_STATIC,221,17,89,10
|
||||
LTEXT "Need translation:",IDC_STATIC,221,28,89,10
|
||||
LTEXT "",IDC_STATIC_TOTAL_STRINGS,307,18,26,10
|
||||
LTEXT "",IDC_STATIC_NEED_TRANSLATION,307,27,26,10
|
||||
LISTBOX IDC_LIST_THEMES,7,18,102,121,LBS_SORT |
|
||||
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
|
||||
LISTBOX IDC_LIST_LANGUAGES,116,17,100,121,LBS_SORT |
|
||||
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Export already translated strings",
|
||||
IDC_CHECK_EXPORT_ALREADY_TRANSLATED,"Button",
|
||||
BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,220,100,109,
|
||||
BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,221,100,109,
|
||||
16
|
||||
END
|
||||
|
||||
IDD_CREATE_LANGUAGE DIALOGEX 0, 0, 186, 47
|
||||
IDD_CREATE_LANGUAGE DIALOGEX 0, 0, 191, 47
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Create Language"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,129,7,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,129,27,50,14
|
||||
DEFPUSHBUTTON "OK",IDOK,128,7,56,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,128,27,56,14
|
||||
LTEXT "Choose a language",IDC_STATIC,7,7,110,11
|
||||
COMBOBOX IDC_COMBO_LANGUAGES,17,24,100,110,CBS_DROPDOWNLIST |
|
||||
CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
@@ -376,9 +376,9 @@ BEGIN
|
||||
IDD_EXPORTER, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 324
|
||||
RIGHTMARGIN, 341
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 227
|
||||
BOTTOMMARGIN, 215
|
||||
END
|
||||
|
||||
IDD_DIALOG_NAME, DIALOG
|
||||
@@ -392,9 +392,9 @@ BEGIN
|
||||
IDD_EDIT_INSTALLATIONS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 225
|
||||
RIGHTMARGIN, 235
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 212
|
||||
BOTTOMMARGIN, 213
|
||||
END
|
||||
|
||||
IDD_MENU, DIALOG
|
||||
@@ -434,21 +434,21 @@ BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 154
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 274
|
||||
BOTTOMMARGIN, 279
|
||||
END
|
||||
|
||||
IDD_LANGUAGES, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 322
|
||||
RIGHTMARGIN, 330
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 181
|
||||
BOTTOMMARGIN, 182
|
||||
END
|
||||
|
||||
IDD_CREATE_LANGUAGE, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 179
|
||||
RIGHTMARGIN, 184
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 40
|
||||
END
|
||||
|
||||
@@ -23,9 +23,6 @@ namespace SMPackageUtil
|
||||
RString GetLanguageCodeFromDisplayString( const RString &sDisplayString );
|
||||
|
||||
bool GetFileContentsOsAbsolute( const RString &sAbsoluteOsFile, RString &sOut );
|
||||
|
||||
void SetHeaderFont( CDialog &dlg );
|
||||
void LocalizeDialogAndContents( CDialog &dlg );
|
||||
}
|
||||
|
||||
#include "RageFile.h"
|
||||
|
||||
Reference in New Issue
Block a user