mirror of https://github.com/PCSX2/pcsx2.git
gsdx-osd: Update osd gui
Add support for color picker, remove font selector, enable the menu for dx11 and some other tweaks.
This commit is contained in:
parent
3819e22432
commit
f8ae0f7e19
|
@ -384,11 +384,14 @@ void GSdxApp::Init()
|
|||
#else
|
||||
m_default_configuration["osd_fontname"] = "/usr/share/fonts/truetype/freefont/FreeSerif.ttf";
|
||||
#endif
|
||||
m_default_configuration["osd_color_r"] = "0";
|
||||
m_default_configuration["osd_color_g"] = "128";
|
||||
m_default_configuration["osd_color_b"] = "0";
|
||||
m_default_configuration["osd_color_opacity"] = "100";
|
||||
m_default_configuration["osd_fontsize"] = "28";
|
||||
m_default_configuration["osd_log_enabled"] = "1";
|
||||
m_default_configuration["osd_log_speed"] = "4";
|
||||
m_default_configuration["osd_log_timeout"] = "4";
|
||||
m_default_configuration["osd_monitor_enabled"] = "0";
|
||||
m_default_configuration["osd_transparency"] = "25";
|
||||
m_default_configuration["osd_max_log_messages"] = "2";
|
||||
m_default_configuration["override_geometry_shader"] = "-1";
|
||||
m_default_configuration["override_GL_ARB_copy_image"] = "-1";
|
||||
|
|
|
@ -200,30 +200,42 @@ BEGIN
|
|||
DEFPUSHBUTTON "Cancel",IDCANCEL,127,208,50,14
|
||||
END
|
||||
|
||||
IDD_OSD DIALOGEX 0, 0, 210, 140
|
||||
IDD_OSD DIALOGEX 0, 0, 210, 205
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "OSD Configuration"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
LTEXT "Font:",IDC_STATIC,16,7,25,8
|
||||
PUSHBUTTON "Browse",IDC_OSD_FONT_BUTTON,164,5,36,14
|
||||
EDITTEXT IDC_OSD_FONT_EDIT,45,5,114,14,ES_AUTOHSCROLL
|
||||
LTEXT "Size:",IDC_STATIC,16,24,120,8
|
||||
EDITTEXT IDC_OSD_SIZE_EDIT,116,22,84,14,ES_RIGHT | ES_AUTOHSCROLL
|
||||
CONTROL "",IDC_OSD_SIZE,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,116,22,11,14
|
||||
LTEXT "Transparency:",IDC_STATIC,16,40,50,8
|
||||
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_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_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
|
||||
DEFPUSHBUTTON "OK",IDOK,52,120,50,14
|
||||
DEFPUSHBUTTON "Cancel",IDCANCEL,108,120,50,14
|
||||
// Enable/Disable
|
||||
CONTROL "Enable Monitor",IDC_OSD_MONITOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,7,65,10
|
||||
CONTROL "Enable Log",IDC_OSD_LOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,7,54,10
|
||||
// Font Settings
|
||||
GROUPBOX "Font",IDC_STATIC,7,20,196,100,0,WS_EX_TRANSPARENT
|
||||
LTEXT "Size:",IDC_OSD_SIZE_TEXT,16,34,120,8
|
||||
EDITTEXT IDC_OSD_SIZE_EDIT,112,31,84,14,ES_RIGHT | ES_AUTOHSCROLL
|
||||
CONTROL "",IDC_OSD_SIZE,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,112,33,11,14
|
||||
LTEXT "Red:",IDC_OSD_COLOR_RED_TEXT,16,51,25,8
|
||||
CONTROL "",IDC_OSD_COLOR_RED_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,107,49,76,15
|
||||
RTEXT "255",IDC_OSD_COLOR_RED_AMOUNT,180,52,15,8
|
||||
LTEXT "Green:",IDC_OSD_COLOR_GREEN_TEXT,16,68,25,8
|
||||
CONTROL "",IDC_OSD_COLOR_GREEN_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,107,66,76,15
|
||||
RTEXT "255",IDC_OSD_COLOR_GREEN_AMOUNT,180,69,15,8
|
||||
LTEXT "Blue:",IDC_OSD_COLOR_BLUE_TEXT,16,86,25,8
|
||||
CONTROL "",IDC_OSD_COLOR_BLUE_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,107,83,75,15
|
||||
RTEXT "255",IDC_OSD_COLOR_BLUE_AMOUNT,180,86,15,8
|
||||
LTEXT "Opacity:",IDC_OSD_OPACITY_TEXT,16,104,50,8
|
||||
CONTROL "",IDC_OSD_OPACITY_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,107,100,76,15
|
||||
RTEXT "100",IDC_OSD_OPACITY_AMOUNT,180,104,15,8
|
||||
// Log Settings
|
||||
GROUPBOX "Log Messages",IDC_STATIC,7,125,196,52,0,WS_EX_TRANSPARENT
|
||||
LTEXT "Timeout (seconds):",IDC_OSD_TIMEOUT_TEXT,16,139,120,8
|
||||
EDITTEXT IDC_OSD_TIMEOUT_EDIT,112,135,84,14,ES_RIGHT | ES_AUTOHSCROLL
|
||||
CONTROL "", IDC_OSD_TIMEOUT,"msctls_updown32", UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,116,135,11,14
|
||||
LTEXT "Max:",IDC_OSD_MAX_LOG_TEXT,16,158,150,8
|
||||
EDITTEXT IDC_OSD_MAX_LOG_EDIT,112,155,84,14,ES_RIGHT | ES_AUTOHSCROLL
|
||||
CONTROL "", IDC_OSD_MAX_LOG,"msctls_updown32", UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,116,155,11,14
|
||||
// OK/CANCEL
|
||||
DEFPUSHBUTTON "OK",IDOK,52,183,50,14
|
||||
DEFPUSHBUTTON "Cancel",IDCANCEL,108,183,50,14
|
||||
END
|
||||
|
||||
IDD_CAPTURE DIALOGEX 0, 0, 279, 71
|
||||
|
|
|
@ -426,7 +426,7 @@ void GSSettingsDlg::UpdateControls()
|
|||
EnableWindow(GetDlgItem(m_hWnd, IDC_HACKSBUTTON), hw && IsDlgButtonChecked(m_hWnd, IDC_HACKS_ENABLED));
|
||||
|
||||
// OSD Configuration
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSDBUTTON), ogl);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSDBUTTON), !null);
|
||||
|
||||
// Shader Configuration
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_SHADEBUTTON), !null);
|
||||
|
@ -869,21 +869,26 @@ void GSOSDDlg::OnInit()
|
|||
{
|
||||
CheckDlgButton(m_hWnd, IDC_OSD_LOG, theApp.GetConfigB("osd_log_enabled"));
|
||||
CheckDlgButton(m_hWnd, IDC_OSD_MONITOR, theApp.GetConfigB("osd_monitor_enabled"));
|
||||
m_transparency = theApp.GetConfigI("osd_transparency");
|
||||
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_TRANSPARENCY_SLIDER), TBM_SETRANGE, TRUE, MAKELONG(0, 100));
|
||||
m_color.a = theApp.GetConfigI("osd_color_opacity");
|
||||
m_color.r = theApp.GetConfigI("osd_color_r");
|
||||
m_color.g = theApp.GetConfigI("osd_color_g");
|
||||
m_color.b = theApp.GetConfigI("osd_color_b");
|
||||
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_OPACITY_SLIDER), TBM_SETRANGE, TRUE, MAKELONG(0, 100));
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_COLOR_RED_SLIDER), TBM_SETRANGE, TRUE, MAKELONG(0, 255));
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_COLOR_GREEN_SLIDER), TBM_SETRANGE, TRUE, MAKELONG(0, 255));
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_COLOR_BLUE_SLIDER), TBM_SETRANGE, TRUE, MAKELONG(0, 255));
|
||||
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_SIZE), UDM_SETRANGE, 0, MAKELPARAM(100, 1));
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_SIZE), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfigI("osd_fontsize"), 0));
|
||||
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_SPEED), UDM_SETRANGE, 0, MAKELPARAM(10, 2));
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_SPEED), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfigI("osd_log_speed"), 0));
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_TIMEOUT), UDM_SETRANGE, 0, MAKELPARAM(10, 2));
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_TIMEOUT), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfigI("osd_log_timeout"), 0));
|
||||
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_MAX_LOG), UDM_SETRANGE, 0, MAKELPARAM(20, 1));
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_MAX_LOG), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfigI("osd_max_log_messages"), 0));
|
||||
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_FONT_EDIT), WM_SETTEXT, 0, (LPARAM)theApp.GetConfigS("osd_fontname").c_str());
|
||||
|
||||
AddTooltip(IDC_OSD_MAX_LOG);
|
||||
AddTooltip(IDC_OSD_MAX_LOG_EDIT);
|
||||
AddTooltip(IDC_OSD_MONITOR);
|
||||
|
@ -893,18 +898,51 @@ void GSOSDDlg::OnInit()
|
|||
|
||||
void GSOSDDlg::UpdateControls()
|
||||
{
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_TRANSPARENCY_SLIDER), TBM_SETPOS, TRUE, m_transparency);
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_OPACITY_SLIDER), TBM_SETPOS, TRUE, m_color.a);
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_COLOR_RED_SLIDER), TBM_SETPOS, TRUE, m_color.r);
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_COLOR_GREEN_SLIDER), TBM_SETPOS, TRUE, m_color.g);
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_COLOR_BLUE_SLIDER), TBM_SETPOS, TRUE, m_color.b);
|
||||
|
||||
char text[8] = { 0 };
|
||||
sprintf(text, "%d", m_transparency);
|
||||
SetDlgItemText(m_hWnd, IDC_OSD_TRANSPARENCY_TEXT, text);
|
||||
sprintf(text, "%d", m_color.a);
|
||||
SetDlgItemText(m_hWnd, IDC_OSD_OPACITY_AMOUNT, 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));
|
||||
sprintf(text, "%d", m_color.r);
|
||||
SetDlgItemText(m_hWnd, IDC_OSD_COLOR_RED_AMOUNT, text);
|
||||
|
||||
sprintf(text, "%d", m_color.g);
|
||||
SetDlgItemText(m_hWnd, IDC_OSD_COLOR_GREEN_AMOUNT, text);
|
||||
|
||||
sprintf(text, "%d", m_color.b);
|
||||
SetDlgItemText(m_hWnd, IDC_OSD_COLOR_BLUE_AMOUNT, text);
|
||||
|
||||
int monitor_enabled = IsDlgButtonChecked(m_hWnd, IDC_OSD_MONITOR);
|
||||
int log_enabled = IsDlgButtonChecked(m_hWnd, IDC_OSD_LOG);
|
||||
|
||||
// Font
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_COLOR_RED_SLIDER), monitor_enabled || log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_COLOR_RED_TEXT), monitor_enabled || log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_COLOR_RED_AMOUNT), monitor_enabled || log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_COLOR_GREEN_SLIDER), monitor_enabled || log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_COLOR_GREEN_TEXT), monitor_enabled || log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_COLOR_GREEN_AMOUNT), monitor_enabled || log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_COLOR_BLUE_SLIDER), monitor_enabled || log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_COLOR_BLUE_TEXT), monitor_enabled || log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_COLOR_BLUE_AMOUNT), monitor_enabled || log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_SIZE_EDIT), monitor_enabled || log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_SIZE), monitor_enabled || log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_OPACITY_SLIDER), monitor_enabled || log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_OPACITY_AMOUNT), monitor_enabled || log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_SIZE_TEXT), monitor_enabled || log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_OPACITY_TEXT), monitor_enabled || log_enabled);
|
||||
|
||||
// Log
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_TIMEOUT), log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_TIMEOUT_EDIT), log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_TIMEOUT_TEXT), log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_MAX_LOG), log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_MAX_LOG_EDIT), log_enabled);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OSD_MAX_LOG_TEXT), log_enabled);
|
||||
}
|
||||
|
||||
bool GSOSDDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
@ -913,14 +951,41 @@ bool GSOSDDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
case WM_HSCROLL:
|
||||
{
|
||||
if ((HWND)lParam == GetDlgItem(m_hWnd, IDC_OSD_TRANSPARENCY_SLIDER))
|
||||
if ((HWND)lParam == GetDlgItem(m_hWnd, IDC_OSD_OPACITY_SLIDER))
|
||||
{
|
||||
char text[8] = { 0 };
|
||||
|
||||
m_transparency = SendMessage(GetDlgItem(m_hWnd, IDC_OSD_TRANSPARENCY_SLIDER), TBM_GETPOS, 0, 0);
|
||||
m_color.a = SendMessage(GetDlgItem(m_hWnd, IDC_OSD_OPACITY_SLIDER), TBM_GETPOS, 0, 0);
|
||||
|
||||
sprintf(text, "%d", m_transparency);
|
||||
SetDlgItemText(m_hWnd, IDC_OSD_TRANSPARENCY_TEXT, text);
|
||||
sprintf(text, "%d", m_color.a);
|
||||
SetDlgItemText(m_hWnd, IDC_OSD_OPACITY_AMOUNT, text);
|
||||
}
|
||||
else if ((HWND)lParam == GetDlgItem(m_hWnd, IDC_OSD_COLOR_RED_SLIDER))
|
||||
{
|
||||
char text[8] = { 0 };
|
||||
|
||||
m_color.r = SendMessage(GetDlgItem(m_hWnd, IDC_OSD_COLOR_RED_SLIDER), TBM_GETPOS, 0, 0);
|
||||
|
||||
sprintf(text, "%d", m_color.r);
|
||||
SetDlgItemText(m_hWnd, IDC_OSD_COLOR_RED_AMOUNT, text);
|
||||
}
|
||||
else if ((HWND)lParam == GetDlgItem(m_hWnd, IDC_OSD_COLOR_GREEN_SLIDER))
|
||||
{
|
||||
char text[8] = { 0 };
|
||||
|
||||
m_color.g = SendMessage(GetDlgItem(m_hWnd, IDC_OSD_COLOR_GREEN_SLIDER), TBM_GETPOS, 0, 0);
|
||||
|
||||
sprintf(text, "%d", m_color.g);
|
||||
SetDlgItemText(m_hWnd, IDC_OSD_COLOR_GREEN_AMOUNT, text);
|
||||
}
|
||||
else if ((HWND)lParam == GetDlgItem(m_hWnd, IDC_OSD_COLOR_BLUE_SLIDER))
|
||||
{
|
||||
char text[8] = { 0 };
|
||||
|
||||
m_color.b = SendMessage(GetDlgItem(m_hWnd, IDC_OSD_COLOR_BLUE_SLIDER), TBM_GETPOS, 0, 0);
|
||||
|
||||
sprintf(text, "%d", m_color.b);
|
||||
SetDlgItemText(m_hWnd, IDC_OSD_COLOR_BLUE_AMOUNT, text);
|
||||
}
|
||||
} break;
|
||||
|
||||
|
@ -932,34 +997,28 @@ bool GSOSDDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
case IDOK:
|
||||
{
|
||||
INT_PTR data;
|
||||
theApp.SetConfig("osd_color_opacity", m_color.a);
|
||||
theApp.SetConfig("osd_color_r", m_color.r);
|
||||
theApp.SetConfig("osd_color_g", m_color.g);
|
||||
theApp.SetConfig("osd_color_b", m_color.b);
|
||||
|
||||
theApp.SetConfig("osd_fontsize", (int)SendMessage(GetDlgItem(m_hWnd, IDC_OSD_SIZE), UDM_GETPOS, 0, 0));
|
||||
theApp.SetConfig("osd_log_speed", (int)SendMessage(GetDlgItem(m_hWnd, IDC_OSD_SPEED), UDM_GETPOS, 0, 0));
|
||||
theApp.SetConfig("osd_log_timeout", (int)SendMessage(GetDlgItem(m_hWnd, IDC_OSD_TIMEOUT), UDM_GETPOS, 0, 0));
|
||||
theApp.SetConfig("osd_max_log_messages", (int)SendMessage(GetDlgItem(m_hWnd, IDC_OSD_MAX_LOG), UDM_GETPOS, 0, 0));
|
||||
|
||||
theApp.SetConfig("osd_log_enabled", (int)IsDlgButtonChecked(m_hWnd, IDC_OSD_LOG));
|
||||
theApp.SetConfig("osd_monitor_enabled", (int)IsDlgButtonChecked(m_hWnd, IDC_OSD_MONITOR));
|
||||
|
||||
theApp.SetConfig("osd_transparency", m_transparency);
|
||||
|
||||
// OSD Font
|
||||
int length = ((int)SendMessage(GetDlgItem(m_hWnd, IDC_OSD_FONT_EDIT), WM_GETTEXTLENGTH, 0, 0)) + 1;
|
||||
std::unique_ptr<char[]> buffer(new char[length]);
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_OSD_FONT_EDIT), WM_GETTEXT, (WPARAM)length, (LPARAM)buffer.get());
|
||||
theApp.SetConfig("osd_fontname", buffer.get());
|
||||
|
||||
EndDialog(m_hWnd, id);
|
||||
} break;
|
||||
case IDC_OSD_LOG:
|
||||
if (HIWORD(wParam) == BN_CLICKED)
|
||||
UpdateControls();
|
||||
break;
|
||||
case IDC_OSD_FONT_BUTTON:
|
||||
case IDC_OSD_MONITOR:
|
||||
if (HIWORD(wParam) == BN_CLICKED)
|
||||
OpenFileDialog(IDC_OSD_FONT_EDIT, "Select External Font");
|
||||
UpdateControls();
|
||||
break;
|
||||
|
||||
case IDCANCEL:
|
||||
{
|
||||
EndDialog(m_hWnd, IDCANCEL);
|
||||
|
|
|
@ -60,7 +60,13 @@ public:
|
|||
|
||||
class GSOSDDlg : public GSDialog
|
||||
{
|
||||
int m_transparency;
|
||||
struct
|
||||
{
|
||||
int r;
|
||||
int g;
|
||||
int b;
|
||||
int a;
|
||||
} m_color;
|
||||
|
||||
void UpdateControls();
|
||||
|
||||
|
|
|
@ -123,23 +123,32 @@
|
|||
// OSD:
|
||||
#define IDC_OSD_LOG 2170
|
||||
#define IDC_OSD_MONITOR 2171
|
||||
#define IDC_OSD_FONT_BUTTON 2172
|
||||
#define IDC_OSD_FONT_EDIT 2173
|
||||
#define IDC_OSD_SPEED 2174
|
||||
#define IDC_OSD_SPEED_EDIT 2175
|
||||
#define IDC_OSD_SPEED_TEXT 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_MAX_LOG_TEXT 2183
|
||||
#define IDC_OSD_COLOR_RED_SLIDER 2172
|
||||
#define IDC_OSD_COLOR_RED_TEXT 2173
|
||||
#define IDC_OSD_COLOR_RED_AMOUNT 2174
|
||||
#define IDC_OSD_COLOR_BLUE_SLIDER 2175
|
||||
#define IDC_OSD_COLOR_BLUE_TEXT 2176
|
||||
#define IDC_OSD_COLOR_BLUE_AMOUNT 2177
|
||||
#define IDC_OSD_COLOR_GREEN_SLIDER 2178
|
||||
#define IDC_OSD_COLOR_GREEN_TEXT 2179
|
||||
#define IDC_OSD_COLOR_GREEN_AMOUNT 2180
|
||||
#define IDC_OSD_TIMEOUT 2181
|
||||
#define IDC_OSD_TIMEOUT_EDIT 2182
|
||||
#define IDC_OSD_TIMEOUT_TEXT 2183
|
||||
#define IDC_OSD_SIZE 2184
|
||||
#define IDC_OSD_SIZE_EDIT 2185
|
||||
#define IDC_OSD_OPACITY_SLIDER 2186
|
||||
#define IDC_OSD_OPACITY_AMOUNT 2187
|
||||
#define IDC_OSD_MAX_LOG 2188
|
||||
#define IDC_OSD_MAX_LOG_EDIT 2189
|
||||
#define IDC_OSD_MAX_LOG_TEXT 2190
|
||||
#define IDC_OSD_SIZE_TEXT 2191
|
||||
#define IDC_OSD_OPACITY_TEXT 2192
|
||||
// OpenGL Advanced Settings:
|
||||
#define IDC_GEOMETRY_SHADER_OVERRIDE 2190
|
||||
#define IDC_GEOMETRY_SHADER_TEXT 2191
|
||||
#define IDC_IMAGE_LOAD_STORE 2192
|
||||
#define IDC_IMAGE_LOAD_STORE_TEXT 2193
|
||||
#define IDC_GEOMETRY_SHADER_OVERRIDE 2200
|
||||
#define IDC_GEOMETRY_SHADER_TEXT 2201
|
||||
#define IDC_IMAGE_LOAD_STORE 2202
|
||||
#define IDC_IMAGE_LOAD_STORE_TEXT 2203
|
||||
#define IDR_CONVERT_FX 10000
|
||||
#define IDR_TFX_FX 10001
|
||||
#define IDR_MERGE_FX 10002
|
||||
|
|
Loading…
Reference in New Issue