From: <sag...@us...> - 2014-12-31 00:37:00
|
Revision: 4687 http://sourceforge.net/p/modplug/code/4687 Author: saga-games Date: 2014-12-31 00:36:43 +0000 (Wed, 31 Dec 2014) Log Message: ----------- [New] Can now change the font of the comment text through the Display options. [Imp] Pattern tab: Data entry shortcuts / scroll wheel do now take the default volume into consideration, i.e. when making a data entry in an empty volume column field and there is a note and instrument next to it, a volume command is inserted (http://forum.openmpt.org/index.php?topic=5411.0) [Mod] OpenMPT: Version is now 1.24.01.04 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/Ctrl_com.cpp trunk/OpenMPT/mptrack/Ctrl_com.h trunk/OpenMPT/mptrack/Draw_pat.cpp trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mainfrm.h trunk/OpenMPT/mptrack/Moptions.cpp trunk/OpenMPT/mptrack/Moptions.h trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/PatternFont.cpp trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/mptrack/TrackerSettings.h trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/View_pat.h trunk/OpenMPT/mptrack/WelcomeDialog.cpp trunk/OpenMPT/mptrack/mptrack.rc Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-12-30 12:43:32 UTC (rev 4686) +++ trunk/OpenMPT/common/versionNumber.h 2014-12-31 00:36:43 UTC (rev 4687) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 24 #define VER_MINOR 01 -#define VER_MINORMINOR 03 +#define VER_MINORMINOR 04 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/mptrack/Ctrl_com.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_com.cpp 2014-12-30 12:43:32 UTC (rev 4686) +++ trunk/OpenMPT/mptrack/Ctrl_com.cpp 2014-12-31 00:36:43 UTC (rev 4687) @@ -42,7 +42,7 @@ //--------------------------------------------------------------------------------------------------------- { m_nLockCount = 0; - m_hFont = NULL; + charWidth = 0; } @@ -74,7 +74,6 @@ { CModControlDlg::OnInitDialog(); // Initialize comments - m_hFont = NULL; m_EditComments.SetMargins(4, 0); UpdateView(CommentHint().ModType()); m_EditComments.SetFocus(); @@ -99,9 +98,9 @@ rect.right = rcClient.right - rect.left; if ((rect.right > rect.left) && (rect.bottom > rect.top)) { - int cxmax = (TrackerSettings::Instance().m_dwPatternSetup & PATTERN_LARGECOMMENTS) ? 80*8 : 80*6; + int cxmax = 80 * charWidth; int cx = rect.Width(), cy = rect.Height(); - if (cx > cxmax) cx = cxmax; + if (cx > cxmax && cxmax != 0) cx = cxmax; if ((cx != cx0) || (cy != cy0)) m_EditComments.SetWindowPos(NULL, 0,0, cx, cy, SWP_NOMOVE|SWP_NOZORDER|SWP_DRAWFRAME); } } @@ -114,17 +113,24 @@ if (pHint == this || !commentHint.GetType()[HINT_MODCOMMENTS | HINT_MPTOPTIONS | HINT_MODTYPE]) return; if (m_nLockCount) return; m_nLockCount++; - HFONT newfont; - if (TrackerSettings::Instance().m_dwPatternSetup & PATTERN_LARGECOMMENTS) - newfont = CMainFrame::GetLargeFixedFont(); - else - newfont = CMainFrame::GetFixedFont(); - if (newfont != m_hFont) + + static FontSetting previousFont; + FontSetting font = TrackerSettings::Instance().commentsFont; + // Point size to pixels + int32_t fontSize = -MulDiv(font.size, ::GetDeviceCaps(GetDC()->m_hDC, LOGPIXELSY), 720); + charWidth = (-fontSize + 1) / 2; + if(previousFont != font) { - m_hFont = newfont; - m_EditComments.SendMessage(WM_SETFONT, (WPARAM)newfont); - RecalcLayout(); + previousFont = font; + CMainFrame::GetCommentsFont() = ::CreateFont(fontSize, charWidth, 0, 0, font.flags[FontSetting::Bold] ? FW_BOLD : FW_NORMAL, + font.flags[FontSetting::Italic] ? TRUE :FALSE, FALSE, FALSE, + DEFAULT_CHARSET, OUT_RASTER_PRECIS, + CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, + FIXED_PITCH | FF_MODERN, font.name.c_str()); } + m_EditComments.SendMessage(WM_SETFONT, (WPARAM)CMainFrame::GetCommentsFont()); + RecalcLayout(); + m_EditComments.SetRedraw(FALSE); m_EditComments.SetSel(0, -1, TRUE); m_EditComments.ReplaceSel(""); Modified: trunk/OpenMPT/mptrack/Ctrl_com.h =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_com.h 2014-12-30 12:43:32 UTC (rev 4686) +++ trunk/OpenMPT/mptrack/Ctrl_com.h 2014-12-31 00:36:43 UTC (rev 4687) @@ -18,7 +18,7 @@ //======================================== { protected: - HFONT m_hFont; + int charWidth; UINT m_nLockCount; public: Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Draw_pat.cpp 2014-12-30 12:43:32 UTC (rev 4686) +++ trunk/OpenMPT/mptrack/Draw_pat.cpp 2014-12-31 00:36:43 UTC (rev 4687) @@ -420,26 +420,8 @@ if(drawDefaultVolume) { // Displaying sample default volume if there is no volume command. - const CSoundFile *pSndFile = GetSoundFile(); - SAMPLEINDEX sample = mc.instr; - if(pSndFile->GetNumInstruments()) - { - if(mc.instr <= pSndFile->GetNumInstruments() && pSndFile->Instruments[mc.instr]) - { - sample = pSndFile->Instruments[mc.instr]->Keyboard[mc.note - NOTE_MIN]; - } else - { - sample = 0; - } - } volcmd = VOLCMD_VOLUME; - if(sample && sample <= pSndFile->GetNumSamples()) - { - vol = pSndFile->GetSample(sample).nVolume / 4; - } else - { - vol = 64; - } + vol = GetDefaultVolume(mc); } if(volcmd != VOLCMD_NONE) Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2014-12-30 12:43:32 UTC (rev 4686) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2014-12-31 00:36:43 UTC (rev 4687) @@ -123,7 +123,6 @@ HICON CMainFrame::m_hIcon = NULL; HFONT CMainFrame::m_hGUIFont = NULL; HFONT CMainFrame::m_hFixedFont = NULL; -HFONT CMainFrame::m_hLargeFixedFont = NULL; HPEN CMainFrame::penDarkGray = NULL; HPEN CMainFrame::penScratch = NULL; HPEN CMainFrame::penGray00 = NULL; @@ -298,16 +297,6 @@ m_SampleIcons.Create(IDB_SMPTOOLBAR, 20, 18, SAMPLEIMG_NUMIMAGES, 1, GetDC()); m_hGUIFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT); - m_hFixedFont = ::CreateFont(12,5, 0,0, 300, - FALSE, FALSE, FALSE, - OEM_CHARSET, OUT_RASTER_PRECIS, - CLIP_DEFAULT_PRECIS, DRAFT_QUALITY, - FIXED_PITCH | FF_MODERN, ""); - m_hLargeFixedFont = ::CreateFont(18,8, 0,0, 400, - FALSE, FALSE, FALSE, - OEM_CHARSET, OUT_RASTER_PRECIS, - CLIP_DEFAULT_PRECIS, DRAFT_QUALITY, - FIXED_PITCH | FF_MODERN, ""); if (m_hGUIFont == NULL) m_hGUIFont = (HFONT)GetStockObject(ANSI_VAR_FONT); brushBlack = (HBRUSH)::GetStockObject(BLACK_BRUSH); brushWhite = (HBRUSH)::GetStockObject(WHITE_BRUSH); @@ -415,7 +404,6 @@ DeleteGDIObject(penEnvelope); DeleteGDIObject(penEnvelopeHighlight); DeleteGDIObject(m_hFixedFont); - DeleteGDIObject(m_hLargeFixedFont); DeleteGDIObject(penScratch); DeleteGDIObject(penGray00); DeleteGDIObject(penGray33); Modified: trunk/OpenMPT/mptrack/Mainfrm.h =================================================================== --- trunk/OpenMPT/mptrack/Mainfrm.h 2014-12-30 12:43:32 UTC (rev 4686) +++ trunk/OpenMPT/mptrack/Mainfrm.h 2014-12-31 00:36:43 UTC (rev 4687) @@ -81,6 +81,7 @@ CTRLMSG_PREVORDER, CTRLMSG_NEXTORDER, CTRLMSG_SETRECORD, + CTRLMSG_PAT_DUPPATTERN, // Sample-Specific CTRLMSG_SMP_PREVINSTRUMENT, CTRLMSG_SMP_NEXTINSTRUMENT, @@ -95,7 +96,6 @@ CTRLMSG_INS_NEWINSTRUMENT, CTRLMSG_INS_SONGDROP, CTRLMSG_INS_SAMPLEMAP, - CTRLMSG_PAT_DUPPATTERN, }; enum @@ -331,7 +331,7 @@ // GDI static HICON m_hIcon; - static HFONT m_hGUIFont, m_hFixedFont, m_hLargeFixedFont; + static HFONT m_hGUIFont, m_hFixedFont; static HBRUSH brushGray, brushBlack, brushWhite, brushText, brushHighLight, brushHighLightRed, brushWindow, brushYellow; // static CBrush *pbrushBlack, *pbrushWhite; static HPEN penBlack, penDarkGray, penLightGray, penWhite, penHalfDarkGray, penSample, penEnvelope, penEnvelopeHighlight, penSeparator, penScratch, penGray00, penGray33, penGray40, penGray55, penGray80, penGray99, penGraycc, penGrayff; @@ -428,8 +428,7 @@ static void UpdateColors(); static HICON GetModIcon() { return m_hIcon; } static HFONT GetGUIFont() { return m_hGUIFont; } - static HFONT GetFixedFont() { return m_hFixedFont; } - static HFONT GetLargeFixedFont() { return m_hLargeFixedFont; } + static HFONT &GetCommentsFont() { return m_hFixedFont; } static void UpdateAllViews(UpdateHint hint, CObject *pHint=NULL); static LRESULT CALLBACK KeyboardProc(int code, WPARAM wParam, LPARAM lParam); static CInputHandler *m_InputHandler; //rewbs.customKeys Modified: trunk/OpenMPT/mptrack/Moptions.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moptions.cpp 2014-12-30 12:43:32 UTC (rev 4686) +++ trunk/OpenMPT/mptrack/Moptions.cpp 2014-12-31 00:36:43 UTC (rev 4687) @@ -66,7 +66,8 @@ ON_COMMAND(IDC_BUTTON6, OnPresetFT2) ON_COMMAND(IDC_BUTTON7, OnPresetIT) ON_COMMAND(IDC_BUTTON8, OnPresetBuzz) - ON_COMMAND(IDC_BUTTON9, OnChooseFont) + ON_COMMAND(IDC_BUTTON9, OnChoosePatternFont) + ON_COMMAND(IDC_BUTTON10, OnChooseCommentFont) ON_COMMAND(IDC_LOAD_COLORSCHEME, OnLoadColorScheme) ON_COMMAND(IDC_SAVE_COLORSCHEME, OnSaveColorScheme) ON_COMMAND(IDC_CHECK1, OnSettingsChanged) @@ -94,10 +95,10 @@ } -static std::string FormatFontName(const std::string fontName, int32_t fontSize) -//----------------------------------------------------------------------------- +static std::string FormatFontName(const FontSetting &font) +//-------------------------------------------------------- { - return fontName + ", " + mpt::ToString(fontSize / 10); + return font.name + ", " + mpt::ToString(font.size / 10); } @@ -120,9 +121,7 @@ SetDlgItemInt(IDC_PRIMARYHILITE, TrackerSettings::Instance().m_nRowHighlightMeasures); SetDlgItemInt(IDC_SECONDARYHILITE, TrackerSettings::Instance().m_nRowHighlightBeats); - fontName = TrackerSettings::Instance().patternFont; - fontSize = TrackerSettings::Instance().patternFontSize; - fontFlags = TrackerSettings::Instance().patternFontFlags; + patternFont = TrackerSettings::Instance().patternFont; m_ComboFont.AddString("Built-in (small)"); m_ComboFont.AddString("Built-in (large)"); m_ComboFont.AddString("Built-in (small, x2)"); @@ -130,18 +129,21 @@ m_ComboFont.AddString("Built-in (small, x3)"); m_ComboFont.AddString("Built-in (large, x3)"); int sel = 0; - if(fontName == PATTERNFONT_SMALL) + if(patternFont.name == PATTERNFONT_SMALL) { - sel = fontSize * 2; - } else if(fontName == PATTERNFONT_LARGE) + sel = patternFont.size * 2; + } else if(patternFont.name == PATTERNFONT_LARGE) { - sel = fontSize * 2 + 1; + sel = patternFont.size * 2 + 1; } else { - m_ComboFont.AddString(FormatFontName(fontName, fontSize).c_str()); + m_ComboFont.AddString(FormatFontName(patternFont).c_str()); sel = 6; } m_ComboFont.SetCurSel(sel); + + commentFont = TrackerSettings::Instance().commentsFont; + SetDlgItemText(IDC_BUTTON10, FormatFontName(commentFont).c_str()); OnColorSelChanged(); return TRUE; @@ -174,8 +176,7 @@ if (IsDlgButtonChecked(IDC_CHECK4)) TrackerSettings::Instance().m_dwPatternSetup |= PATTERN_2NDHIGHLIGHT; TrackerSettings::Instance().rememberSongWindows = IsDlgButtonChecked(IDC_CHECK5) != BST_UNCHECKED; - std::string newName = fontName; - int32_t newSize = fontSize; + FontSetting newPatternFont = patternFont; const int fontSel = m_ComboFont.GetCurSel(); switch(fontSel) { @@ -183,21 +184,20 @@ case 2: case 4: default: - newName = PATTERNFONT_SMALL; - newSize = fontSel / 2; + newPatternFont.name = PATTERNFONT_SMALL; + newPatternFont.size = fontSel / 2; break; case 1: case 3: case 5: - newName = PATTERNFONT_LARGE; - newSize = fontSel / 2; + newPatternFont.name = PATTERNFONT_LARGE; + newPatternFont.size = fontSel / 2; break; case 6: break; } - TrackerSettings::Instance().patternFont = newName; - TrackerSettings::Instance().patternFontSize = newSize; - TrackerSettings::Instance().patternFontFlags = fontFlags; + TrackerSettings::Instance().patternFont = newPatternFont; + TrackerSettings::Instance().commentsFont = commentFont; TrackerSettings::Instance().m_nRowHighlightMeasures = GetDlgItemInt(IDC_PRIMARYHILITE); TrackerSettings::Instance().m_nRowHighlightBeats = GetDlgItemInt(IDC_SECONDARYHILITE); @@ -218,20 +218,20 @@ } -void COptionsColors::OnChooseFont() -//--------------------------------- +void COptionsColors::OnChoosePatternFont() +//---------------------------------------- { LOGFONT lf; MemsetZero(lf); - const int32_t size = fontSize < 10 ? 120 : fontSize; + const int32_t size = patternFont.size < 10 ? 120 : patternFont.size; // Point size to pixels lf.lfHeight = -MulDiv(size, GetDeviceCaps(GetDC()->m_hDC, LOGPIXELSY), 720); - lf.lfWeight = (fontFlags & PatternFontBold) ? FW_BOLD : FW_NORMAL; - lf.lfItalic = (fontFlags & PatternFontItalic) ? TRUE : FALSE; - mpt::String::Copy(lf.lfFaceName, fontName); + lf.lfWeight = patternFont.flags[FontSetting::Bold] ? FW_BOLD : FW_NORMAL; + lf.lfItalic = patternFont.flags[FontSetting::Italic] ? TRUE : FALSE; + mpt::String::Copy(lf.lfFaceName, patternFont.name); CFontDialog dlg(&lf); dlg.m_cf.hwndOwner = m_hWnd; - if(fontName != PATTERNFONT_SMALL && fontName != PATTERNFONT_LARGE) + if(patternFont.name != PATTERNFONT_SMALL && patternFont.name != PATTERNFONT_LARGE) { dlg.m_cf.lpLogFont = &lf; } @@ -243,18 +243,46 @@ { m_ComboFont.DeleteString(6); } - fontName = dlg.GetFaceName(); - fontSize = dlg.GetSize(); - fontFlags = 0; - if(dlg.IsBold()) fontFlags |= PatternFontBold; - if(dlg.IsItalic()) fontFlags |= PatternFontItalic; - m_ComboFont.AddString(FormatFontName(fontName, fontSize).c_str()); + patternFont.name = dlg.GetFaceName(); + patternFont.size = dlg.GetSize(); + patternFont.flags = FontSetting::None; + if(dlg.IsBold()) patternFont.flags |= FontSetting::Bold; + if(dlg.IsItalic()) patternFont.flags |= FontSetting::Italic; + m_ComboFont.AddString(FormatFontName(patternFont).c_str()); m_ComboFont.SetCurSel(6); OnSettingsChanged(); } } +void COptionsColors::OnChooseCommentFont() +//---------------------------------------- +{ + LOGFONT lf; + MemsetZero(lf); + // Point size to pixels + lf.lfHeight = -MulDiv(commentFont.size, GetDeviceCaps(GetDC()->m_hDC, LOGPIXELSY), 720); + lf.lfWeight = commentFont.flags[FontSetting::Bold] ? FW_BOLD : FW_NORMAL; + lf.lfItalic = commentFont.flags[FontSetting::Italic] ? TRUE : FALSE; + mpt::String::Copy(lf.lfFaceName, commentFont.name); + CFontDialog dlg(&lf); + dlg.m_cf.hwndOwner = m_hWnd; + dlg.m_cf.lpLogFont = &lf; + dlg.m_cf.Flags &= ~CF_EFFECTS; + dlg.m_cf.Flags |= CF_FORCEFONTEXIST | CF_NOSCRIPTSEL; + if(dlg.DoModal() == IDOK) + { + commentFont.name = dlg.GetFaceName(); + commentFont.size = dlg.GetSize(); + commentFont.flags = FontSetting::None; + if(dlg.IsBold()) commentFont.flags |= FontSetting::Bold; + if(dlg.IsItalic()) commentFont.flags |= FontSetting::Italic; + SetDlgItemText(IDC_BUTTON10, FormatFontName(commentFont).c_str()); + OnSettingsChanged(); + } +} + + void COptionsColors::OnDrawItem(int nIdCtl, LPDRAWITEMSTRUCT lpdis) //----------------------------------------------------------------- { @@ -673,7 +701,6 @@ {PATTERN_PLAYNEWNOTE, "Play new notes while recording", "When this option is enabled, notes entered in the pattern editor will always be played (If not checked, notes won't be played in record mode)."}, {PATTERN_PLAYEDITROW, "Play whole row while recording", "When this option is enabled, all notes on the current row are played when entering notes in the pattern editor."}, {PATTERN_CENTERROW, "Always center active row", "Turn on this option to have the active row always centered in the pattern editor."}, - {PATTERN_LARGECOMMENTS, "Use large font for comments", "With this option enabled, the song message editor will use a larger font."}, {PATTERN_HEXDISPLAY, "Display rows in hex", "With this option enabled, row numbers and sequence numbers will be displayed in hexadecimal."}, {PATTERN_WRAP, "Cursor wrap in pattern editor", "When this option is active, going past the end of a pattern row or channel will move the cursor to the beginning. When \"Continuous scroll\"-option is enabled, row wrap is disabled."}, {PATTERN_CREATEBACKUP, "Create backup files (*.bak)", "When this option is active, saving a file will create a backup copy of the original."}, Modified: trunk/OpenMPT/mptrack/Moptions.h =================================================================== --- trunk/OpenMPT/mptrack/Moptions.h 2014-12-30 12:43:32 UTC (rev 4686) +++ trunk/OpenMPT/mptrack/Moptions.h 2014-12-31 00:36:43 UTC (rev 4687) @@ -86,8 +86,7 @@ CButton m_BtnColor1, m_BtnColor2, m_BtnColor3, m_BtnPreview; CStatic m_TxtColor1, m_TxtColor2, m_TxtColor3; MODPLUGDIB *m_pPreviewDib; - std::string fontName; - int32_t fontSize, fontFlags; + FontSetting patternFont, commentFont; public: COptionsColors():CPropertyPage(IDD_OPTIONS_COLORS) { m_nColorItem = 0; m_pPreviewDib = NULL; } @@ -100,7 +99,8 @@ virtual void OnOK(); virtual void DoDataExchange(CDataExchange* pDX); virtual BOOL OnSetActive(); - afx_msg void OnChooseFont(); + afx_msg void OnChoosePatternFont(); + afx_msg void OnChooseCommentFont(); afx_msg void OnUpdateDialog(); afx_msg void OnDrawItem(int nIdCtl, LPDRAWITEMSTRUCT lpdis); afx_msg void OnColorSelChanged(); Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2014-12-30 12:43:32 UTC (rev 4686) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2014-12-31 00:36:43 UTC (rev 4687) @@ -1051,7 +1051,9 @@ if(firstRun) { // On high-DPI devices, automatically upscale pattern font - TrackerSettings::Instance().patternFontSize = Clamp(::GetDeviceCaps(m_pMainWnd->GetDC()->m_hDC, LOGPIXELSX) / 96 - 1, 0, 9); + FontSetting font = TrackerSettings::Instance().patternFont; + font.size = Clamp(::GetDeviceCaps(m_pMainWnd->GetDC()->m_hDC, LOGPIXELSX) / 96 - 1, 0, 9); + TrackerSettings::Instance().patternFont = font; new WelcomeDlg(m_pMainWnd); } Modified: trunk/OpenMPT/mptrack/PatternFont.cpp =================================================================== --- trunk/OpenMPT/mptrack/PatternFont.cpp 2014-12-30 12:43:32 UTC (rev 4686) +++ trunk/OpenMPT/mptrack/PatternFont.cpp 2014-12-31 00:36:43 UTC (rev 4687) @@ -110,19 +110,17 @@ void PatternFont::UpdateFont(CDC *dc) //----------------------------------- { - const std::string name = TrackerSettings::Instance().patternFont; - int32_t fontSize = TrackerSettings::Instance().patternFontSize; - int32_t flags = TrackerSettings::Instance().patternFontFlags; + FontSetting font = TrackerSettings::Instance().patternFont; const PATTERNFONT *builtinFont = nullptr; - if(name == PATTERNFONT_SMALL || name.empty()) + if(font.name == PATTERNFONT_SMALL || font.name.empty()) { builtinFont = &gSmallPatternFont; - } else if(name == PATTERNFONT_LARGE) + } else if(font.name == PATTERNFONT_LARGE) { builtinFont = &gDefaultPatternFont; } - if(builtinFont != nullptr && fontSize < 1) + if(builtinFont != nullptr && font.size < 1) { currentFont = builtinFont; return; @@ -131,16 +129,13 @@ static PATTERNFONT pf = { 0 }; currentFont = &pf; - static std::string previousFont; - static int32_t previousSize, previousFlags; - if(previousFont == name && previousSize == fontSize && previousFlags == flags) + static FontSetting previousFont; + if(previousFont == font) { // Nothing to do return; } - previousFont = name; - previousSize = fontSize; - previousFlags = flags; + previousFont = font; DeleteFontData(); pf.dib = &customFontBitmap; @@ -148,18 +143,18 @@ if(builtinFont != nullptr) { // Copy and scale original 4-bit bitmap - LimitMax(fontSize, 10); - fontSize++; + LimitMax(font.size, 10); + font.size++; MemCopy(customFontBitmap.bmiHeader, CMainFrame::bmpNotes->bmiHeader); - customFontBitmap.bmiHeader.biWidth *= fontSize; - customFontBitmap.bmiHeader.biHeight *= fontSize; + customFontBitmap.bmiHeader.biWidth *= font.size; + customFontBitmap.bmiHeader.biHeight *= font.size; customFontBitmap.bmiHeader.biSizeImage = customFontBitmap.bmiHeader.biWidth * customFontBitmap.bmiHeader.biHeight / 2; customFontBitmap.lpDibBits = new uint8_t[customFontBitmap.bmiHeader.biSizeImage]; // Upscale the image (ugly code ahead) const uint8_t *origPixels = CMainFrame::bmpNotes->lpDibBits; uint8_t *scaledPixels = customFontBitmap.lpDibBits; - const int bytesPerLine = customFontBitmap.bmiHeader.biWidth / 2, scaleBytes = bytesPerLine * fontSize; + const int bytesPerLine = customFontBitmap.bmiHeader.biWidth / 2, scaleBytes = bytesPerLine * font.size; bool outPos = false; for(int y = 0; y < CMainFrame::bmpNotes->bmiHeader.biHeight; y++, scaledPixels += scaleBytes - bytesPerLine) { @@ -174,7 +169,7 @@ pixel &= 0x0F; origPixels++; } - for(int scaleX = 0; scaleX < fontSize; scaleX++) + for(int scaleX = 0; scaleX < font.size; scaleX++) { if(!outPos) { @@ -194,42 +189,42 @@ } } } - pf.nWidth = (builtinFont->nWidth - 4) * fontSize + 4; - pf.nHeight = builtinFont->nHeight * fontSize; - pf.nClrX = builtinFont->nClrX * fontSize; - pf.nClrY = builtinFont->nClrY * fontSize; - pf.nSpaceX = builtinFont->nSpaceX * fontSize; - pf.nSpaceY = builtinFont->nSpaceY * fontSize; + pf.nWidth = (builtinFont->nWidth - 4) * font.size + 4; + pf.nHeight = builtinFont->nHeight * font.size; + pf.nClrX = builtinFont->nClrX * font.size; + pf.nClrY = builtinFont->nClrY * font.size; + pf.nSpaceX = builtinFont->nSpaceX * font.size; + pf.nSpaceY = builtinFont->nSpaceY * font.size; for(size_t i = 0; i < CountOf(pf.nEltWidths); i++) { - pf.nEltWidths[i] = builtinFont->nEltWidths[i] * fontSize; - pf.padding[i] = builtinFont->padding[i] * fontSize; + pf.nEltWidths[i] = builtinFont->nEltWidths[i] * font.size; + pf.padding[i] = builtinFont->padding[i] * font.size; } - pf.nNumX = builtinFont->nNumX * fontSize; - pf.nNumY = builtinFont->nNumY * fontSize; - pf.nNum10X = builtinFont->nNum10X * fontSize; - pf.nNum10Y = builtinFont->nNum10Y * fontSize; - pf.nAlphaAM_X = builtinFont->nAlphaAM_X * fontSize; - pf.nAlphaAM_Y = builtinFont->nAlphaAM_Y * fontSize; - pf.nAlphaNZ_X = builtinFont->nAlphaNZ_X * fontSize; - pf.nAlphaNZ_Y = builtinFont->nAlphaNZ_Y * fontSize; - pf.nNoteX = builtinFont->nNoteX * fontSize; - pf.nNoteY = builtinFont->nNoteY * fontSize; - pf.nNoteWidth = builtinFont->nNoteWidth * fontSize; - pf.nOctaveWidth = builtinFont->nOctaveWidth * fontSize; - pf.nVolX = builtinFont->nVolX * fontSize; - pf.nVolY = builtinFont->nVolY * fontSize; - pf.nVolCmdWidth = builtinFont->nVolCmdWidth * fontSize; - pf.nVolHiWidth = builtinFont->nVolHiWidth * fontSize; - pf.nCmdOfs = builtinFont->nCmdOfs * fontSize; - pf.nParamHiWidth = builtinFont->nParamHiWidth * fontSize; - pf.nInstrOfs = builtinFont->nInstrOfs * fontSize; - pf.nInstr10Ofs = builtinFont->nInstr10Ofs * fontSize; - pf.nInstrHiWidth = builtinFont->nInstrHiWidth * fontSize; - pf.pcParamMargin = builtinFont->pcParamMargin * fontSize; - pf.pcValMargin = builtinFont->pcValMargin * fontSize; - pf.paramLoMargin = builtinFont->paramLoMargin * fontSize; - pf.spacingY = builtinFont->spacingY * fontSize; + pf.nNumX = builtinFont->nNumX * font.size; + pf.nNumY = builtinFont->nNumY * font.size; + pf.nNum10X = builtinFont->nNum10X * font.size; + pf.nNum10Y = builtinFont->nNum10Y * font.size; + pf.nAlphaAM_X = builtinFont->nAlphaAM_X * font.size; + pf.nAlphaAM_Y = builtinFont->nAlphaAM_Y * font.size; + pf.nAlphaNZ_X = builtinFont->nAlphaNZ_X * font.size; + pf.nAlphaNZ_Y = builtinFont->nAlphaNZ_Y * font.size; + pf.nNoteX = builtinFont->nNoteX * font.size; + pf.nNoteY = builtinFont->nNoteY * font.size; + pf.nNoteWidth = builtinFont->nNoteWidth * font.size; + pf.nOctaveWidth = builtinFont->nOctaveWidth * font.size; + pf.nVolX = builtinFont->nVolX * font.size; + pf.nVolY = builtinFont->nVolY * font.size; + pf.nVolCmdWidth = builtinFont->nVolCmdWidth * font.size; + pf.nVolHiWidth = builtinFont->nVolHiWidth * font.size; + pf.nCmdOfs = builtinFont->nCmdOfs * font.size; + pf.nParamHiWidth = builtinFont->nParamHiWidth * font.size; + pf.nInstrOfs = builtinFont->nInstrOfs * font.size; + pf.nInstr10Ofs = builtinFont->nInstr10Ofs * font.size; + pf.nInstrHiWidth = builtinFont->nInstrHiWidth * font.size; + pf.pcParamMargin = builtinFont->pcParamMargin * font.size; + pf.pcValMargin = builtinFont->pcValMargin * font.size; + pf.paramLoMargin = builtinFont->paramLoMargin * font.size; + pf.spacingY = builtinFont->spacingY * font.size; // Create 4-pixel border const int bmWidth2 = pf.dib->bmiHeader.biWidth / 2; @@ -244,14 +239,14 @@ // Create our own font! // Point size to pixels - fontSize = -MulDiv(fontSize, GetDeviceCaps(dc->m_hDC, LOGPIXELSY), 720); + font.size = -MulDiv(font.size, ::GetDeviceCaps(dc->m_hDC, LOGPIXELSY), 720); CDC hDC; hDC.CreateCompatibleDC(dc); - CFont font; - font.CreateFont(fontSize, 0, 0, 0, (flags & PatternFontBold) ? FW_BOLD : FW_NORMAL, (flags & PatternFontItalic) ? TRUE : FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_RASTER_PRECIS, CLIP_DEFAULT_PRECIS, NONANTIALIASED_QUALITY, FIXED_PITCH | FF_DONTCARE, name.c_str()); - CFont *oldFont = hDC.SelectObject(&font); + CFont gdiFont; + gdiFont.CreateFont(font.size, 0, 0, 0, font.flags[FontSetting::Bold] ? FW_BOLD : FW_NORMAL, font.flags[FontSetting::Italic] ? TRUE : FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_RASTER_PRECIS, CLIP_DEFAULT_PRECIS, NONANTIALIASED_QUALITY, FIXED_PITCH | FF_DONTCARE, font.name.c_str()); + CFont *oldFont = hDC.SelectObject(&gdiFont); CPoint pt = hDC.GetTextExtent(_T("W")); const int charWidth = pt.x, charHeight = pt.y; @@ -315,7 +310,7 @@ if(data == nullptr) { hDC.SelectObject(oldFont); - font.DeleteObject(); + gdiFont.DeleteObject(); hDC.DeleteDC(); currentFont = &gDefaultPatternFont; return; @@ -400,7 +395,7 @@ hDC.SelectObject(oldBitmap); hDC.SelectObject(oldFont); - font.DeleteObject(); + gdiFont.DeleteObject(); DeleteBitmap(bitmap); hDC.DeleteDC(); } Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2014-12-30 12:43:32 UTC (rev 4686) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2014-12-31 00:36:43 UTC (rev 4687) @@ -110,7 +110,7 @@ | PATTERN_FLATBUTTONS | PATTERN_NOEXTRALOUD | PATTERN_2NDHIGHLIGHT | PATTERN_STDHIGHLIGHT | PATTERN_SHOWPREVIOUS | PATTERN_CONTSCROLL | PATTERN_SYNCMUTE | PATTERN_AUTODELAY | PATTERN_NOTEFADE - | PATTERN_LARGECOMMENTS | PATTERN_SHOWDEFAULTVOLUME; + | PATTERN_SHOWDEFAULTVOLUME; } @@ -160,6 +160,7 @@ , GUIUpdateInterval(conf, "Display", "GUIUpdateInterval", 0) , VuMeterUpdateInterval(conf, "Display", "VuMeterUpdateInterval", 15) , rememberSongWindows(conf, "Display", "RememberSongWindows", true) + , commentsFont(conf, "Display", "Comments Font", FontSetting("Courier New", 120)) // Misc , ShowSettingsOnNewVersion(conf, "Misc", "ShowSettingsOnNewVersion", true) , gbShowHackControls(conf, "Misc", "ShowHackControls", false) @@ -210,9 +211,7 @@ , gnAutoChordWaitTime(conf, "Pattern Editor", "AutoChordWaitTime", 60) , orderlistMargins(conf, "Pattern Editor", "DefaultSequenceMargins", 0) , rowDisplayOffset(conf, "Pattern Editor", "RowDisplayOffset", 0) - , patternFont(conf, "Pattern Editor", "Font", PATTERNFONT_SMALL) - , patternFontSize(conf, "Pattern Editor", "Font Size", 0) - , patternFontFlags(conf, "Pattern Editor", "Font Flags", 0) + , patternFont(conf, "Pattern Editor", "Font", FontSetting(PATTERNFONT_SMALL, 0)) // Sample Editor , m_SampleUndoBufferSize(conf, "Sample Editor", "UndoBufferSize", SampleUndoBufferSize()) , sampleEditorKeyBehaviour(conf, "Sample Editor", "KeyBehaviour", seNoteOffOnNewKey) @@ -542,13 +541,17 @@ { m_dwPatternSetup &= ~0x10000000; // ditto } - if(storedVersion < MAKE_VERSION_NUMERIC(1,24,01,02)) + if(storedVersion < MAKE_VERSION_NUMERIC(1,24,01,04)) { + if(m_dwPatternSetup & 0x02) + patternFont = FontSetting("Courier New", 120); + else + patternFont = FontSetting("Courier New", 90); if(m_dwPatternSetup & 0x08) - patternFont = PATTERNFONT_SMALL; + patternFont = FontSetting(PATTERNFONT_SMALL, 0); else - patternFont = PATTERNFONT_LARGE; - m_dwPatternSetup &= ~0x08; + patternFont = FontSetting(PATTERNFONT_LARGE, 0); + m_dwPatternSetup &= ~(0x08 | 0x02); } // Effects Modified: trunk/OpenMPT/mptrack/TrackerSettings.h =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.h 2014-12-30 12:43:32 UTC (rev 4686) +++ trunk/OpenMPT/mptrack/TrackerSettings.h 2014-12-31 00:36:43 UTC (rev 4687) @@ -88,7 +88,7 @@ // Feel free to replace the deprecated flags by new flags, but be sure to // update TrackerSettings::TrackerSettings() as well. #define PATTERN_PLAYNEWNOTE 0x01 // play new notes while recording -#define PATTERN_LARGECOMMENTS 0x02 // use large font in comments +//#define PATTERN_LARGECOMMENTS 0x02 // use large font in comments #define PATTERN_STDHIGHLIGHT 0x04 // enable primary highlight (measures) //#define PATTERN_SMALLFONT 0x08 // use small font in pattern editor #define PATTERN_CENTERROW 0x10 // always center active row @@ -319,12 +319,6 @@ SoundDeviceStopModePlaying = 2, }; -enum FontFlags -{ - PatternFontBold = 1, - PatternFontItalic = 2, -}; - template<> inline SettingValue ToSettingValue(const SoundDeviceStopMode &val) { return SettingValue(static_cast<int32>(val)); @@ -334,7 +328,56 @@ return static_cast<SoundDeviceStopMode>(static_cast<int32>(val)); } +struct FontSetting +{ + enum FontFlags + { + None = 0, + Bold = 1, + Italic = 2, + }; + std::string name; + int32_t size; + FlagSet<FontFlags> flags; + + FontSetting(const std::string &name = "", int32_t size = 120, FontFlags flags = None) : name(name), size(size), flags(flags) { } + + bool operator== (const FontSetting &other) const + { + return name == other.name && size == other.size && flags == other.flags; + } + + bool operator!= (const FontSetting &other) const + { + return !(*this == other); + } +}; + +MPT_DECLARE_ENUM(FontSetting::FontFlags) + +template<> inline SettingValue ToSettingValue(const FontSetting &val) +{ + return SettingValue(val.name + "," + mpt::ToString(val.size) + "|" + mpt::ToString(val.flags.GetRaw())); +} +template<> inline FontSetting FromSettingValue(const SettingValue &val) +{ + FontSetting setting(val.as<std::string>()); + size_t sizeStart = setting.name.rfind(','); + if(sizeStart != std::string::npos) + { + setting.size = atoi(&setting.name[sizeStart + 1]); + size_t flagsStart = setting.name.find(' ', sizeStart + 1); + if(flagsStart != std::string::npos) + { + setting.flags = static_cast<FontSetting::FontFlags>(atoi(&setting.name[flagsStart + 1])); + } + setting.name.resize(sizeStart); + } + + return setting; +} + //=================== class TrackerSettings //=================== @@ -376,6 +419,9 @@ Setting<bool> rememberSongWindows; + Setting<FontSetting> commentsFont; + + // Misc Setting<bool> ShowSettingsOnNewVersion; @@ -451,9 +497,7 @@ CachedSetting<UINT> gnAutoChordWaitTime; CachedSetting<int32> orderlistMargins; CachedSetting<int32> rowDisplayOffset; - Setting<std::string> patternFont; - Setting<int32_t> patternFontSize; - Setting<int32_t> patternFontFlags; + Setting<FontSetting> patternFont; // Sample Editor Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2014-12-30 12:43:32 UTC (rev 4686) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2014-12-31 00:36:43 UTC (rev 4687) @@ -3024,6 +3024,11 @@ } else { int vol = m[chn].vol + offset * (coarse ? 10 : 1); + if(m[chn].volcmd == VOLCMD_NONE && m[chn].IsNote() && m[chn].instr) + { + m[chn].volcmd = VOLCMD_VOLUME; + vol = GetDefaultVolume(m[chn]); + } ModCommand::VOL minValue = 0, maxValue = 64; effectInfo.GetVolCmdInfo(effectInfo.GetIndexFromVolCmd(m[chn].volcmd), nullptr, &minValue, &maxValue); Limit(vol, (int)minValue, (int)maxValue); @@ -3056,6 +3061,32 @@ } +// Get the velocity at which a given note would be played +int CViewPattern::GetDefaultVolume(const ModCommand &m) const +//----------------------------------------------------------- +{ + const CSoundFile *pSndFile = GetSoundFile(); + SAMPLEINDEX sample = m.instr; + if(pSndFile->GetNumInstruments()) + { + if(m.instr <= pSndFile->GetNumInstruments() && pSndFile->Instruments[m.instr]) + { + sample = pSndFile->Instruments[m.instr]->Keyboard[m.note - NOTE_MIN]; + } else + { + sample = 0; + } + } + if(sample && sample <= pSndFile->GetNumSamples()) + { + return pSndFile->GetSample(sample).nVolume / 4; + } else + { + return 64; + } +} + + void CViewPattern::OnDropSelection() //---------------------------------- { Modified: trunk/OpenMPT/mptrack/View_pat.h =================================================================== --- trunk/OpenMPT/mptrack/View_pat.h 2014-12-30 12:43:32 UTC (rev 4686) +++ trunk/OpenMPT/mptrack/View_pat.h 2014-12-31 00:36:43 UTC (rev 4687) @@ -20,7 +20,6 @@ class CEditCommand; class CEffectVis; //rewbs.fxvis class CPatternGotoDialog; -struct PATTERNFONT; // Drag & Drop info #define DRAGITEM_VALUEMASK 0x00FFFFFF @@ -316,6 +315,8 @@ void TempEnterFXparam(int v); void EnterAftertouch(int note, int atValue); + int GetDefaultVolume(const ModCommand &m) const; + // Construct a chord from the chord presets. Returns number of notes in chord. int ConstructChord(int note, ModCommand::NOTE (&outNotes)[MPTChord::notesPerChord], ModCommand::NOTE baseNote); Modified: trunk/OpenMPT/mptrack/WelcomeDialog.cpp =================================================================== --- trunk/OpenMPT/mptrack/WelcomeDialog.cpp 2014-12-30 12:43:32 UTC (rev 4686) +++ trunk/OpenMPT/mptrack/WelcomeDialog.cpp 2014-12-31 00:36:43 UTC (rev 4687) @@ -120,7 +120,7 @@ combo->SetItemDataPtr(combo->AddString(_T("FastTracker 2")), "US_mpt-it2_classic"); CheckDlgButton(IDC_CHECK1, BST_CHECKED); - CheckDlgButton(IDC_CHECK2, (TrackerSettings::Instance().patternFont.Get() == PATTERNFONT_LARGE) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(IDC_CHECK2, (TrackerSettings::Instance().patternFont.Get().name == PATTERNFONT_LARGE) ? BST_CHECKED : BST_UNCHECKED); ShowWindow(SW_SHOW); @@ -151,7 +151,11 @@ bool runUpdates = IsDlgButtonChecked(IDC_CHECK1) != BST_UNCHECKED; CUpdateCheck::SetUpdateSettings(0, runUpdates ? 7 : 0, CUpdateCheck::GetUpdateURL(), CUpdateCheck::GetSendGUID(), CUpdateCheck::GetShowUpdateHint()); if(IsDlgButtonChecked(IDC_CHECK2) != BST_UNCHECKED) - TrackerSettings::Instance().patternFont = std::string(PATTERNFONT_LARGE); + { + FontSetting font = TrackerSettings::Instance().patternFont; + font.name = PATTERNFONT_LARGE; + TrackerSettings::Instance().patternFont = font; + } CComboBox *combo = (CComboBox *)GetDlgItem(IDC_COMBO1); const char *keyFile = static_cast<char *>(combo->GetItemDataPtr(combo->GetCurSel())); Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2014-12-30 12:43:32 UTC (rev 4686) +++ trunk/OpenMPT/mptrack/mptrack.rc 2014-12-31 00:36:43 UTC (rev 4687) @@ -738,36 +738,38 @@ CAPTION "Display" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX "",IDC_STATIC,6,6,276,114 + GROUPBOX "",IDC_STATIC,6,6,276,138 LTEXT "Pattern &Font:",IDC_STATIC,18,20,54,8 COMBOBOX IDC_COMBO2,72,18,144,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Custom...",IDC_BUTTON9,222,18,50,12 - CONTROL "&Enable effect highlighting",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,36,114,10 - CONTROL "&Primary highlight",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,54,84,10 - EDITTEXT IDC_PRIMARYHILITE,102,54,24,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Rows per measure (default)",IDC_STATIC,132,56,144,8 - CONTROL "&Secondary highlight",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,72,80,10 - EDITTEXT IDC_SECONDARYHILITE,102,72,24,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Rows per beat (default)",IDC_STATIC,132,74,144,8 - LTEXT "Note: Songs' time signatures will override the default highlight values",IDC_STATIC,18,88,258,8 + LTEXT "Comments f&ont:",IDC_STATIC,18,38,52,8 + PUSHBUTTON "Font",IDC_BUTTON10,72,36,144,12 + CONTROL "&Enable effect highlighting",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,54,114,10 CONTROL "Remember each song's &window positions",IDC_CHECK5, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,102,258,10 - GROUPBOX "Colours",IDC_STATIC,6,126,276,150 - LTEXT "Select &colour for:",IDC_STATIC,18,146,63,8 - COMBOBOX IDC_COMBO1,90,144,114,109,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "",IDC_BUTTON4,"Button",BS_OWNERDRAW | BS_FLAT,89,162,114,43 - LTEXT "Background:",IDC_TEXT1,49,215,60,8 - CONTROL "Colour &1",IDC_BUTTON1,"Button",BS_OWNERDRAW,49,226,51,15 - LTEXT "Foreground:",IDC_TEXT2,122,215,62,8 - CONTROL "Colour &2",IDC_BUTTON2,"Button",BS_OWNERDRAW,122,226,51,15 - LTEXT "Highlight:",IDC_TEXT3,193,215,61,8 - CONTROL "Colour &3",IDC_BUTTON3,"Button",BS_OWNERDRAW,192,226,51,15 - PUSHBUTTON "&Load...",IDC_LOAD_COLORSCHEME,18,252,42,15 - PUSHBUTTON "S&ave...",IDC_SAVE_COLORSCHEME,66,252,42,15 - PUSHBUTTON "&MPT",IDC_BUTTON5,132,252,30,15 - PUSHBUTTON "&Green",IDC_BUTTON7,168,252,30,15 - PUSHBUTTON "&Blue",IDC_BUTTON6,204,252,30,15 - PUSHBUTTON "Bu&zz",IDC_BUTTON8,240,252,30,15 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,72,258,10 + CONTROL "&Primary highlight",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,90,84,10 + EDITTEXT IDC_PRIMARYHILITE,102,90,24,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "Rows per measure (default)",IDC_STATIC,132,92,144,8 + CONTROL "&Secondary highlight",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,108,80,10 + EDITTEXT IDC_SECONDARYHILITE,102,108,24,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "Rows per beat (default)",IDC_STATIC,132,110,144,8 + LTEXT "Note: Songs' time signatures will override the default highlight values",IDC_STATIC,18,124,258,8 + GROUPBOX "Colours",IDC_STATIC,6,150,276,108 + LTEXT "Select &colour for:",IDC_STATIC,18,164,63,8 + COMBOBOX IDC_COMBO1,90,162,114,109,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "",IDC_BUTTON4,"Button",BS_OWNERDRAW | BS_FLAT,18,180,114,43 + LTEXT "C1",IDC_TEXT1,138,183,60,8 + CONTROL "Change &1",IDC_BUTTON1,"Button",BS_OWNERDRAW,204,180,51,12 + LTEXT "C2",IDC_TEXT2,138,198,62,8 + CONTROL "Change &2",IDC_BUTTON2,"Button",BS_OWNERDRAW,204,196,51,12 + LTEXT "C3",IDC_TEXT3,138,212,61,8 + CONTROL "Change &3",IDC_BUTTON3,"Button",BS_OWNERDRAW,204,210,51,12 + PUSHBUTTON "&Load...",IDC_LOAD_COLORSCHEME,18,234,42,15 + PUSHBUTTON "S&ave...",IDC_SAVE_COLORSCHEME,66,234,42,15 + PUSHBUTTON "&MPT",IDC_BUTTON5,132,234,30,15 + PUSHBUTTON "&Green",IDC_BUTTON7,168,234,30,15 + PUSHBUTTON "&Blue",IDC_BUTTON6,204,234,30,15 + PUSHBUTTON "Bu&zz",IDC_BUTTON8,240,234,30,15 END IDD_OPTIONS_MIDI DIALOGEX 0, 0, 286, 269 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |