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_EN_CHANGE(IDC_EDIT_VALUE, OnChangeEditValue)
|
||||
ON_BN_CLICKED(IDC_BUTTON_HELP, OnButtonHelp)
|
||||
ON_NOTIFY(NM_DBLCLK, IDC_TREE, OnDblclkTree)
|
||||
ON_BN_CLICKED(IDC_BUTTON_CLOSE, OnButtonClose)
|
||||
//}}AFX_MSG_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)"
|
||||
);
|
||||
}
|
||||
|
||||
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 OnChangeEditValue();
|
||||
afx_msg void OnButtonHelp();
|
||||
afx_msg void OnDblclkTree(NMHDR* pNMHDR, LRESULT* pResult);
|
||||
afx_msg void OnButtonClose();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "IniFile.h"
|
||||
#include "RageUtil.h"
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
@@ -101,6 +102,8 @@ void IniFile::WriteFile()
|
||||
|
||||
CMapStringToString &map = keys[keynum];
|
||||
|
||||
CStringArray as;
|
||||
|
||||
// for each value_name/value pair
|
||||
for( POSITION pos = map.GetStartPosition(); pos != NULL; )
|
||||
{
|
||||
@@ -109,8 +112,12 @@ void IniFile::WriteFile()
|
||||
map.GetNextAssoc( pos, 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" );
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#define IDC_BUTTON_SAVE 1036
|
||||
#define IDC_BUTTON_OVERRIDE 1037
|
||||
#define IDC_BUTTON_HELP 1038
|
||||
#define IDC_BUTTON_CLOSE 1039
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
@@ -56,7 +57,7 @@
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 147
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1039
|
||||
#define _APS_NEXT_CONTROL_VALUE 1040
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -13,18 +13,18 @@ Class2=CSmpackageDlg
|
||||
|
||||
ResourceCount=8
|
||||
Resource1=IDR_MAINFRAME
|
||||
Resource2=IDD_INSTALL
|
||||
Resource2=IDD_EXPORTER
|
||||
Class3=CSMPackageInstallDlg
|
||||
Class4=CSmpackageExportDlg
|
||||
Resource3=IDD_EDIT_INSTALLATIONS
|
||||
Resource3=IDD_MENU
|
||||
Class5=EnterName
|
||||
Resource4=IDD_EXPORTER
|
||||
Resource4=IDD_DIALOG_NAME
|
||||
Class6=EditInsallations
|
||||
Resource5=IDD_CONVERT_THEME
|
||||
Resource5=IDD_INSTALL
|
||||
Class7=MainMenuDlg
|
||||
Resource6=IDD_DIALOG_NAME
|
||||
Resource6=IDD_EDIT_INSTALLATIONS
|
||||
Class8=ConvertThemeDlg
|
||||
Resource7=IDD_MENU
|
||||
Resource7=IDD_CONVERT_THEME
|
||||
Class9=EditMetricsDlg
|
||||
Resource8=IDD_EDIT_METRICS
|
||||
|
||||
@@ -194,7 +194,7 @@ VirtualFilter=dWC
|
||||
Type=1
|
||||
Class=EditMetricsDlg
|
||||
ControlCount=11
|
||||
Control1=IDOK,button,1342242817
|
||||
Control1=IDC_BUTTON_CLOSE,button,1342242816
|
||||
Control2=IDC_STATIC,static,1342177294
|
||||
Control3=IDC_EDIT_VALUE,edit,1484849220
|
||||
Control4=IDC_STATIC,static,1342308352
|
||||
@@ -213,5 +213,5 @@ ImplementationFile=EditMetricsDlg.cpp
|
||||
BaseClass=CDialog
|
||||
Filter=D
|
||||
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"
|
||||
FONT 8, "MS Sans Serif"
|
||||
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
|
||||
EDITTEXT IDC_EDIT_VALUE,217,95,108,50,ES_MULTILINE |
|
||||
ES_AUTOVSCROLL | WS_DISABLED
|
||||
|
||||
Reference in New Issue
Block a user