From 6ec4d6e75a968f8afa0e8199d3494f4224e3500d Mon Sep 17 00:00:00 2001 From: Zachary Levy Date: Mon, 1 Jun 2026 12:51:17 -0700 Subject: [PATCH] Removed automated event handling --- draw/clay.odin | 12 ------------ draw/examples/clay_borders.odin | 2 +- draw/examples/hellope.odin | 4 ++-- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/draw/clay.odin b/draw/clay.odin index e6abf8d..798ef2e 100644 --- a/draw/clay.odin +++ b/draw/clay.odin @@ -730,21 +730,9 @@ flush_deferred_and_close_backdrop_scope :: proc( prepare_clay_batch :: proc( base_layer: ^Layer, batch: ^ClayBatch, - mouse_wheel_delta: [2]f32, - frame_time: f32 = 0, custom_draw: Custom_Draw = nil, temp_allocator := context.temp_allocator, ) { - mouse_pos: [2]f32 - mouse_flags := sdl.GetMouseState(&mouse_pos.x, &mouse_pos.y) - - // Update clay internals - clay.SetPointerState( - clay.Vector2{mouse_pos.x - base_layer.bounds.x, mouse_pos.y - base_layer.bounds.y}, - .LEFT in mouse_flags, - ) - clay.UpdateScrollContainers(true, mouse_wheel_delta, frame_time) - layer := base_layer command_count := int(batch.cmds.length) deferred_indices := make([dynamic]i32, 0, 16, temp_allocator) diff --git a/draw/examples/clay_borders.odin b/draw/examples/clay_borders.odin index 7d210c8..0235470 100644 --- a/draw/examples/clay_borders.odin +++ b/draw/examples/clay_borders.odin @@ -314,7 +314,7 @@ clay_borders :: proc() { bounds = base_layer.bounds, cmds = clay.EndLayout(0), } - draw.prepare_clay_batch(base_layer, &clay_batch, {0, 0}) + draw.prepare_clay_batch(base_layer, &clay_batch) draw.end(gpu, window) } } diff --git a/draw/examples/hellope.odin b/draw/examples/hellope.odin index 27f248f..3af247f 100644 --- a/draw/examples/hellope.odin +++ b/draw/examples/hellope.odin @@ -259,7 +259,7 @@ hellope_clay :: proc() { bounds = base_layer.bounds, cmds = clay.EndLayout(0), } - draw.prepare_clay_batch(base_layer, &clay_batch, {0, 0}) + draw.prepare_clay_batch(base_layer, &clay_batch) draw.end(gpu, window) } } @@ -372,7 +372,7 @@ hellope_custom :: proc() { bounds = base_layer.bounds, cmds = clay.EndLayout(0), } - draw.prepare_clay_batch(base_layer, &clay_batch, {0, 0}, custom_draw = draw_custom) + draw.prepare_clay_batch(base_layer, &clay_batch, custom_draw = draw_custom) draw.end(gpu, window) }