add metrics editor polish
This commit is contained in:
@@ -51,6 +51,8 @@ BEGIN_MESSAGE_MAP(EditMetricsDlg, CDialog)
|
|||||||
ON_BN_CLICKED(IDC_BUTTON_SAVE, OnButtonSave)
|
ON_BN_CLICKED(IDC_BUTTON_SAVE, OnButtonSave)
|
||||||
ON_EN_CHANGE(IDC_EDIT_VALUE, OnChangeEditValue)
|
ON_EN_CHANGE(IDC_EDIT_VALUE, OnChangeEditValue)
|
||||||
ON_BN_CLICKED(IDC_BUTTON_HELP, OnButtonHelp)
|
ON_BN_CLICKED(IDC_BUTTON_HELP, OnButtonHelp)
|
||||||
|
ON_NOTIFY(NM_DBLCLK, IDC_TREE, OnDblclkTree)
|
||||||
|
ON_BN_CLICKED(IDC_BUTTON_CLOSE, OnButtonClose)
|
||||||
//}}AFX_MSG_MAP
|
//}}AFX_MSG_MAP
|
||||||
END_MESSAGE_MAP()
|
END_MESSAGE_MAP()
|
||||||
|
|
||||||
@@ -257,3 +259,18 @@ void EditMetricsDlg::OnButtonHelp()
|
|||||||
"Red = A metric that exists in the current theme but not in the base theme (check to see if the metric name is misspelled)"
|
"Red = A metric that exists in the current theme but not in the base theme (check to see if the metric name is misspelled)"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EditMetricsDlg::OnDblclkTree(NMHDR* pNMHDR, LRESULT* pResult)
|
||||||
|
{
|
||||||
|
// TODO: Add your control notification handler code here
|
||||||
|
|
||||||
|
OnButtonOverride();
|
||||||
|
|
||||||
|
*pResult = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EditMetricsDlg::OnButtonClose()
|
||||||
|
{
|
||||||
|
// TODO: Add your control notification handler code here
|
||||||
|
EndDialog( IDOK );
|
||||||
|
}
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ protected:
|
|||||||
afx_msg void OnButtonSave();
|
afx_msg void OnButtonSave();
|
||||||
afx_msg void OnChangeEditValue();
|
afx_msg void OnChangeEditValue();
|
||||||
afx_msg void OnButtonHelp();
|
afx_msg void OnButtonHelp();
|
||||||
|
afx_msg void OnDblclkTree(NMHDR* pNMHDR, LRESULT* pResult);
|
||||||
|
afx_msg void OnButtonClose();
|
||||||
//}}AFX_MSG
|
//}}AFX_MSG
|
||||||
DECLARE_MESSAGE_MAP()
|
DECLARE_MESSAGE_MAP()
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "IniFile.h"
|
#include "IniFile.h"
|
||||||
|
#include "RageUtil.h"
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
@@ -101,6 +102,8 @@ void IniFile::WriteFile()
|
|||||||
|
|
||||||
CMapStringToString &map = keys[keynum];
|
CMapStringToString &map = keys[keynum];
|
||||||
|
|
||||||
|
CStringArray as;
|
||||||
|
|
||||||
// for each value_name/value pair
|
// for each value_name/value pair
|
||||||
for( POSITION pos = map.GetStartPosition(); pos != NULL; )
|
for( POSITION pos = map.GetStartPosition(); pos != NULL; )
|
||||||
{
|
{
|
||||||
@@ -109,8 +112,12 @@ void IniFile::WriteFile()
|
|||||||
map.GetNextAssoc( pos, value_name, value );
|
map.GetNextAssoc( pos, value_name, value );
|
||||||
|
|
||||||
sTemp.Format( "%s=%s\n", value_name, value );
|
sTemp.Format( "%s=%s\n", value_name, value );
|
||||||
file.WriteString( sTemp );
|
as.Add( sTemp );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SortCStringArray( as );
|
||||||
|
for( int i=0; i<as.GetSize(); i++ )
|
||||||
|
file.WriteString( as[i] );
|
||||||
file.WriteString( "\n" );
|
file.WriteString( "\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
#define IDC_BUTTON_SAVE 1036
|
#define IDC_BUTTON_SAVE 1036
|
||||||
#define IDC_BUTTON_OVERRIDE 1037
|
#define IDC_BUTTON_OVERRIDE 1037
|
||||||
#define IDC_BUTTON_HELP 1038
|
#define IDC_BUTTON_HELP 1038
|
||||||
|
#define IDC_BUTTON_CLOSE 1039
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
@@ -56,7 +57,7 @@
|
|||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 147
|
#define _APS_NEXT_RESOURCE_VALUE 147
|
||||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1039
|
#define _APS_NEXT_CONTROL_VALUE 1040
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -13,18 +13,18 @@ Class2=CSmpackageDlg
|
|||||||
|
|
||||||
ResourceCount=8
|
ResourceCount=8
|
||||||
Resource1=IDR_MAINFRAME
|
Resource1=IDR_MAINFRAME
|
||||||
Resource2=IDD_INSTALL
|
Resource2=IDD_EXPORTER
|
||||||
Class3=CSMPackageInstallDlg
|
Class3=CSMPackageInstallDlg
|
||||||
Class4=CSmpackageExportDlg
|
Class4=CSmpackageExportDlg
|
||||||
Resource3=IDD_EDIT_INSTALLATIONS
|
Resource3=IDD_MENU
|
||||||
Class5=EnterName
|
Class5=EnterName
|
||||||
Resource4=IDD_EXPORTER
|
Resource4=IDD_DIALOG_NAME
|
||||||
Class6=EditInsallations
|
Class6=EditInsallations
|
||||||
Resource5=IDD_CONVERT_THEME
|
Resource5=IDD_INSTALL
|
||||||
Class7=MainMenuDlg
|
Class7=MainMenuDlg
|
||||||
Resource6=IDD_DIALOG_NAME
|
Resource6=IDD_EDIT_INSTALLATIONS
|
||||||
Class8=ConvertThemeDlg
|
Class8=ConvertThemeDlg
|
||||||
Resource7=IDD_MENU
|
Resource7=IDD_CONVERT_THEME
|
||||||
Class9=EditMetricsDlg
|
Class9=EditMetricsDlg
|
||||||
Resource8=IDD_EDIT_METRICS
|
Resource8=IDD_EDIT_METRICS
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ VirtualFilter=dWC
|
|||||||
Type=1
|
Type=1
|
||||||
Class=EditMetricsDlg
|
Class=EditMetricsDlg
|
||||||
ControlCount=11
|
ControlCount=11
|
||||||
Control1=IDOK,button,1342242817
|
Control1=IDC_BUTTON_CLOSE,button,1342242816
|
||||||
Control2=IDC_STATIC,static,1342177294
|
Control2=IDC_STATIC,static,1342177294
|
||||||
Control3=IDC_EDIT_VALUE,edit,1484849220
|
Control3=IDC_EDIT_VALUE,edit,1484849220
|
||||||
Control4=IDC_STATIC,static,1342308352
|
Control4=IDC_STATIC,static,1342308352
|
||||||
@@ -213,5 +213,5 @@ ImplementationFile=EditMetricsDlg.cpp
|
|||||||
BaseClass=CDialog
|
BaseClass=CDialog
|
||||||
Filter=D
|
Filter=D
|
||||||
VirtualFilter=dWC
|
VirtualFilter=dWC
|
||||||
LastObject=IDC_BUTTON_REMOVE
|
LastObject=IDC_TREE
|
||||||
|
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|||||||
CAPTION "Edit Theme Metrics"
|
CAPTION "Edit Theme Metrics"
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "Close",IDOK,275,213,50,14
|
PUSHBUTTON "Close",IDC_BUTTON_CLOSE,275,213,50,14
|
||||||
CONTROL 146,IDC_STATIC,"Static",SS_BITMAP,0,0,332,38
|
CONTROL 146,IDC_STATIC,"Static",SS_BITMAP,0,0,332,38
|
||||||
EDITTEXT IDC_EDIT_VALUE,217,95,108,50,ES_MULTILINE |
|
EDITTEXT IDC_EDIT_VALUE,217,95,108,50,ES_MULTILINE |
|
||||||
ES_AUTOVSCROLL | WS_DISABLED
|
ES_AUTOVSCROLL | WS_DISABLED
|
||||||
|
|||||||
Reference in New Issue
Block a user