Skip to content

Commit

Permalink
Engine: WIP mobile support
Browse files Browse the repository at this point in the history
  • Loading branch information
panglesd committed Jan 22, 2025
1 parent 62f88cf commit f9cbe40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/engine/controller.ml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,12 @@ let setup (window : Window.window) =
()
in
let _listener = Brr.Ev.listen Brr.Ev.keydown callback target in
let mobile_callback (ev : Brr.Ev.Pointer.t Brr.Ev.t) =
let type_ = Brr.Ev.Pointer.type' (Brr.Ev.as_type ev) |> Jstr.to_string in
if String.equal "touch" type_ then
let _ : unit Fut.t = Next.go_next window 1 in
()
else ()
in
let _listener = Brr.Ev.listen Brr.Ev.pointerup mobile_callback target in
()
1 change: 0 additions & 1 deletion src/previewer/previewer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ end

type previewer = { stage : int ref; index : int ref; panels : Brr.El.t array }

let string_of_stage stage = string_of_int stage
let ids = [| "p1"; "p2" |]

let create_previewer ?(initial_stage = 0) ?(callback = fun _ -> ()) root =
Expand Down

0 comments on commit f9cbe40

Please sign in to comment.