From 0aa00e9e5afb1df83749aadf5fc63a308096d6f6 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 27 May 2008 08:54:26 +0000 Subject: [PATCH] add DoubleRes UI stubs, add 'Bold' to saved file name --- .../Texture Font Generator-net2008.vcproj | 2 +- .../Texture Font Generator.rc | 4 ++++ .../Texture Font GeneratorDlg.cpp | 20 +++++++++++++++++-- .../Texture Font GeneratorDlg.h | 1 + .../src/Texture Font Generator/resource.h | 5 ++++- 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/stepmania/src/Texture Font Generator/Texture Font Generator-net2008.vcproj b/stepmania/src/Texture Font Generator/Texture Font Generator-net2008.vcproj index 9bb316d102..012e77d2f6 100644 --- a/stepmania/src/Texture Font Generator/Texture Font Generator-net2008.vcproj +++ b/stepmania/src/Texture Font Generator/Texture Font Generator-net2008.vcproj @@ -70,7 +70,7 @@ /> m_fFontSizePixels = (float) atof(sText); - + m_Padding.GetWindowText(sText); g_pTextureFont->m_iPadding = atoi(sText); @@ -134,6 +135,8 @@ void CTextureFontGeneratorDlg::UpdateFont() g_pTextureFont->m_bBold = !!( pMenu->GetMenuState(ID_STYLE_BOLD, 0) & MF_CHECKED ); g_pTextureFont->m_bItalic = !!( pMenu->GetMenuState(ID_STYLE_ITALIC, 0) & MF_CHECKED ); g_pTextureFont->m_bAntiAlias = !!( pMenu->GetMenuState(ID_STYLE_ANTIALIASED, 0) & MF_CHECKED ); + if( !!( pMenu->GetMenuState(ID_OPTIONS_DOUBLERES, 0) & MF_CHECKED ) ) + g_pTextureFont->m_fFontSizePixels *= 2; g_pTextureFont->m_PagesToGenerate.clear(); FontPageDescription desc; @@ -499,6 +502,16 @@ void CTextureFontGeneratorDlg::OnStyleItalic() Invalidate( FALSE ); } +void CTextureFontGeneratorDlg::OnOptionsDoubleres() +{ + CMenu *pMenu = GetMenu(); + int Checked = pMenu->GetMenuState(ID_OPTIONS_DOUBLERES, 0) & MF_CHECKED; + Checked ^= MF_CHECKED; + pMenu->CheckMenuItem( ID_OPTIONS_DOUBLERES, Checked ); + m_bUpdateFontNeeded = true; + Invalidate( FALSE ); +} + void CTextureFontGeneratorDlg::OnDeltaposSpinTop(NMHDR *pNMHDR, LRESULT *pResult) { LPNMUPDOWN pNMUpDown = reinterpret_cast(pNMHDR); @@ -531,7 +544,10 @@ void CTextureFontGeneratorDlg::OnFileSave() { CString sName = g_pTextureFont->m_sFamily; sName.MakeLower(); - _snprintf( szFile, 1023, "_%s %gpx", (const char *) sName, g_pTextureFont->m_fFontSizePixels ); + _snprintf( szFile, 1023, "_%s%s %gpx", + (const char *) sName, + g_pTextureFont->m_bBold ? " Bold" : "", + g_pTextureFont->m_fFontSizePixels ); } ofn.nMaxFile = sizeof(szFile); diff --git a/stepmania/src/Texture Font Generator/Texture Font GeneratorDlg.h b/stepmania/src/Texture Font Generator/Texture Font GeneratorDlg.h index e6dd4c0fe5..0edcdff9e7 100644 --- a/stepmania/src/Texture Font Generator/Texture Font GeneratorDlg.h +++ b/stepmania/src/Texture Font Generator/Texture Font GeneratorDlg.h @@ -69,6 +69,7 @@ public: CSpinButtonCtrl m_SpinTop; CSpinButtonCtrl m_SpinBaseline; CStatic m_FontType; + afx_msg void OnOptionsDoubleres(); }; /* diff --git a/stepmania/src/Texture Font Generator/resource.h b/stepmania/src/Texture Font Generator/resource.h index 7b0360a920..5c3f1677d9 100644 --- a/stepmania/src/Texture Font Generator/resource.h +++ b/stepmania/src/Texture Font Generator/resource.h @@ -28,13 +28,16 @@ #define IDC_CHECK1 1026 #define ID_ACCELERATOR_ITALIC 32773 #define ID_ACCELERATOR_BOLD 32774 +#define ID_OPTIONS_DOUBLERESOLUTION 32779 +#define ID_OPTIONS_DOUBLERES 32780 +#define IDC_OPTIONS_DOUBLERES 32781 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 145 -#define _APS_NEXT_COMMAND_VALUE 32779 +#define _APS_NEXT_COMMAND_VALUE 32782 #define _APS_NEXT_CONTROL_VALUE 1028 #define _APS_NEXT_SYMED_VALUE 101 #endif