add jpg library, export as jpg, export animation frames, add pressure support on mac
This commit is contained in:
@@ -11,20 +11,22 @@ void App::resize(float w, float h)
|
||||
main->update(w , h, zoom);
|
||||
}
|
||||
|
||||
bool App::mouse_down(int button, float x, float y)
|
||||
bool App::mouse_down(int button, float x, float y, float pressure)
|
||||
{
|
||||
MouseEvent e;
|
||||
e.m_type = button ? kEventType::MouseDownR : kEventType::MouseDownL;
|
||||
e.m_pos = { x / zoom, y / zoom };
|
||||
e.m_pressure = pressure;
|
||||
auto ret = layout[main_id]->on_event(&e);
|
||||
layout[main_id]->update();
|
||||
return ret == kEventResult::Consumed;
|
||||
}
|
||||
bool App::mouse_move(float x, float y)
|
||||
bool App::mouse_move(float x, float y, float pressure)
|
||||
{
|
||||
MouseEvent e;
|
||||
e.m_type = kEventType::MouseMove;
|
||||
e.m_pos = { x / zoom, y / zoom };
|
||||
e.m_pressure = pressure;
|
||||
kEventResult ret = kEventResult::Available;
|
||||
if (auto* main = layout[main_id])
|
||||
ret = main->on_event(&e);
|
||||
|
||||
Reference in New Issue
Block a user