Track palette version.
This commit is contained in:
parent
22ceaae4ed
commit
59a7b94ef4
2 changed files with 7 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ constexpr auto kMinContrastDistance = 64 * 64 * 4;
|
||||||
constexpr auto kContrastDeltaL = 64;
|
constexpr auto kContrastDeltaL = 64;
|
||||||
|
|
||||||
auto PaletteChanges = rpl::event_stream<>();
|
auto PaletteChanges = rpl::event_stream<>();
|
||||||
|
auto PaletteVersion = 0;
|
||||||
auto ShortAnimationRunning = rpl::variable<bool>(false);
|
auto ShortAnimationRunning = rpl::variable<bool>(false);
|
||||||
auto RunningShortAnimations = 0;
|
auto RunningShortAnimations = 0;
|
||||||
|
|
||||||
|
|
@ -73,7 +74,12 @@ rpl::producer<> PaletteChanged() {
|
||||||
return internal::PaletteChanges.events();
|
return internal::PaletteChanges.events();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int PaletteVersion() {
|
||||||
|
return internal::PaletteVersion;
|
||||||
|
}
|
||||||
|
|
||||||
void NotifyPaletteChanged() {
|
void NotifyPaletteChanged() {
|
||||||
|
++internal::PaletteVersion;
|
||||||
internal::PaletteChanges.fire({});
|
internal::PaletteChanges.fire({});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ void startManager(int scale);
|
||||||
void stopManager();
|
void stopManager();
|
||||||
|
|
||||||
[[nodiscard]] rpl::producer<> PaletteChanged();
|
[[nodiscard]] rpl::producer<> PaletteChanged();
|
||||||
|
[[nodiscard]] int PaletteVersion();
|
||||||
void NotifyPaletteChanged();
|
void NotifyPaletteChanged();
|
||||||
|
|
||||||
[[nodiscard]] rpl::producer<bool> ShortAnimationPlaying();
|
[[nodiscard]] rpl::producer<bool> ShortAnimationPlaying();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue