diff --git a/main/ac2/ac2.script b/main/ac2/ac2.script index 3d340db..1060c03 100644 --- a/main/ac2/ac2.script +++ b/main/ac2/ac2.script @@ -1,16 +1,15 @@ function init(self) msg.post(".", "acquire_input_focus") - self.scale = (sys.get_config_int("display.high_dpi") == 1) and 2 or 1 end function on_input(self, action_id, action) if not action_id or action_id == hash("touch") then if action.pressed then - rive.pointer_down("#model", action.x * self.scale, action.y * self.scale) + rive.pointer_down("#model", action.x, action.y) elseif action.released then - rive.pointer_up("#model", action.x * self.scale, action.y * self.scale) + rive.pointer_up("#model", action.x, action.y) else - rive.pointer_move("#model", action.x * self.scale, action.y * self.scale) + rive.pointer_move("#model", action.x, action.y) end end end diff --git a/main/circleui/circleui.script b/main/circleui/circleui.script index 3a1fe40..bd2ae35 100644 --- a/main/circleui/circleui.script +++ b/main/circleui/circleui.script @@ -1,16 +1,15 @@ function init(self) msg.post(".", "acquire_input_focus") - self.scale = 1 -- (sys.get_config_int("display.high_dpi") == 1) and 2 or 1 end function on_input(self, action_id, action) if not action_id or action_id == hash("touch") then if action.pressed then - rive.pointer_down("#ui", action.x * self.scale, action.y * self.scale) + rive.pointer_down("#ui", action.x, action.y) elseif action.released then - rive.pointer_up("#ui", action.x * self.scale, action.y * self.scale) + rive.pointer_up("#ui", action.x, action.y) else - rive.pointer_move("#ui", action.x * self.scale, action.y * self.scale) + rive.pointer_move("#ui", action.x, action.y) end end end diff --git a/main/ghost/ghost.script b/main/ghost/ghost.script index b1ff643..bd2ae35 100644 --- a/main/ghost/ghost.script +++ b/main/ghost/ghost.script @@ -1,16 +1,15 @@ function init(self) msg.post(".", "acquire_input_focus") - self.scale = (sys.get_config_int("display.high_dpi") == 1) and 2 or 1 end function on_input(self, action_id, action) if not action_id or action_id == hash("touch") then if action.pressed then - rive.pointer_down("#ui", action.x * self.scale, action.y * self.scale) + rive.pointer_down("#ui", action.x, action.y) elseif action.released then - rive.pointer_up("#ui", action.x * self.scale, action.y * self.scale) + rive.pointer_up("#ui", action.x, action.y) else - rive.pointer_move("#ui", action.x * self.scale, action.y * self.scale) + rive.pointer_move("#ui", action.x, action.y) end end end diff --git a/main/sophiahud/sophiahud.script b/main/sophiahud/sophiahud.script index 6bbb9a4..7eaad88 100644 --- a/main/sophiahud/sophiahud.script +++ b/main/sophiahud/sophiahud.script @@ -1,16 +1,15 @@ function init(self) msg.post(".", "acquire_input_focus") - self.scale = 1 -- (sys.get_config_int("display.high_dpi") == 1) and 2 or 1 end function on_input(self, action_id, action) if not action_id or action_id == hash("touch") then if action.pressed then - rive.pointer_down("#hud", action.x * self.scale, action.y * self.scale) + rive.pointer_down("#hud", action.x, action.y) elseif action.released then - rive.pointer_up("#hud", action.x * self.scale, action.y * self.scale) + rive.pointer_up("#hud", action.x, action.y) else - rive.pointer_move("#hud", action.x * self.scale, action.y * self.scale) + rive.pointer_move("#hud", action.x, action.y) end end end