mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Move Painter into EventDispatcher.
This commit is contained in:
parent
d64344a84f
commit
479a96fc22
@ -62,10 +62,9 @@ Thread* EventDispatcher::thread_event_loop = nullptr;
|
|||||||
|
|
||||||
EventDispatcher::EventDispatcher(
|
EventDispatcher::EventDispatcher(
|
||||||
ui::Widget* const top_widget,
|
ui::Widget* const top_widget,
|
||||||
ui::Painter& painter,
|
|
||||||
ui::Context& context
|
ui::Context& context
|
||||||
) : top_widget { top_widget },
|
) : top_widget { top_widget },
|
||||||
painter(painter),
|
painter { },
|
||||||
context(context)
|
context(context)
|
||||||
{
|
{
|
||||||
init_message_queues();
|
init_message_queues();
|
||||||
|
@ -50,7 +50,6 @@ class EventDispatcher {
|
|||||||
public:
|
public:
|
||||||
EventDispatcher(
|
EventDispatcher(
|
||||||
ui::Widget* const top_widget,
|
ui::Widget* const top_widget,
|
||||||
ui::Painter& painter,
|
|
||||||
ui::Context& context
|
ui::Context& context
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -87,7 +86,7 @@ private:
|
|||||||
|
|
||||||
touch::Manager touch_manager;
|
touch::Manager touch_manager;
|
||||||
ui::Widget* const top_widget;
|
ui::Widget* const top_widget;
|
||||||
ui::Painter& painter;
|
ui::Painter painter;
|
||||||
ui::Context& context;
|
ui::Context& context;
|
||||||
uint32_t encoder_last = 0;
|
uint32_t encoder_last = 0;
|
||||||
bool is_running = true;
|
bool is_running = true;
|
||||||
|
@ -57,9 +57,8 @@ static void event_loop() {
|
|||||||
context,
|
context,
|
||||||
portapack::display.screen_rect()
|
portapack::display.screen_rect()
|
||||||
};
|
};
|
||||||
ui::Painter painter;
|
|
||||||
|
|
||||||
EventDispatcher event_dispatcher { &system_view, painter, context };
|
EventDispatcher event_dispatcher { &system_view, context };
|
||||||
|
|
||||||
MessageHandlerRegistration message_handler_shutdown {
|
MessageHandlerRegistration message_handler_shutdown {
|
||||||
Message::ID::Shutdown,
|
Message::ID::Shutdown,
|
||||||
|
Loading…
Reference in New Issue
Block a user