Skip to content

Instantly share code, notes, and snippets.

View JoshuaManton's full-sized avatar

Joshua Mark Manton JoshuaManton

View GitHub Profile
@TheSandvichMaker
TheSandvichMaker / minimal-imgui-sortable-hit-testing.md
Last active June 23, 2025 21:00
A minimal solution for hit testing sortable UI widgets in an immediate mode API.

If you've ever watched Casey Muratori's original ImGui video you may be familiar with this approach to hit testing in an immediate mode UI:

void ui_set_next_hot(UI_ID id)
{
    ui->next_hot = id;
}

void ui_end_frame()
{
@thebirk
thebirk / main.odin
Created April 26, 2020 02:12
minny thing
package emulator
import "core:os"
import "core:fmt"
import "core:time"
import "core:math/rand"
when ODIN_OS == "windows" do foreign import libc "system:libcmt.lib";
when ODIN_OS == "linux" do foreign import libc "system:c";
foreign libc {