03-18-2023, 12:54 PM
(This post was last modified: 03-18-2023, 01:52 PM by Rick Johnson.)
This may not be the best approach, but it works. In my Preferences class, I define the timer
this->startupMsgTimer = hdi::core::Timer("startupMsgTimer", 60, HDI_CORE_CALLBACK(myPrefs, this, showDelayedMessages));
HDI_CORE_PLUGIN->dispatcher()->registerTimer(this->startupMsgTimer);
Startup messages are queued in a string vector, and shown in hdi::core::alert::message() when showDelayedMessages is called. The timer is also deactivated so it won't run again.
Of course, I unregister and destroy the timer at shutdown.
I hope this is useful to someone.
this->startupMsgTimer = hdi::core::Timer("startupMsgTimer", 60, HDI_CORE_CALLBACK(myPrefs, this, showDelayedMessages));
HDI_CORE_PLUGIN->dispatcher()->registerTimer(this->startupMsgTimer);
Startup messages are queued in a string vector, and shown in hdi::core::alert::message() when showDelayedMessages is called. The timer is also deactivated so it won't run again.
Of course, I unregister and destroy the timer at shutdown.
I hope this is useful to someone.