Add PaletteView::IndexChange signal (to replace SIGNAL_PALETTE_EDITOR_CHANGE).

This commit is contained in:
David Capello 2011-02-19 22:40:46 -03:00
parent d72909e130
commit e309656737
2 changed files with 7 additions and 0 deletions

View File

@ -533,7 +533,10 @@ bool PaletteView::onProcessMessage(JMessage msg)
update_scroll(c); update_scroll(c);
// Emit signals
jwidget_emit_signal(this, SIGNAL_PALETTE_EDITOR_CHANGE); jwidget_emit_signal(this, SIGNAL_PALETTE_EDITOR_CHANGE);
IndexChange(c);
c = 256; c = 256;
break; break;
} }

View File

@ -21,6 +21,7 @@
#include <allegro/color.h> #include <allegro/color.h>
#include "base/signal.h"
#include "gui/widget.h" #include "gui/widget.h"
// TODO use some JI_SIGNAL_USER // TODO use some JI_SIGNAL_USER
@ -52,6 +53,9 @@ public:
int get2ndColor(); int get2ndColor();
void getSelectedEntries(bool array[256]); void getSelectedEntries(bool array[256]);
// Signals
Signal1<void, int> IndexChange;
protected: protected:
bool onProcessMessage(JMessage msg); bool onProcessMessage(JMessage msg);