diff --git a/src/GLideNUI-wtl/GLideNUI.rc b/src/GLideNUI-wtl/GLideNUI.rc index 13e515bc..164a8d8e 100644 Binary files a/src/GLideNUI-wtl/GLideNUI.rc and b/src/GLideNUI-wtl/GLideNUI.rc differ diff --git a/src/GLideNUI-wtl/Language.cpp b/src/GLideNUI-wtl/Language.cpp index 8babaa08..ec19d6b5 100644 --- a/src/GLideNUI-wtl/Language.cpp +++ b/src/GLideNUI-wtl/Language.cpp @@ -194,6 +194,19 @@ void loadDefaultStrings(void) g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_COMPRESS_CACHE_TOOLTIP, "Textures will be compressed so more textures can be held in the cache. The compression ratio varies per texture, but the compression is typically 1/5 of the original size.\n[Recommended: Checked]")); g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_CONVERT_16BPP, "Convert textures to 16 bpp")); g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_CONVERT_16BPP_TOOLTIP, "This option halves the space used by textures in the texture cache and video card memory to improve performance. When reducing the color, GLideN64 tries to perserve the original quality as much as possible. On most textures it's hardly noticeable, but some textures, like skies, can look noticeably worse.\n[Recommended: Unchecked]")); + + //On-screen display + g_defaultStrings.insert(LANG_STRINGS::value_type(OSD_POSITION, "Position")); + g_defaultStrings.insert(LANG_STRINGS::value_type(OSD_DISPLAY_FPS, "Display FPS")); + g_defaultStrings.insert(LANG_STRINGS::value_type(OSD_DISPLAY_VI, "Display VI/s")); + g_defaultStrings.insert(LANG_STRINGS::value_type(OSD_DISPLAY_PERCENTAGE, "Display percentage")); + g_defaultStrings.insert(LANG_STRINGS::value_type(OSD_DISPLAY_INTERNAL_RESOLUTION, "Display internal resolution")); + g_defaultStrings.insert(LANG_STRINGS::value_type(OSD_DISPLAY_RENDERING_RESOLUTION, "Display rendering resolution")); + g_defaultStrings.insert(LANG_STRINGS::value_type(OSD_FONT, "Font")); + g_defaultStrings.insert(LANG_STRINGS::value_type(OSD_SIZE, "Size:")); + g_defaultStrings.insert(LANG_STRINGS::value_type(OSD_PX, "px")); + g_defaultStrings.insert(LANG_STRINGS::value_type(OSD_COLOR, "Color:")); + g_defaultStrings.insert(LANG_STRINGS::value_type(OSD_PREVIEW, "Preview")); } LANG_STR GetNextLangString(FILE * file) diff --git a/src/GLideNUI-wtl/Language.h b/src/GLideNUI-wtl/Language.h index f2e940ba..23b19c3a 100644 --- a/src/GLideNUI-wtl/Language.h +++ b/src/GLideNUI-wtl/Language.h @@ -200,6 +200,21 @@ enum languageStringID TEXTURE_COMPRESS_CACHE_TOOLTIP = 5036, TEXTURE_CONVERT_16BPP = 5037, TEXTURE_CONVERT_16BPP_TOOLTIP = 5038, + + /********************************************************************************* + * On-screen display * + *********************************************************************************/ + OSD_POSITION = 6000, + OSD_DISPLAY_FPS = 6001, + OSD_DISPLAY_VI = 6002, + OSD_DISPLAY_PERCENTAGE = 6003, + OSD_DISPLAY_INTERNAL_RESOLUTION = 6004, + OSD_DISPLAY_RENDERING_RESOLUTION = 6005, + OSD_FONT = 6006, + OSD_SIZE = 6007, + OSD_PX = 6008, + OSD_COLOR = 6009, + OSD_PREVIEW = 6010, }; struct LanguageFile diff --git a/src/GLideNUI-wtl/config-osd.cpp b/src/GLideNUI-wtl/config-osd.cpp index d7062a78..634186da 100644 --- a/src/GLideNUI-wtl/config-osd.cpp +++ b/src/GLideNUI-wtl/config-osd.cpp @@ -3,6 +3,7 @@ #include "util.h" #include "../Config.h" #include "FontInfo.h" +#include "Language.h" COsdTab::COsdTab() : CConfigTab(IDD_TAB_OSD), @@ -45,8 +46,7 @@ BOOL COsdTab::OnInitDialog(CWindow /*wndFocus*/, LPARAM /*lInitParam*/) FontList fonts = GetFontFiles(); HTREEITEM hCurrentItem = TVI_ROOT; - for (FontList::const_iterator itr = fonts.begin(); itr != fonts.end(); itr++) - { + for (FontList::const_iterator itr = fonts.begin(); itr != fonts.end(); itr++) { std::wstring FontFile = ToUTF16(itr->first.c_str()); std::wstring FontName = ToUTF16(itr->second.c_str()); @@ -57,19 +57,16 @@ BOOL COsdTab::OnInitDialog(CWindow /*wndFocus*/, LPARAM /*lInitParam*/) tv.item.cchTextMax = sizeof(Item) / sizeof(Item[0]); tv.item.hItem = m_Fonts.GetChildItem(TVI_ROOT); HTREEITEM hParent = TVI_ROOT; - while (tv.item.hItem) - { + while (tv.item.hItem) { m_Fonts.GetItem(&tv.item); - if (wcscmp(FontName.c_str(), Item) == 0) - { + if (wcscmp(FontName.c_str(), Item) == 0) { hParent = tv.item.hItem; break; } tv.item.hItem = m_Fonts.GetNextSiblingItem(tv.item.hItem); } - if (hParent == TVI_ROOT) - { + if (hParent == TVI_ROOT) { tv.item.mask = TVIF_TEXT; tv.item.pszText = (LPWSTR)FontName.c_str(); tv.item.cchTextMax = FontName.length(); @@ -84,8 +81,7 @@ BOOL COsdTab::OnInitDialog(CWindow /*wndFocus*/, LPARAM /*lInitParam*/) tv.hParent = hParent; m_Fonts.InsertItem(&tv); } - if (hCurrentItem != TVI_ROOT) - { + if (hCurrentItem != TVI_ROOT) { m_Fonts.SelectItem(hCurrentItem); m_Fonts.SetItemState(hCurrentItem, TVIF_STATE | TVIS_SELECTED, TVIF_STATE | TVIS_SELECTED); m_Fonts.SetFocus(); @@ -95,15 +91,23 @@ BOOL COsdTab::OnInitDialog(CWindow /*wndFocus*/, LPARAM /*lInitParam*/) void COsdTab::ApplyLanguage(void) { + SetDlgItemTextW(IDC_POSITION, wGS(OSD_POSITION).c_str()); + SetDlgItemTextW(IDC_CHK_FPS, wGS(OSD_DISPLAY_FPS).c_str()); + SetDlgItemTextW(IDC_CHK_VIS, wGS(OSD_DISPLAY_VI).c_str()); + SetDlgItemTextW(IDC_CHK_PERCENT, wGS(OSD_DISPLAY_PERCENTAGE).c_str()); + SetDlgItemTextW(IDC_INTERNAL_RESOLUTION, wGS(OSD_DISPLAY_INTERNAL_RESOLUTION).c_str()); + SetDlgItemTextW(IDC_RENDERING_RESOLUTION, wGS(OSD_DISPLAY_RENDERING_RESOLUTION).c_str()); + SetDlgItemTextW(IDC_FONT, wGS(OSD_FONT).c_str()); + SetDlgItemTextW(IDC_TXT_SIZE, wGS(OSD_SIZE).c_str()); + SetDlgItemTextW(IDC_PX, wGS(OSD_PX).c_str()); + SetDlgItemTextW(IDC_COLOR, wGS(OSD_COLOR).c_str()); } LRESULT COsdTab::OnScroll(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/) { LONG CtrlId = CWindow((HWND)lParam).GetWindowLong(GWL_ID); if (CtrlId == IDC_FONT_SIZE_SPIN) - { m_OsdPreview.SetFontSize(m_FontSizeSpin.GetPos()); - } return 0; } @@ -212,28 +216,22 @@ void COsdTab::LoadSettings(bool /*blockCustomSettings*/) tv.item.cchTextMax = sizeof(Item) / sizeof(Item[0]); tv.item.hItem = m_Fonts.GetChildItem(TVI_ROOT); HTREEITEM hCurrentItem = NULL; - while (hCurrentItem == NULL && tv.item.hItem) - { + while (hCurrentItem == NULL && tv.item.hItem) { m_Fonts.GetItem(&tv.item); HTREEITEM hChild = m_Fonts.GetChildItem(tv.item.hItem); HTREEITEM NextItem = m_Fonts.GetNextSiblingItem(tv.item.hItem); - if (hCurrentItem == NULL && hChild != NULL) - { + if (hCurrentItem == NULL && hChild != NULL) { tv.item.hItem = hChild; - while (hCurrentItem == NULL && tv.item.hItem) - { + while (hCurrentItem == NULL && tv.item.hItem) { m_Fonts.GetItem(&tv.item); if (Item == CurrentFile) - { hCurrentItem = tv.item.hItem; - } tv.item.hItem = m_Fonts.GetNextSiblingItem(tv.item.hItem); } } tv.item.hItem = NextItem; } - if (hCurrentItem != TVI_ROOT) - { + if (hCurrentItem != TVI_ROOT) { m_Fonts.SelectItem(hCurrentItem); m_Fonts.SetItemState(hCurrentItem, TVIF_STATE | TVIS_SELECTED, TVIF_STATE | TVIS_SELECTED); m_Fonts.SetFocus(); @@ -272,19 +270,13 @@ std::wstring COsdTab::GetSelectedFont() { HTREEITEM hItem = m_Fonts.GetSelectedItem(); if (hItem == NULL) - { return L""; - } HTREEITEM hChild = m_Fonts.GetChildItem(hItem); if (hChild != NULL) - { hItem = hChild; - } wchar_t ItemText[MAX_PATH]; if (!m_Fonts.GetItemText(hItem, ItemText, sizeof(ItemText) / sizeof(ItemText[0]))) - { return L""; - } return std::wstring(ItemText); } \ No newline at end of file diff --git a/src/GLideNUI-wtl/resource.h b/src/GLideNUI-wtl/resource.h index e680d1c6..3f537263 100644 Binary files a/src/GLideNUI-wtl/resource.h and b/src/GLideNUI-wtl/resource.h differ diff --git a/src/GLideNUI-wtl/wtl-OsdPreview.cpp b/src/GLideNUI-wtl/wtl-OsdPreview.cpp index 79e433c0..928adb0d 100644 --- a/src/GLideNUI-wtl/wtl-OsdPreview.cpp +++ b/src/GLideNUI-wtl/wtl-OsdPreview.cpp @@ -1,6 +1,7 @@ #include "wtl-OsdPreview.h" #include "FontInfo.h" #include "util.h" +#include "Language.h" #include #pragma comment(lib, "Dwrite.lib") @@ -61,7 +62,7 @@ LRESULT COsdPreview::OnPaint(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/ HFONT hOldFont = (HFONT)dc.SelectFont(hf); if (hOldFont) { - dc.DrawText(L"Preview", -1, rect, DT_CENTER | DT_VCENTER | DT_SINGLELINE); + dc.DrawText(wGS(OSD_PREVIEW).c_str(), -1, rect, DT_CENTER | DT_VCENTER | DT_SINGLELINE); dc.SelectFont(hOldFont); } } diff --git a/translations/wtl/gliden64_de.Lang b/translations/wtl/gliden64_de.Lang index 15482358..0905b7fd 100644 --- a/translations/wtl/gliden64_de.Lang +++ b/translations/wtl/gliden64_de.Lang @@ -174,4 +174,19 @@ #5035# "Textur-Cache komprimieren" #5036# "Texturen werden komprimiert, damit mehr Texturen im Cache gehalten werden können. Die Kompressionsrate variiert je nach Textur, aber ist normalerweise 1/5 der Originalgröße.\n[Empfehlung: Ausgewählt]" #5037# "Konvertiere Texturen zu 16Bit" -#5038# "Diese Einstellung halbiert den Speicherbedarf von Texturen im Texture-Cache und VRAM um die Leistung zu steigern. Wenn die Farbtiefe reduziert wird versucht GLideN64 die originale Qualität so gut wie möglich zu erhalten. Bei den meisten Texturen ist es kaum wahrnehmbar, aber einige Texturen, wie z.B. für den Himmel, können schlechter aussehen.\n[Empfehlung: Nicht ausgewählt]" \ No newline at end of file +#5038# "Diese Einstellung halbiert den Speicherbedarf von Texturen im Texture-Cache und VRAM um die Leistung zu steigern. Wenn die Farbtiefe reduziert wird versucht GLideN64 die originale Qualität so gut wie möglich zu erhalten. Bei den meisten Texturen ist es kaum wahrnehmbar, aber einige Texturen, wie z.B. für den Himmel, können schlechter aussehen.\n[Empfehlung: Nicht ausgewählt]" + +/********************************************************************************* +* On-screen display * +*********************************************************************************/ +#6000# "Position" +#6001# "FPS anzeigen" +#6002# "VI/s anzeigen" +#6003# "Anzeige in Prozent" +#6004# "Interne Auflösung anzeigen" +#6005# "Rendering-Auflösung anzeigen" +#6006# "Schriftart" +#6007# "Größe:" +#6008# "px" +#6009# "Farbe:" +#6010# "Vorschau" \ No newline at end of file diff --git a/translations/wtl/gliden64_en.Lang b/translations/wtl/gliden64_en.Lang index 892c65af..c3ce21c4 100644 --- a/translations/wtl/gliden64_en.Lang +++ b/translations/wtl/gliden64_en.Lang @@ -192,4 +192,19 @@ #5035# "Compress texture cache" #5036# "Textures will be compressed so more textures can be held in the cache. The compression ratio varies per texture, but the compression is typically 1/5 of the original size.\n[Recommended: Checked]" #5037# "Convert textures to 16 bpp" -#5038# "This option halves the space used by textures in the texture cache and video card memory to improve performance. When reducing the color, GLideN64 tries to perserve the original quality as much as possible. On most textures it's hardly noticeable, but some textures, like skies, can look noticeably worse.\n[Recommended: Unchecked]" \ No newline at end of file +#5038# "This option halves the space used by textures in the texture cache and video card memory to improve performance. When reducing the color, GLideN64 tries to perserve the original quality as much as possible. On most textures it's hardly noticeable, but some textures, like skies, can look noticeably worse.\n[Recommended: Unchecked]" + +/********************************************************************************* +* On-screen display * +*********************************************************************************/ +#6000# "Position" +#6001# "Display FPS" +#6002# "Display VI/s" +#6003# "Display percentage" +#6004# "Display internal resolution" +#6005# "Display rendering resolution" +#6006# "Font" +#6007# "Size:" +#6008# "px" +#6009# "Color:" +#6010# "Preview" \ No newline at end of file diff --git a/translations/wtl/gliden64_es.Lang b/translations/wtl/gliden64_es.Lang index 2fcab54e..46458a59 100644 --- a/translations/wtl/gliden64_es.Lang +++ b/translations/wtl/gliden64_es.Lang @@ -132,3 +132,11 @@ #5036# "Se comprimirán las texturas para que entren más texturas en la caché. La proporción de compresión cambia según la textura, pero suele ser de 1/5 del tamaño original.\n[Recomendación: Activado]" #5037# "Convertir texturas a 16 BPP" #5038# "Esta opción reduce a la mitad el tamaño que utilizan las texturas de la caché de texturas y de la memoria de la tarjeta gráfica para mejorar el rendimiento. A la hora de reducir el color, GlideN64 intentará preservar la calidad original en la medida de lo posible. Es apenas imperceptible en la mayoría de las texturas, pero algunas como los cielos quedarán peor.\n[Recomendación: Desactivado]" + +/********************************************************************************* +* On-screen display * +*********************************************************************************/ +#6000# "Posición" +#6003# "Mostrar porcentaje" +#6009# "Color:" +#6010# "Demostración" \ No newline at end of file diff --git a/translations/wtl/gliden64_fr.Lang b/translations/wtl/gliden64_fr.Lang index 4da986ca..af9b9a22 100644 --- a/translations/wtl/gliden64_fr.Lang +++ b/translations/wtl/gliden64_fr.Lang @@ -132,3 +132,11 @@ #5036# "Les textures seront compressées, ainsi plus de textures pourront être mises en cache. Le ratio de compression varie suivant les textures, mais il est en moyenne de 1/5 par rapport à la taille originale.\n[Recommandé : Activé]" #5037# "Convertir les textures en 16 bits" #5038# "Cette option réduit de moitié l'espace occupé par les textures dans le cache ainsi que celui de la mémoire de votre carte graphique, cela afin d'améliorer les performances. Quand la taille du codage de la couleur est réduite, GLideN64 essaye de préserver la qualité originale autant que possible. Sur certaines textures c'est difficilement visible, mais sur d'autres, tel le ciel, le rendu peut être mauvais.\n[Recommandé : Désactivé]" + +/********************************************************************************* +* On-screen display * +*********************************************************************************/ +#6000# "Position" +#6003# "Afficher le pourcentage" +#6009# "Couleur :" +#6010# "Prévisualisation" \ No newline at end of file