From c7049dad42fd19ae342afb3e0fd7a168de488c55 Mon Sep 17 00:00:00 2001 From: zilmar Date: Tue, 21 Apr 2020 11:06:48 +0930 Subject: [PATCH] GlideNUI-wtl: Add debug tab language --- src/GLideNUI-wtl/Language.cpp | 5 +++++ src/GLideNUI-wtl/Language.h | 7 +++++++ src/GLideNUI-wtl/config-debug.cpp | 25 +++++++++---------------- translations/wtl/gliden64_de.Lang | 9 ++++++++- translations/wtl/gliden64_en.Lang | 9 ++++++++- 5 files changed, 37 insertions(+), 18 deletions(-) diff --git a/src/GLideNUI-wtl/Language.cpp b/src/GLideNUI-wtl/Language.cpp index ec19d6b5..37e2bca5 100644 --- a/src/GLideNUI-wtl/Language.cpp +++ b/src/GLideNUI-wtl/Language.cpp @@ -207,6 +207,11 @@ void loadDefaultStrings(void) 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")); + + //Debug tab + g_defaultStrings.insert(LANG_STRINGS::value_type(DEBUG_DUMP_LOWLEVEL_INFO, "Dump low-level info")); + g_defaultStrings.insert(LANG_STRINGS::value_type(DEBUG_DUMP_DISPLAY_LIST, "Dump display list commands")); + g_defaultStrings.insert(LANG_STRINGS::value_type(DEBUG_DUMP_DETAILED_INFO, "Dump detailed info (matrices, vertices, etc.)")); } LANG_STR GetNextLangString(FILE * file) diff --git a/src/GLideNUI-wtl/Language.h b/src/GLideNUI-wtl/Language.h index 23b19c3a..1b9a842f 100644 --- a/src/GLideNUI-wtl/Language.h +++ b/src/GLideNUI-wtl/Language.h @@ -215,6 +215,13 @@ enum languageStringID OSD_PX = 6008, OSD_COLOR = 6009, OSD_PREVIEW = 6010, + + /********************************************************************************* + * Debug * + *********************************************************************************/ + DEBUG_DUMP_LOWLEVEL_INFO = 7000, + DEBUG_DUMP_DISPLAY_LIST = 7001, + DEBUG_DUMP_DETAILED_INFO = 7002, }; struct LanguageFile diff --git a/src/GLideNUI-wtl/config-debug.cpp b/src/GLideNUI-wtl/config-debug.cpp index 3488fa6d..1805b82d 100644 --- a/src/GLideNUI-wtl/config-debug.cpp +++ b/src/GLideNUI-wtl/config-debug.cpp @@ -1,6 +1,7 @@ #include "config-debug.h" #include "../Config.h" #include "../DebugDump.h" +#include "Language.h" #include "resource.h" CDebugTab::CDebugTab() : @@ -8,40 +9,32 @@ CDebugTab::CDebugTab() : { } -BOOL CDebugTab::OnInitDialog(CWindow /*wndFocus*/, LPARAM /*lInitParam*/) -{ +BOOL CDebugTab::OnInitDialog(CWindow /*wndFocus*/, LPARAM /*lInitParam*/) { return true; } -void CDebugTab::ApplyLanguage(void) -{ +void CDebugTab::ApplyLanguage(void) { + SetDlgItemTextW(IDC_CHK_DUMP_LOW, wGS(DEBUG_DUMP_LOWLEVEL_INFO).c_str()); + SetDlgItemTextW(IDC_CHK_DUMP_NORMAL, wGS(DEBUG_DUMP_DISPLAY_LIST).c_str()); + SetDlgItemTextW(IDC_CHK_DUMP_DETAIL, wGS(DEBUG_DUMP_DETAILED_INFO).c_str()); } -LRESULT CDebugTab::OnColorStatic(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) -{ +LRESULT CDebugTab::OnColorStatic(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { return (LRESULT)GetStockObject(WHITE_BRUSH); } -void CDebugTab::LoadSettings(bool /*blockCustomSettings*/) -{ +void CDebugTab::LoadSettings(bool /*blockCustomSettings*/) { CButton(GetDlgItem(IDC_CHK_DUMP_LOW)).SetCheck((config.debug.dumpMode & DEBUG_LOW) != 0 ? BST_CHECKED : BST_UNCHECKED); CButton(GetDlgItem(IDC_CHK_DUMP_NORMAL)).SetCheck((config.debug.dumpMode & DEBUG_NORMAL) != 0 ? BST_CHECKED : BST_UNCHECKED); CButton(GetDlgItem(IDC_CHK_DUMP_DETAIL)).SetCheck((config.debug.dumpMode & DEBUG_DETAIL) != 0 ? BST_CHECKED : BST_UNCHECKED); } -void CDebugTab::SaveSettings() -{ +void CDebugTab::SaveSettings() { config.debug.dumpMode = 0; if (CButton(GetDlgItem(IDC_CHK_DUMP_LOW)).GetCheck() == BST_CHECKED) - { config.debug.dumpMode |= DEBUG_LOW; - } if (CButton(GetDlgItem(IDC_CHK_DUMP_NORMAL)).GetCheck() == BST_CHECKED) - { config.debug.dumpMode |= DEBUG_NORMAL; - } if (CButton(GetDlgItem(IDC_CHK_DUMP_DETAIL)).GetCheck() == BST_CHECKED) - { config.debug.dumpMode |= DEBUG_DETAIL; - } } diff --git a/translations/wtl/gliden64_de.Lang b/translations/wtl/gliden64_de.Lang index 0905b7fd..692bf139 100644 --- a/translations/wtl/gliden64_de.Lang +++ b/translations/wtl/gliden64_de.Lang @@ -189,4 +189,11 @@ #6007# "Größe:" #6008# "px" #6009# "Farbe:" -#6010# "Vorschau" \ No newline at end of file +#6010# "Vorschau" + +/********************************************************************************* +* Debug * +*********************************************************************************/ +#7000# "Low-Level-Info ausgeben" +#7001# "Display-Listen-Befehle ausgeben" +#7002# "Detaillierte Informationen ausgeben (Matrizen, Eckpunkte, etc.)" \ No newline at end of file diff --git a/translations/wtl/gliden64_en.Lang b/translations/wtl/gliden64_en.Lang index c3ce21c4..aa886418 100644 --- a/translations/wtl/gliden64_en.Lang +++ b/translations/wtl/gliden64_en.Lang @@ -207,4 +207,11 @@ #6007# "Size:" #6008# "px" #6009# "Color:" -#6010# "Preview" \ No newline at end of file +#6010# "Preview" + +/********************************************************************************* +* Debug * +*********************************************************************************/ +#7000# "Dump low-level info" +#7001# "Dump display list commands" +#7002# "Dump detailed info (matrices, vertices, etc.)" \ No newline at end of file