windows/seasonwindow: localization

This commit is contained in:
zvon 2020-04-01 13:57:01 +02:00
parent 60c30fa8f1
commit f785bf6d95
2 changed files with 14 additions and 6 deletions

View File

@ -1,5 +1,10 @@
#pragma comment( linker, "\"/manifestdependency:type='win32' \
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"" )
#include "seasonwindow.hpp"
#include "../resources_windows.h"
#include "gui_functions.hpp"
#include "../functions.hpp"
#define ID_CHECKBOX 0x0001
#define ID_SEASONS_STATIC 0x0001
@ -15,13 +20,14 @@ SeasonWindow::SeasonWindow( HINSTANCE hInstance,
HWND parent_window )
: parent( parent_window ), returned( return_vector ),
season_nums( seasons ) {
window = CreateWindowW( L"SeasonWindow", L"Select seasons",
window = CreateWindowW( L"SeasonWindow", _( GUI_WINDOW_SEASON ),
WS_OVERLAPPEDWINDOW ^ WS_THICKFRAME | WS_VISIBLE,
CW_USEDEFAULT, CW_USEDEFAULT, window_width,
window_height, parent, NULL, hInstance, NULL );
ShowWindow( window, SW_SHOW );
auto hFont = ( HFONT )GetStockObject( DEFAULT_GUI_FONT );
EnableWindow( parent, false );
setIcons( hInstance, window );
size_t x{ 5 }, y{ 25 };
@ -40,13 +46,15 @@ SeasonWindow::SeasonWindow( HINSTANCE hInstance,
}
}
createLabel( L"Select seasons:", 5, 5, 100, 15, ID_SEASONS_STATIC, window,
std::wstring label = _( GUI_WINDOW_SEASON );
label += L":";
createLabel( label.c_str(), 5, 5, 100, 15, ID_SEASONS_STATIC, window,
hFont );
createButton( L"Select all", 130, 175, 100, 25, ID_ALL_BUTTON, window,
createButton( _( SELECT_ALL ), 130, 175, 100, 25, ID_ALL_BUTTON, window,
hFont );
createButton( L"Unselect all", 5, 175, 110, 25, ID_NONE_BUTTON, window,
createButton( _( SELECT_NONE ), 5, 175, 110, 25, ID_NONE_BUTTON, window,
hFont );
createButton( L"Select", 165, 215, 80, 25, ID_CONFIRM_BUTTON, window,
createButton( _( SELECT ), 165, 215, 80, 25, ID_CONFIRM_BUTTON, window,
hFont );
UpdateWindow( window );

View File

@ -1,6 +1,6 @@
#include <windows.h>
#include <string>
#include <vector>
#include <windows.h>
class SeasonWindow {
public: