moar
This commit is contained in:
50
boot_js.ml
50
boot_js.ml
@ -88,46 +88,12 @@ let _ =
|
||||
let open Js_of_ocaml_lwt.Lwt_js_events in
|
||||
let edit_me = Lwd.var ("edit me?", 0) in
|
||||
let root =
|
||||
Lwd_utils.pack Nottui.Ui.pack_y
|
||||
[
|
||||
(* Lwd_utils.pack Nottui.Ui.pack_x
|
||||
[
|
||||
Lwd.pure @@ Nottui_widgets.string "hello daddy";
|
||||
Lwd.pure
|
||||
@@ Nottui_widgets.string
|
||||
"What is going to be displayed here?";
|
||||
];
|
||||
Lwd_utils.pack Nottui.Ui.pack_x
|
||||
[
|
||||
Lwd.pure @@ Nottui_widgets.string "hello daddy";
|
||||
Lwd.pure
|
||||
@@ Nottui_widgets.string
|
||||
"What is going to be displayed here?";
|
||||
];
|
||||
Lwd_utils.pack Nottui.Ui.pack_x
|
||||
[
|
||||
Lwd.pure @@ Nottui_widgets.string "hello";
|
||||
Lwd.pure @@ Nottui_widgets.string "hello";
|
||||
Lwd.pure @@ Nottui_widgets.string "hello";
|
||||
Lwd.pure @@ Nottui_widgets.string "hello";
|
||||
Lwd.pure @@ Nottui_widgets.string "hello";
|
||||
];
|
||||
Lwd_utils.pack Nottui.Ui.pack_x
|
||||
[
|
||||
Lwd.pure @@ Nottui_widgets.string "it ";
|
||||
Lwd.pure @@ Nottui_widgets.string "want ";
|
||||
Lwd.pure @@ Nottui_widgets.string "you ";
|
||||
Lwd.pure @@ Nottui_widgets.string "do ";
|
||||
Lwd.pure @@ Nottui_widgets.string "when ";
|
||||
];
|
||||
Lwd.pure @@ Nottui_widgets.string "when when when when";
|
||||
Lwd.pure @@ Nottui_widgets.string "when when when when";*)
|
||||
Nottui_widgets.edit_field (Lwd.get edit_me)
|
||||
~on_change:(fun ((text, pos) as state) ->
|
||||
Log.debug (fun m -> m "--- on_change (%s,%d)" text pos);
|
||||
Lwd.set edit_me state)
|
||||
~on_submit:ignore;
|
||||
]
|
||||
let open Nottui_widgets in
|
||||
edit_field (Lwd.get edit_me)
|
||||
~on_change:(fun ((text, pos) as state) ->
|
||||
Log.debug (fun m -> m "--- on_change (%s,%d)" text pos);
|
||||
Lwd.set edit_me state)
|
||||
~on_submit:ignore
|
||||
in
|
||||
|
||||
let events, push_event = Lwt_stream.create () in
|
||||
@ -140,7 +106,9 @@ let _ =
|
||||
render_stream canvas webgl_ctx vg
|
||||
(fun vg ?(time = 0.) p i ->
|
||||
Log.debug (fun m ->
|
||||
m "Drawing image: p=%a n=%a" Gg.V2.pp p I.Draw.pp i);
|
||||
m "Drawing image: p=%a n=%a" Gg.V2.pp p
|
||||
(I.Draw.pp ~attr:A.dark)
|
||||
i);
|
||||
let p' = I.Draw.node vg A.dark p i in
|
||||
Logs.debug (fun m ->
|
||||
m "Drawing finished: p'=%a" Gg.V2.pp p'))
|
||||
|
||||
Reference in New Issue
Block a user