mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-03 17:05:43 +02:00
Implemented blinking icon to highlight a searched field
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user