3#include "structure/system/time/spk_timer.hpp"
4#include "structure/widget/spk_text_label.hpp"
36 bool _needsImmediateRefresh =
true;
55 const std::wstring &p_name,
Strongly-typed time span with cached conversions between ns/ms/s.
Definition spk_duration.hpp:15
void setTextProducer(const TextProducer &p_textProducer)
Sets the text producer callback.
Definition spk_dynamic_text_label.cpp:53
void refresh()
Immediately refreshes the label text.
Definition spk_dynamic_text_label.cpp:70
std::function< std::wstring()> TextProducer
Function type used to generate label text.
Definition spk_dynamic_text_label.hpp:27
void setRefreshDuration(const spk::Duration &p_refreshDuration)
Sets the refresh duration.
Definition spk_dynamic_text_label.cpp:64
void _onUpdateEvent(spk::UpdateEvent &p_event) override
Updates the label when the refresh timer ticks.
Definition spk_dynamic_text_label.cpp:24
static const spk::Duration DefaultDuration
Default refresh duration.
Definition spk_dynamic_text_label.hpp:31
DynamicTextLabel(const std::wstring &p_name, spk::Widget *p_parent)
Builds a dynamic text label.
Definition spk_dynamic_text_label.cpp:44
Widget that renders a text region over a nine-slice background.
Definition spk_text_label.hpp:20
Countdown helper tracking elapsed ratio and timeout state.
Definition spk_timer.hpp:24
Carries per-frame update timing and input state snapshot.
Definition spk_update_event.hpp:15