LilyPad: Minor dialog updates. Display FF axis names, display version in config screen.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@630 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
mattmenke 2009-02-27 23:29:48 +00:00
parent 19e56dc33e
commit b66db6ffd3
5 changed files with 63 additions and 35 deletions

View File

@ -336,6 +336,12 @@ void SelChanged(int pad) {
}
else if (type == IDC_FF_AXIS1_ENABLED) {
CheckDlgButton(hWnd, i, BST_CHECKED * (info->force!=0));
wsprintfW(temp[0], L"Axis %i", index+1);
if (dev->ffAxes[index].displayName && wcslen(dev->ffAxes[index].displayName) < 50) {
wchar_t *end = wcschr(temp[0], 0);
wsprintfW(end, L": %s", dev->ffAxes[index].displayName);
}
SetWindowText(hWndTemp, temp[0]);
}
}
}
@ -1733,7 +1739,10 @@ void CALLBACK PADconfigure() {
psh.hwndParent = GetActiveWindow();
psh.nPages = 1;
psh.phpage = &page;
psh.pszCaption = L"LilyPad Settings";
wchar_t title[200];
GetNameAndVersionString(title);
wcscat(title, L" Settings");
psh.pszCaption = title;
PropertySheet(&psh);
LoadSettings(1);
hWnds[0] = hWnds[1] = 0;

View File

@ -23,6 +23,8 @@
#include <windows.h>
extern HINSTANCE hInst;
// Needed for config screen
void GetNameAndVersionString(wchar_t *out);
#ifdef NO_CRT
inline void * malloc(size_t size) {

View File

@ -12,6 +12,7 @@
#include "DeviceEnumerator.h"
#include "WndProcEater.h"
#include "KeyboardQueue.h"
#include "svnrev.h"
#include "resource.h"
// Used to prevent reading input and cleaning up input devices at the same time.
@ -496,9 +497,19 @@ u32 CALLBACK PS2EgetLibVersion2(u32 type) {
return 0;
}
void GetNameAndVersionString(wchar_t *out) {
#ifdef _DEBUG
wsprintfW(out, L"LilyPad Debug %i.%i.%i (r%i)", (VERSION>>8)&0xFF, VERSION&0xFF, (VERSION>>24)&0xFF, SVN_REV);
#else
wsprintfW(out, L"LilyPad %i.%i.%i", (VERSION>>8)&0xFF, VERSION&0xFF, (VERSION>>24)&0xFF, SVN_REV);
#endif
}
char* CALLBACK PSEgetLibName() {
#ifdef _DEBUG
return "LilyPad Debug";
static char version[50];
sprintf(version, "LilyPad Debug (r%i)", SVN_REV);
return version;
#else
return "LilyPad";
#endif
@ -1028,9 +1039,14 @@ u32 CALLBACK PADquery() {
//void CALLBACK PADgsDriverInfo(GSdriverInfo *info) {
//}
INT_PTR CALLBACK AboutDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
if (uMsg == WM_COMMAND && LOWORD(wParam) == IDOK) {
EndDialog(hwndDlg, 0);
INT_PTR CALLBACK AboutDialogProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
if (uMsg == WM_INITDIALOG) {
wchar_t idString[100];
GetNameAndVersionString(idString);
SetDlgItemTextW(hWndDlg, IDC_VERSION, idString);
}
else if (uMsg == WM_COMMAND && (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)) {
EndDialog(hWndDlg, 0);
return 1;
}
return 0;

View File

@ -109,28 +109,28 @@ BEGIN
GROUPBOX "",ID_FF,195,6,222,250
COMBOBOX IDC_FF_EFFECT,203,20,206,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "",IDC_FF_AXIS1,"msctls_trackbar32",WS_TABSTOP,199,40,214,17
CONTROL "Axis 1",IDC_FF_AXIS1_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,60,37,10
CONTROL "Flip",IDC_FF_AXIS1_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,260,60,35,10
CONTROL "Axis 1",IDC_FF_AXIS1_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,60,91,10
CONTROL "Flip",IDC_FF_AXIS1_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,60,35,10
EDITTEXT IDC_FF_AXIS1_SCALE,375,60,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
CONTROL "",IDC_FF_AXIS2,"msctls_trackbar32",WS_TABSTOP,199,76,214,17
CONTROL "Axis 2",IDC_FF_AXIS2_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,96,37,10
CONTROL "Flip",IDC_FF_AXIS2_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,260,96,35,10
CONTROL "Axis 2",IDC_FF_AXIS2_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,96,91,10
CONTROL "Flip",IDC_FF_AXIS2_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,96,35,10
EDITTEXT IDC_FF_AXIS2_SCALE,375,96,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
CONTROL "",IDC_FF_AXIS3,"msctls_trackbar32",WS_TABSTOP,199,112,214,17
CONTROL "Axis 3",IDC_FF_AXIS3_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,132,37,10
CONTROL "Flip",IDC_FF_AXIS3_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,260,132,35,10
CONTROL "Axis 3",IDC_FF_AXIS3_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,132,91,10
CONTROL "Flip",IDC_FF_AXIS3_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,132,35,10
EDITTEXT IDC_FF_AXIS3_SCALE,375,132,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
CONTROL "",IDC_FF_AXIS4,"msctls_trackbar32",WS_TABSTOP,199,148,214,17
CONTROL "Axis 4",IDC_FF_AXIS4_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,168,37,10
CONTROL "Flip",IDC_FF_AXIS4_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,260,168,35,10
CONTROL "Axis 4",IDC_FF_AXIS4_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,168,91,10
CONTROL "Flip",IDC_FF_AXIS4_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,168,35,10
EDITTEXT IDC_FF_AXIS4_SCALE,375,168,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
CONTROL "",IDC_FF_AXIS5,"msctls_trackbar32",WS_TABSTOP,199,184,214,17
CONTROL "Axis 5",IDC_FF_AXIS5_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,204,37,10
CONTROL "Flip",IDC_FF_AXIS5_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,260,204,35,10
CONTROL "Axis 5",IDC_FF_AXIS5_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,204,91,10
CONTROL "Flip",IDC_FF_AXIS5_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,204,35,10
EDITTEXT IDC_FF_AXIS5_SCALE,375,204,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
CONTROL "",IDC_FF_AXIS6,"msctls_trackbar32",WS_TABSTOP,199,220,214,17
CONTROL "Axis 6",IDC_FF_AXIS6_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,240,37,10
CONTROL "Flip",IDC_FF_AXIS6_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,240,96,35,10
CONTROL "Axis 6",IDC_FF_AXIS6_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,240,91,10
CONTROL "Flip",IDC_FF_AXIS6_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,240,35,10
EDITTEXT IDC_FF_AXIS6_SCALE,375,240,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
PUSHBUTTON "Test",ID_TEST,196,260,62,15
PUSHBUTTON "Back to Controls",ID_CONTROLS,196,296,62,15
@ -187,28 +187,28 @@ BEGIN
GROUPBOX "",ID_FF,195,6,222,250
COMBOBOX IDC_FF_EFFECT,203,20,206,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "",IDC_FF_AXIS1,"msctls_trackbar32",WS_TABSTOP,199,40,214,17
CONTROL "Axis 1",IDC_FF_AXIS1_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,60,37,10
CONTROL "Flip",IDC_FF_AXIS1_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,260,60,35,10
CONTROL "Axis 1",IDC_FF_AXIS1_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,60,91,10
CONTROL "Flip",IDC_FF_AXIS1_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,60,35,10
EDITTEXT IDC_FF_AXIS1_SCALE,375,60,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
CONTROL "",IDC_FF_AXIS2,"msctls_trackbar32",WS_TABSTOP,199,76,214,17
CONTROL "Axis 2",IDC_FF_AXIS2_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,96,37,10
CONTROL "Flip",IDC_FF_AXIS2_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,260,96,35,10
CONTROL "Axis 2",IDC_FF_AXIS2_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,96,91,10
CONTROL "Flip",IDC_FF_AXIS2_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,96,35,10
EDITTEXT IDC_FF_AXIS2_SCALE,375,96,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
CONTROL "",IDC_FF_AXIS3,"msctls_trackbar32",WS_TABSTOP,199,112,214,17
CONTROL "Axis 3",IDC_FF_AXIS3_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,132,37,10
CONTROL "Flip",IDC_FF_AXIS3_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,260,132,35,10
CONTROL "Axis 3",IDC_FF_AXIS3_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,132,91,10
CONTROL "Flip",IDC_FF_AXIS3_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,132,35,10
EDITTEXT IDC_FF_AXIS3_SCALE,375,132,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
CONTROL "",IDC_FF_AXIS4,"msctls_trackbar32",WS_TABSTOP,199,148,214,17
CONTROL "Axis 4",IDC_FF_AXIS4_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,168,37,10
CONTROL "Flip",IDC_FF_AXIS4_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,260,168,35,10
CONTROL "Axis 4",IDC_FF_AXIS4_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,168,91,10
CONTROL "Flip",IDC_FF_AXIS4_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,168,35,10
EDITTEXT IDC_FF_AXIS4_SCALE,375,168,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
CONTROL "",IDC_FF_AXIS5,"msctls_trackbar32",WS_TABSTOP,199,184,214,17
CONTROL "Axis 5",IDC_FF_AXIS5_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,204,37,10
CONTROL "Flip",IDC_FF_AXIS5_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,260,204,35,10
CONTROL "Axis 5",IDC_FF_AXIS5_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,204,91,10
CONTROL "Flip",IDC_FF_AXIS5_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,204,35,10
EDITTEXT IDC_FF_AXIS5_SCALE,375,204,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
CONTROL "",IDC_FF_AXIS6,"msctls_trackbar32",WS_TABSTOP,199,220,214,17
CONTROL "Axis 6",IDC_FF_AXIS6_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,240,37,10
CONTROL "Flip",IDC_FF_AXIS6_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,240,96,35,10
CONTROL "Axis 6",IDC_FF_AXIS6_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,240,91,10
CONTROL "Flip",IDC_FF_AXIS6_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,240,35,10
EDITTEXT IDC_FF_AXIS6_SCALE,375,240,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
PUSHBUTTON "Test",ID_TEST,196,260,62,15
PUSHBUTTON "Back to Controls",ID_CONTROLS,196,296,62,15
@ -277,14 +277,14 @@ BEGIN
PUSHBUTTON "Load",ID_LOAD,313,295,48,15
END
IDD_ABOUT DIALOGEX 0, 0, 100, 66
IDD_ABOUT DIALOGEX 0, 0, 108, 66
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About LilyPad"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
CTEXT "LilyPad plugin",IDC_STATIC,7,7,86,10
ICON IDI_FROG,IDC_STATIC,39,20,20,20
DEFPUSHBUTTON "OK",IDOK,25,45,50,14
CTEXT "LilyPad plugin",IDC_VERSION,7,7,94,10
ICON IDI_FROG,IDC_STATIC,42,20,21,20
DEFPUSHBUTTON "OK",IDOK,28,45,50,14
END
IDD_DIAG DIALOGEX 0, 0, 190, 178
@ -331,7 +331,7 @@ BEGIN
IDD_ABOUT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 93
RIGHTMARGIN, 101
TOPMARGIN, 7
BOTTOMMARGIN, 59
END

View File

@ -115,6 +115,7 @@
#define IDC_FF_MOTOR 0x1303
#define ID_FF 0x1304
#define IDC_FF_EFFECT 0x1305
#define IDC_VERSION 0x1306
#define IDC_FF_AXIS1_ENABLED 0x1310
#define IDC_FF_AXIS1 0x1311
#define IDC_FF_AXIS1_FLIP 0x1312