mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-12-18 09:12:22 -05:00
Remove message_map from Context.
It doesn't belong in a display/rendering context object, it has much broader significance, mostly distributing messages via the M4->M0 IPC mechanism.
This commit is contained in:
parent
d380ffe52b
commit
9cab3c9978
12 changed files with 45 additions and 35 deletions
|
|
@ -21,12 +21,14 @@
|
|||
|
||||
#include "ui_channel.hpp"
|
||||
|
||||
#include "event_m0.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace ui {
|
||||
|
||||
void Channel::on_show() {
|
||||
context().message_map().register_handler(Message::ID::ChannelStatistics,
|
||||
EventDispatcher::message_map().register_handler(Message::ID::ChannelStatistics,
|
||||
[this](const Message* const p) {
|
||||
this->on_statistics_update(static_cast<const ChannelStatisticsMessage*>(p)->statistics);
|
||||
}
|
||||
|
|
@ -34,7 +36,7 @@ void Channel::on_show() {
|
|||
}
|
||||
|
||||
void Channel::on_hide() {
|
||||
context().message_map().unregister_handler(Message::ID::ChannelStatistics);
|
||||
EventDispatcher::message_map().unregister_handler(Message::ID::ChannelStatistics);
|
||||
}
|
||||
|
||||
void Channel::paint(Painter& painter) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue