update osx, ios and android projects with the new eraser flag on mouse events
This commit is contained in:
@@ -292,7 +292,7 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
|
||||
auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
std::lock_guard<std::mutex> lock(task_mutex);
|
||||
tasklist.emplace_back([mouseLoc,p=theEvent.pressure] {
|
||||
App::I.mouse_down(0, mouseLoc.x, App::I.height - mouseLoc.y - 1, p, kEventSource::Mouse);
|
||||
App::I.mouse_down(0, mouseLoc.x, App::I.height - mouseLoc.y - 1, p, kEventSource::Mouse, 0);
|
||||
});
|
||||
}
|
||||
- (void)rightMouseDown:(NSEvent *)theEvent
|
||||
@@ -300,7 +300,7 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
|
||||
auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
std::lock_guard<std::mutex> lock(task_mutex);
|
||||
tasklist.emplace_back([mouseLoc,p=theEvent.pressure] {
|
||||
App::I.mouse_down(1, mouseLoc.x, App::I.height - mouseLoc.y - 1, p, kEventSource::Mouse);
|
||||
App::I.mouse_down(1, mouseLoc.x, App::I.height - mouseLoc.y - 1, p, kEventSource::Mouse, 0);
|
||||
});
|
||||
}
|
||||
- (void)mouseUp:(NSEvent *)theEvent
|
||||
@@ -308,7 +308,7 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
|
||||
auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
std::lock_guard<std::mutex> lock(task_mutex);
|
||||
tasklist.emplace_back([mouseLoc] {
|
||||
App::I.mouse_up(0, mouseLoc.x, App::I.height - mouseLoc.y - 1, kEventSource::Mouse);
|
||||
App::I.mouse_up(0, mouseLoc.x, App::I.height - mouseLoc.y - 1, kEventSource::Mouse, 0);
|
||||
});
|
||||
}
|
||||
- (void)rightMouseUp:(NSEvent *)theEvent
|
||||
@@ -316,7 +316,7 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
|
||||
auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
std::lock_guard<std::mutex> lock(task_mutex);
|
||||
tasklist.emplace_back([mouseLoc] {
|
||||
App::I.mouse_up(1, mouseLoc.x, App::I.height - mouseLoc.y - 1, kEventSource::Mouse);
|
||||
App::I.mouse_up(1, mouseLoc.x, App::I.height - mouseLoc.y - 1, kEventSource::Mouse, 0);
|
||||
});
|
||||
}
|
||||
- (void)mouseMoved:(NSEvent *)theEvent
|
||||
@@ -324,7 +324,7 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
|
||||
auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
std::lock_guard<std::mutex> lock(task_mutex);
|
||||
tasklist.emplace_back([mouseLoc,p=theEvent.pressure] {
|
||||
App::I.mouse_move(mouseLoc.x, App::I.height - mouseLoc.y - 1, p, kEventSource::Mouse);
|
||||
App::I.mouse_move(mouseLoc.x, App::I.height - mouseLoc.y - 1, p, kEventSource::Mouse, 0);
|
||||
});
|
||||
}
|
||||
-(void)mouseDragged:(NSEvent *)theEvent
|
||||
@@ -332,7 +332,7 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
|
||||
auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
std::lock_guard<std::mutex> lock(task_mutex);
|
||||
tasklist.emplace_back([mouseLoc,p=theEvent.pressure] {
|
||||
App::I.mouse_move(mouseLoc.x, App::I.height - mouseLoc.y - 1, p, kEventSource::Mouse);
|
||||
App::I.mouse_move(mouseLoc.x, App::I.height - mouseLoc.y - 1, p, kEventSource::Mouse, 0);
|
||||
});
|
||||
}
|
||||
- (void)rightMouseDragged:(NSEvent *)theEvent
|
||||
@@ -340,7 +340,7 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
|
||||
auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
std::lock_guard<std::mutex> lock(task_mutex);
|
||||
tasklist.emplace_back([mouseLoc,p=theEvent.pressure] {
|
||||
App::I.mouse_move(mouseLoc.x, App::I.height - mouseLoc.y - 1, p, kEventSource::Mouse);
|
||||
App::I.mouse_move(mouseLoc.x, App::I.height - mouseLoc.y - 1, p, kEventSource::Mouse, 0);
|
||||
});
|
||||
}
|
||||
- (void)scrollWheel:(NSEvent *)theEvent
|
||||
|
||||
@@ -223,7 +223,7 @@ std::set<UITouch*> ignored_touch;
|
||||
|
||||
std::lock_guard<std::mutex> lock(task_mutex);
|
||||
tasklist.emplace_back([touchLocation, scale, f=touch.force, source] {
|
||||
App::I.mouse_down(0, touchLocation.x * scale, touchLocation.y * scale, f, source);
|
||||
App::I.mouse_down(0, touchLocation.x * scale, touchLocation.y * scale, f, source, 0);
|
||||
});
|
||||
t_count = 1;
|
||||
t_pos = {touchLocation.x * scale, touchLocation.y * scale};
|
||||
@@ -270,9 +270,9 @@ std::set<UITouch*> ignored_touch;
|
||||
std::lock_guard<std::mutex> lock(task_mutex);
|
||||
tasklist.emplace_back([tt0=t0.type,tt1=t1.type,p0,p1,f0=t0.force,f1=t1.force] {
|
||||
if (tt0 == UITouchType::UITouchTypeStylus)
|
||||
App::I.mouse_move(p0.x, p0.y, f0, kEventSource::Stylus);
|
||||
App::I.mouse_move(p0.x, p0.y, f0, kEventSource::Stylus, 0);
|
||||
if (tt1 == UITouchType::UITouchTypeStylus)
|
||||
App::I.mouse_move(p1.x, p1.y, f1, kEventSource::Stylus);
|
||||
App::I.mouse_move(p1.x, p1.y, f1, kEventSource::Stylus, 0);
|
||||
});
|
||||
}
|
||||
else if (n == 2)
|
||||
@@ -306,7 +306,7 @@ std::set<UITouch*> ignored_touch;
|
||||
kEventSource source = touch.type == UITouchType::UITouchTypeStylus ? kEventSource::Stylus : kEventSource::Touch;
|
||||
std::lock_guard<std::mutex> lock(task_mutex);
|
||||
tasklist.emplace_back([touchLocation, scale, source, force] {
|
||||
App::I.mouse_move(touchLocation.x * scale, touchLocation.y * scale, force, source);
|
||||
App::I.mouse_move(touchLocation.x * scale, touchLocation.y * scale, force, source, 0);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -332,7 +332,7 @@ std::set<UITouch*> ignored_touch;
|
||||
if (tc == 2)
|
||||
App::I.gesture_end();
|
||||
else
|
||||
App::I.mouse_up(0, touchLocation.x * scale, touchLocation.y * scale, source);
|
||||
App::I.mouse_up(0, touchLocation.x * scale, touchLocation.y * scale, source, 0);
|
||||
});
|
||||
|
||||
t_count = 0;
|
||||
|
||||
@@ -151,6 +151,7 @@ task generateVersioning(type: Exec) {
|
||||
copyFiles.dependsOn(generateVersioning)
|
||||
|
||||
task generateJavaH(type: Exec) {
|
||||
ignoreExitValue true
|
||||
workingDir "$projectDir"
|
||||
commandLine 'javah', "-jni", "-force", "-cp", "$classpath", "-d", "$outpath", "$activity"
|
||||
}
|
||||
|
||||
@@ -748,7 +748,7 @@ static int32_t engine_handle_input(struct android_app* app, AInputEvent* event)
|
||||
float pressure = AMotionEvent_getPressure(event, 0);
|
||||
kEventSource source = tool_type == AMOTION_EVENT_TOOL_TYPE_STYLUS ?
|
||||
kEventSource::Stylus : kEventSource::Touch;
|
||||
App::I.mouse_down(0, x, y, pressure, source);
|
||||
App::I.mouse_down(0, x, y, pressure, source, 0);
|
||||
tracked = 1;
|
||||
//LOG("first down");
|
||||
return 1;
|
||||
@@ -784,7 +784,7 @@ static int32_t engine_handle_input(struct android_app* app, AInputEvent* event)
|
||||
kEventSource source = tool_type == AMOTION_EVENT_TOOL_TYPE_STYLUS ?
|
||||
kEventSource::Stylus : kEventSource::Touch;
|
||||
if (tracked == 1)
|
||||
App::I.mouse_up(0, x, y, source);
|
||||
App::I.mouse_up(0, x, y, source, 0);
|
||||
tracked = 0;
|
||||
//LOG("first up");
|
||||
return 1;
|
||||
@@ -801,7 +801,7 @@ static int32_t engine_handle_input(struct android_app* app, AInputEvent* event)
|
||||
{
|
||||
float y = AMotionEvent_getY(event, 0);
|
||||
float x = AMotionEvent_getX(event, 0);
|
||||
App::I.mouse_move(x, y, 0, kEventSource::Stylus);
|
||||
App::I.mouse_move(x, y, 0, kEventSource::Stylus, 0);
|
||||
//LOG("single move");
|
||||
return 1;
|
||||
}
|
||||
@@ -814,7 +814,7 @@ static int32_t engine_handle_input(struct android_app* app, AInputEvent* event)
|
||||
float pressure = AMotionEvent_getPressure(event, 0);
|
||||
kEventSource source = tool_type == AMOTION_EVENT_TOOL_TYPE_STYLUS ?
|
||||
kEventSource::Stylus : kEventSource::Touch;
|
||||
App::I.mouse_move(x, y, pressure, source);
|
||||
App::I.mouse_move(x, y, pressure, source, 0);
|
||||
//LOG("single move");
|
||||
}
|
||||
else if (count == 2)
|
||||
|
||||
@@ -114,7 +114,7 @@ void NodeDialogBrowse::clear_list()
|
||||
{
|
||||
for (auto& n : container->m_children)
|
||||
{
|
||||
if (auto item = std::dynamic_pointer_cast<NodeDialogBrowseItem>(n))
|
||||
if (auto item = std::static_pointer_cast<NodeDialogBrowseItem>(n))
|
||||
item->m_thumb->tex.destroy();
|
||||
}
|
||||
container->remove_all_children();
|
||||
|
||||
Reference in New Issue
Block a user