From 6b52cc982989113deb2240c99b751432bf373655 Mon Sep 17 00:00:00 2001 From: lightningterror Date: Wed, 12 Sep 2018 13:00:20 +0200 Subject: [PATCH] GSdx-gui: Minor osd gui adjustments. Grey out scrolling speed and maximum onscreen messages when Enable Log is not checked. --- plugins/GSdx/GSSettingsDlg.cpp | 11 +++++++++++ plugins/GSdx/GSdx.rc | 4 ++-- plugins/GSdx/resource.h | 14 ++++++++------ 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/plugins/GSdx/GSSettingsDlg.cpp b/plugins/GSdx/GSSettingsDlg.cpp index c4d2b50116..ae35eaa9d2 100644 --- a/plugins/GSdx/GSSettingsDlg.cpp +++ b/plugins/GSdx/GSSettingsDlg.cpp @@ -938,6 +938,13 @@ void GSOSDDlg::UpdateControls() char text[8] = { 0 }; sprintf(text, "%d", m_transparency); SetDlgItemText(m_hWnd, IDC_OSD_TRANSPARENCY_TEXT, text); + + EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_SPEED), IsDlgButtonChecked(m_hWnd, IDC_OSD_LOG)); + EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_SPEED_EDIT), IsDlgButtonChecked(m_hWnd, IDC_OSD_LOG)); + EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_SPEED_TEXT), IsDlgButtonChecked(m_hWnd, IDC_OSD_LOG)); + EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_MAX_LOG), IsDlgButtonChecked(m_hWnd, IDC_OSD_LOG)); + EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_MAX_LOG_EDIT), IsDlgButtonChecked(m_hWnd, IDC_OSD_LOG)); + EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_MAX_LOG_TEXT), IsDlgButtonChecked(m_hWnd, IDC_OSD_LOG)); } bool GSOSDDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) @@ -985,6 +992,10 @@ bool GSOSDDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) EndDialog(m_hWnd, id); } break; + case IDC_OSD_LOG: + if (HIWORD(wParam) == BN_CLICKED) + UpdateControls(); + break; case IDC_OSD_FONT_BUTTON: if (HIWORD(wParam) == BN_CLICKED) OpenFileDialog(IDC_OSD_FONT_EDIT, "Select External Font"); diff --git a/plugins/GSdx/GSdx.rc b/plugins/GSdx/GSdx.rc index c5b379c628..e3942c2966 100644 --- a/plugins/GSdx/GSdx.rc +++ b/plugins/GSdx/GSdx.rc @@ -220,10 +220,10 @@ BEGIN CONTROL "",IDC_OSD_TRANSPARENCY_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,112,38,78,15 RTEXT "100",IDC_OSD_TRANSPARENCY_TEXT,184,40,15,8 CONTROL "Enable Log",IDC_OSD_LOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,56,54,10 - LTEXT "Scrolling Speed:",IDC_STATIC,16,72,120,8 + LTEXT "Scrolling Speed:",IDC_OSD_SPEED_TEXT,16,72,120,8 EDITTEXT IDC_OSD_SPEED_EDIT,116,70,84,14,ES_RIGHT | ES_AUTOHSCROLL CONTROL "", IDC_OSD_SPEED,"msctls_updown32", UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,116,70,11,14 - LTEXT "Maximum Onscreen Messages:",IDC_STATIC,16,88,150,8 + LTEXT "Maximum Onscreen Messages:",IDC_OSD_MAX_LOG_TEXT,16,88,150,8 EDITTEXT IDC_OSD_MAX_LOG_EDIT,116,86,84,14,ES_RIGHT | ES_AUTOHSCROLL CONTROL "", IDC_OSD_MAX_LOG,"msctls_updown32", UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,116,86,11,14 CONTROL "Enable Monitor",IDC_OSD_MONITOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,103,65,10 diff --git a/plugins/GSdx/resource.h b/plugins/GSdx/resource.h index edef423ca1..07a549bc81 100644 --- a/plugins/GSdx/resource.h +++ b/plugins/GSdx/resource.h @@ -134,12 +134,14 @@ #define IDC_OSD_FONT_EDIT 2174 #define IDC_OSD_SPEED 2175 #define IDC_OSD_SPEED_EDIT 2176 -#define IDC_OSD_SIZE 2177 -#define IDC_OSD_SIZE_EDIT 2178 -#define IDC_OSD_TRANSPARENCY_SLIDER 2179 -#define IDC_OSD_TRANSPARENCY_TEXT 2180 -#define IDC_OSD_MAX_LOG 2181 -#define IDC_OSD_MAX_LOG_EDIT 2182 +#define IDC_OSD_SPEED_TEXT 2177 +#define IDC_OSD_SIZE 2178 +#define IDC_OSD_SIZE_EDIT 2179 +#define IDC_OSD_TRANSPARENCY_SLIDER 2180 +#define IDC_OSD_TRANSPARENCY_TEXT 2181 +#define IDC_OSD_MAX_LOG 2182 +#define IDC_OSD_MAX_LOG_EDIT 2183 +#define IDC_OSD_MAX_LOG_TEXT 2184 // OpenGL Advanced Settings: #define IDC_GEOMETRY_SHADER_OVERRIDE 2190 #define IDC_GEOMETRY_SHADER_TEXT 2191