Implemented blinking icon to highlight a searched field

This commit is contained in:
YuSanka 2020-04-07 12:09:58 +02:00
parent 2317437ede
commit 752083cbe6
6 changed files with 59 additions and 18 deletions

View file

@ -224,6 +224,34 @@ protected:
bool m_completed { false };
ConfigOptionMode m_mode = comExpert; // to correct first Tab update_visibility() set mode to Expert
wxTimer m_highlighting_timer;
struct {
Field* field {nullptr};
int blink_counter {0};
void init(Field* f)
{
field = f;
field->activate_attention_bmp();
}
void invalidate()
{
field->invalidate_attention_bmp();
field = nullptr;
blink_counter = 0;
}
bool blink()
{
field->blink_attention_bmp();
if ((++blink_counter) == 5)
invalidate();
return blink_counter != 0;
}
} m_highlighter;
public:
PresetBundle* m_preset_bundle;
bool m_show_btn_incompatible_presets = false;