Removed automated event handling #30

Merged
zack merged 1 commits from remove-automated-event-handling into master 2026-06-01 19:58:04 +00:00
3 changed files with 3 additions and 15 deletions
-12
View File
@@ -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)
+1 -1
View File
@@ -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)
}
}
+2 -2
View File
@@ -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)
}