public tiles_processor(PictureBox _PBoxCHRBank, GroupBox _CHRBankGrpBox, PictureBox _PBoxBlockEditor, PictureBox _PBoxTilePreview, PictureBox _plt_main, PictureBox _plt0, PictureBox _plt1, PictureBox _plt2, PictureBox _plt3, data_sets_manager _data_mngr) { m_palette_grp = new palette_group(_plt_main, _plt0, _plt1, _plt2, _plt3); m_CHR_bank_viewer = new CHR_bank_viewer(_PBoxCHRBank, _CHRBankGrpBox); m_block_editor = new block_editor(_PBoxBlockEditor); m_tile_editor = new tile_editor(_PBoxTilePreview); m_CHR_bank_viewer.subscribe_event(m_block_editor); m_CHR_bank_viewer.subscribe_event(_data_mngr); m_block_editor.subscribe_event(_data_mngr); m_tile_editor.subscribe_event(_data_mngr); m_palette_grp.subscribe_event(_data_mngr); m_CHR_bank_viewer.subscribe_event(m_palette_grp); m_block_editor.subscribe_event(m_CHR_bank_viewer); m_block_editor.subscribe_event(m_tile_editor); m_tile_editor.subscribe_event(m_block_editor); m_CHR_bank_viewer.NeedGFXUpdate += new EventHandler(need_gfx_update_event); m_block_editor.NeedGFXUpdate += new EventHandler(need_gfx_update_event); m_tile_editor.NeedGFXUpdate += new EventHandler(need_gfx_update_event); m_palette_grp.NeedGFXUpdate += new EventHandler(need_gfx_update_event); #if DEF_PALETTE16_PER_CHR m_block_editor.UpdatePaletteListPos += new EventHandler(update_palette_list_pos); #endif m_CHR_bank_viewer.subscribe_event(this); m_block_editor.subscribe_event(this); m_tile_editor.subscribe_event(this); }
public void subscribe_event(CHR_bank_viewer _chr_bank) { _chr_bank.DataChanged += new EventHandler(update_data); _chr_bank.CHRSelected += new EventHandler(CHR_selected); }