Changeset 1274

Show
Ignore:
Timestamp:
10/05/07 22:29:44 (11 months ago)
Author:
calvin
Message:

pattern editor theming - added new .col mappings for "PE Text Note" and "PE Text Shade", minor build fixes

Location:
trunk
Files:
12 modified

Legend:

Unmodified
Added
Removed
  • trunk/buzelib-vs.vcproj

    r1273 r1274  
    126126                        </File> 
    127127                        <File 
    128                                 RelativePath=".\src\buzelib\DragDropImpl.cpp"> 
    129                         </File> 
    130                         <File 
    131128                                RelativePath=".\src\buzelib\EditorActions.cpp"> 
    132129                        </File> 
     
    135132                        </File> 
    136133                        <File 
    137                                 RelativePath=".\src\buzelib\Fft.cpp"> 
    138                         </File> 
    139                         <File 
    140134                                RelativePath=".\src\buzelib\FileBrowserList.cpp"> 
    141135                        </File> 
     
    154148                        <File 
    155149                                RelativePath=".\src\buzelib\MachineFolderView.cpp"> 
    156                         </File> 
    157                         <File 
    158                                 RelativePath=".\src\buzelib\MachineIndex.cpp"> 
    159150                        </File> 
    160151                        <File 
  • trunk/src/buzelib/BuzeConfiguration.cpp

    r1255 r1274  
    11#include "stdafx.h" 
    22#include "BuzeConfiguration.h" 
    3 #include "utils.h" 
     3#include "Utils/utils.h" 
    44 
    55using namespace std; 
  • trunk/src/buzelib/MachineParameterView.cpp

    r1273 r1274  
    135135 
    136136        zzub::metaplugin* plugin = machine; 
    137 /*      if (plugin->getType() != plugin_type_generator) { 
     137        if ((plugin->getFlags() & PLUGIN_FLAGS_MASK) != GENERATOR_PLUGIN_FLAGS) { 
    138138                plugin = document->getSelectedMachine(0); 
    139                 if (!plugin || plugin->getType() != plugin_type_generator) return 0; 
    140         } 
    141 */ 
     139                if (!plugin || ((plugin->getFlags() & PLUGIN_FLAGS_MASK) != GENERATOR_PLUGIN_FLAGS)) return 0; 
     140        } 
     141 
    142142        if (document->isNotePlaying(plugin, note)) return 0; 
    143143 
     
    151151 
    152152        zzub::metaplugin* plugin = machine; 
    153 /*      if (plugin->getType() != plugin_type_generator) { 
     153        if ((plugin->getFlags() & PLUGIN_FLAGS_MASK) != GENERATOR_PLUGIN_FLAGS) { 
    154154                plugin = document->getSelectedMachine(0); 
    155                 if (!plugin || plugin->getType() != plugin_type_generator) return 0; 
    156         } 
    157 */ 
     155                if (!plugin || ((plugin->getFlags() & PLUGIN_FLAGS_MASK) != GENERATOR_PLUGIN_FLAGS)) return 0; 
     156        } 
     157 
    158158        document->playMachineNote(plugin, zzub::note_value_off, note); 
    159159        return 0; 
  • trunk/src/buzelib/MainFrm.cpp

    r1273 r1274  
    26412641        { "PE Sel BG", RGB(0xF7, 0xF7, 0xF4) },  
    26422642        { "PE Text", RGB(0x30, 0x30, 0x21) },  
     2643        { "PE Text Note", RGB(0x20, 0x20, 0x80) },  
     2644        { "PE Text Shade", RGB(0x68, 0x68, 0x68) },  
    26432645        { "SA Amp BG", RGB(0x70, 0x80, 0x90) },  
    26442646        { "SA Amp Line", RGB(0x00, 0xC8, 0x00) },  
  • trunk/src/buzelib/PatternEditor/PatternEditorControl.cpp

    r1268 r1274  
    1212LRESULT CPatternEditorControl::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { 
    1313        editor.Create(m_hWnd, rcDefault, "", WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL); 
    14  
    15         //editor.SetThemeColor(PE_BG, RGB(0xDA, 0xD6, 0xC9)); 
    16         //editor.SetThemeColor(PE_Text, RGB(0, 0, 0)); 
    17         //editor.SetThemeColor(PE_BG_Dark, RGB(0xBD, 0xB5, 0x9F)); 
    18         //editor.SetThemeColor(PE_BG_VeryDark, RGB(0x9F, 0x93, 0x73)); 
    19         //editor.SetThemeColor(PE_Sel_BG, RGB(0xFF, 0xFF, 0xFF)); 
    20         //editor.SetHighlightRows(12, 3); 
    21         //editor.SetSkip(4); 
    22  
    2314        return 0; 
    2415} 
     
    3930        int screenrows = editor.rcClient.bottom / editor.font_size.cy; 
    4031 
    41         COLORREF bgcolor = RGB(0xDA, 0xD6, 0xC9); 
     32        COLORREF bgcolor = editor.colors[PE_BG]; 
    4233        screenDC.SelectFont(editor.track_font); 
    4334        screenDC.SetBkColor(bgcolor); 
  • trunk/src/buzelib/PatternEditor/PatternEditorControl.h

    r1268 r1274  
    9494        void SetFont(HFONT hFont, bool bRedraw = 1); 
    9595        void UpdatePlayPosition(int pos); 
     96        void SetThemeColor(theme_index index, COLORREF color) { editor.SetThemeColor(index, color); } 
     97 
    9698}; 
  • trunk/src/buzelib/PatternView.cpp

    r1273 r1274  
    202202        setPatternEditorFont(); 
    203203 
     204        bindTheme(); 
    204205        bindPatternEditor(); 
    205206 
     
    519520                        break; 
    520521                case UpdateTheme: 
    521                         patternEditor.UpdateWindow(); 
     522                        bindTheme(); 
    522523                        break; 
    523524                case UpdatePatternSelection: 
     
    17811782                } 
    17821783        } 
    1783  
    1784  
    1785 } 
     1784} 
     1785 
     1786void CPatternView::bindTheme() { 
     1787        patternEditor.SetThemeColor(PE_BG, mainFrame->getThemeColor("PE BG")); 
     1788        patternEditor.SetThemeColor(PE_BG_Dark, mainFrame->getThemeColor("PE BG Dark")); 
     1789        patternEditor.SetThemeColor(PE_BG_VeryDark, mainFrame->getThemeColor("PE BG Very Dark")); 
     1790        patternEditor.SetThemeColor(PE_Sel_BG, mainFrame->getThemeColor("PE Sel BG")); 
     1791        patternEditor.SetThemeColor(PE_TextValue, mainFrame->getThemeColor("PE Text")); 
     1792        patternEditor.SetThemeColor(PE_TextNote, mainFrame->getThemeColor("PE Text Note")); 
     1793        patternEditor.SetThemeColor(PE_TextShade, mainFrame->getThemeColor("PE Text Shade")); 
     1794        patternEditor.SetThemeColor(PE_BG_Dark, mainFrame->getThemeColor("PE BG Dark")); 
     1795        patternEditor.Invalidate(); 
     1796        patternEditor.editor.Invalidate(FALSE); 
     1797} 
  • trunk/src/buzelib/PatternView.h

    r1273 r1274  
    318318    void bindStatus(); 
    319319    void bindToolbar(); 
     320        void bindTheme(); 
    320321 
    321322        void deletePatternSelection(); 
  • trunk/src/buzelib/Preferences/MidiInputPreferencesView.cpp

    r1273 r1274  
    88#include "MainFrm.h" 
    99#include "MidiInputPreferencesView.h" 
    10 #include "utils.h" 
     10#include "../Utils/utils.h" 
    1111 
    1212using namespace std; 
  • trunk/src/buzelib/Preferences/MidiOutputPreferencesView.cpp

    r1273 r1274  
    88#include "MainFrm.h" 
    99#include "MidiOutputPreferencesView.h" 
    10 #include "utils.h" 
     10#include "../Utils/utils.h" 
    1111 
    1212using namespace std; 
  • trunk/src/buzelib/Preferences/PreferencesDialog.cpp

    r1273 r1274  
    1212#include "PreferencesDialog.h" 
    1313 
    14 #include "utils.h" 
     14#include "../Utils/utils.h" 
    1515 
    1616using namespace std; 
  • trunk/src/buzelib/PresetDialog.cpp

    r1264 r1274  
    22#include "resource.h" 
    33#include "PresetDialog.h" 
    4 #include "PresetManager.h" 
    5 #include "utils.h" 
     4#include "Utils/PresetManager.h" 
     5#include "Utils/utils.h" 
    66 
    77CPresetDialog::CPresetDialog(PresetManager* prs, zzub::metaplugin* plug) {