mirror of
https://github.com/k4zmu2a/SpaceCadetPinball.git
synced 2024-11-14 05:48:04 +01:00
Added Hebrew translation.
Switched to MessageBoxW in some places.
This commit is contained in:
parent
1c1fbcb811
commit
1428fb3770
7 changed files with 23 additions and 12 deletions
|
@ -49,7 +49,7 @@ int Sound::Init(HINSTANCE hInstance, int voices, void (* someFuncPtr)(int, MIXWA
|
|||
{
|
||||
/*FT does not have the file, defaults work OK*/
|
||||
if (!pb::FullTiltMode)
|
||||
MessageBoxA(winmain::hwnd_frame, pinball::get_rc_string(42, 0), "", 0x2000u);
|
||||
MessageBoxW(winmain::hwnd_frame, pinball::get_rc_Wstring(42, 0), L"", 0x2000u);
|
||||
}
|
||||
|
||||
WndClass.style = 0;
|
||||
|
|
Binary file not shown.
|
@ -185,7 +185,6 @@ INT_PTR high_score::HighScore(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
HWND parent;
|
||||
int nIDDlgItem;
|
||||
CHAR String1[256];
|
||||
CHAR name[32];
|
||||
|
||||
switch (msg)
|
||||
|
@ -247,8 +246,8 @@ INT_PTR high_score::HighScore(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
case DLG_HIGHSCORES_Cancel:
|
||||
break;
|
||||
case DLG_HIGHSCORES_Clear:
|
||||
lstrcpyA(String1, pinball::get_rc_string(41, 0));
|
||||
if (MessageBoxA(hWnd, pinball::get_rc_string(40, 0), String1, MB_DEFBUTTON2 | MB_OKCANCEL) == 1)
|
||||
if (MessageBoxW(hWnd, pinball::get_rc_Wstring(40, 0),
|
||||
pinball::get_rc_Wstring(41, 0), MB_DEFBUTTON2 | MB_OKCANCEL) == 1)
|
||||
{
|
||||
clear_table(dlg_hst);
|
||||
if (dlg_enter_name)
|
||||
|
|
|
@ -84,6 +84,7 @@ LanguageMenuEntry options::LanguageMenu[]
|
|||
{L"Čeština", Languages::Czech},
|
||||
{L"Dansk", Languages::Danish},
|
||||
{L"Suomi", Languages::Finnish},
|
||||
{L"עִברִית", Languages::Hebrew},
|
||||
};
|
||||
|
||||
void options::ReadOptions()
|
||||
|
|
|
@ -18,6 +18,7 @@ enum class Languages
|
|||
Czech = MAKELANGID(LANG_CZECH, SUBLANG_CZECH_CZECH_REPUBLIC),
|
||||
Danish = MAKELANGID(LANG_DANISH, SUBLANG_DANISH_DENMARK),
|
||||
Finnish = MAKELANGID(LANG_FINNISH, SUBLANG_FINNISH_FINLAND),
|
||||
Hebrew = MAKELANGID(LANG_HEBREW, SUBLANG_HEBREW_ISRAEL),
|
||||
};
|
||||
|
||||
struct LanguageMenuEntry
|
||||
|
|
|
@ -242,7 +242,7 @@
|
|||
#define DLG_HIGHSCORES_EditName5 605
|
||||
#define Menu1_AlternativeRender 601
|
||||
#define Menu1_Language 700
|
||||
#define Menu1_LanguageMax 714
|
||||
#define Menu1_LanguageMax 715
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
|
|
@ -165,8 +165,18 @@ int winmain::WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
|
|||
pinball::FindShiftKeys();
|
||||
options::init_resolution();
|
||||
|
||||
// Some languages use RTL layout
|
||||
DWORD dwExStyle;
|
||||
switch (options::Options.Language)
|
||||
{
|
||||
case Languages::Hebrew:
|
||||
dwExStyle = WS_EX_LAYOUTRTL;
|
||||
break;
|
||||
default:
|
||||
dwExStyle = 0;
|
||||
}
|
||||
auto windowName = pinball::get_rc_Wstring(38, 0);
|
||||
windowHandle = CreateWindowExW(0, windowClass, windowName,
|
||||
windowHandle = CreateWindowExW(dwExStyle, windowClass, windowName,
|
||||
WndStyle, 0, 0, 640, 480, nullptr, nullptr, hInstance, nullptr);
|
||||
|
||||
hwnd_frame = windowHandle;
|
||||
|
@ -600,9 +610,9 @@ LRESULT CALLBACK winmain::message_handler(HWND hWnd, UINT Msg, WPARAM wParam, LP
|
|||
iHwnd * iHwnd * iHwnd * iHwnd * iHwnd * iHwnd * iHwnd);
|
||||
if (static_cast<int>(WinExec(cmdLine, 5u)) < 32)
|
||||
{
|
||||
auto caption = pinball::get_rc_string(170, 0);
|
||||
auto text = pinball::get_rc_string(171, 0);
|
||||
MessageBoxA(hwnd_frame, text, caption, 0x2010u);
|
||||
auto caption = pinball::get_rc_Wstring(170, 0);
|
||||
auto text = pinball::get_rc_Wstring(171, 0);
|
||||
MessageBoxW(hwnd_frame, text, caption, 0x2010u);
|
||||
}
|
||||
memory::free(tmpBuf);
|
||||
}
|
||||
|
@ -774,9 +784,9 @@ void winmain::memalloc_failure()
|
|||
midi::music_stop();
|
||||
Sound::Close();
|
||||
gdrv::uninit();
|
||||
char* caption = pinball::get_rc_string(170, 0);
|
||||
char* text = pinball::get_rc_string(179, 0);
|
||||
MessageBoxA(nullptr, text, caption, 0x2030u);
|
||||
auto caption = pinball::get_rc_Wstring(170, 0);
|
||||
auto text = pinball::get_rc_Wstring(179, 0);
|
||||
MessageBoxW(nullptr, text, caption, 0x2030u);
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue