Enable penPaintingOnly flag for touch ui

This commit is contained in:
luboslenco
2022-12-14 15:34:39 +01:00
parent db5a1e69f4
commit 5ca4431040
2 changed files with 7 additions and 10 deletions
-2
View File
@@ -279,9 +279,7 @@ class Context {
public static var maximizedSidebarWidth = 0;
public static var cameraControls = ControlsOrbit;
public static var dragDestination = 0;
#if (krom_android || krom_ios)
public static var penPaintingOnly = false; // Reject painting with finger when using pen
#end
public static function selectMaterial(i: Int) {
if (Project.materials.length <= i) return;
+7 -8
View File
@@ -631,15 +631,14 @@ class UISidebar {
Operator.shortcut(Config.keymap.brush_ruler + "+" + Config.keymap.action_paint, ShortcutDown) ||
(Input.getPen().down() && !kb.down("alt"));
#if (krom_android || krom_ios)
if (Input.getPen().down()) {
Context.penPaintingOnly = true;
if (Config.raw.touch_ui) {
if (Input.getPen().down()) {
Context.penPaintingOnly = true;
}
else if (Context.penPaintingOnly) {
down = false;
}
}
else if (Context.penPaintingOnly) {
down = false;
}
#end
#if arm_physics
if (Context.tool == ToolParticle && Context.particlePhysics) {