Use platform windows for windowing instead of custom draggable window system

This commit is contained in:
2026-03-05 11:44:23 -05:00
parent b75cb920eb
commit 5eaae4deb9
15 changed files with 833 additions and 742 deletions

20
src/ui/ui_piano.h Normal file
View File

@@ -0,0 +1,20 @@
#pragma once
#include "ui/ui_core.h"
#include "midi/midi.h"
#define PIANO_FIRST_NOTE 21 // A0
#define PIANO_LAST_NOTE 108 // C8
struct UI_PianoState {
S32 mouse_note; // MIDI note held by mouse click (-1 = none)
};
B32 piano_is_black_key(S32 note);
Clay_Color piano_velocity_color(S32 velocity);
// Render the 88-key piano widget.
// avail_w: total width for key layout, avail_h: total height for keys
void ui_piano(UI_PianoState *state, MidiEngine *midi, F32 avail_w, F32 avail_h);
// Update piano mouse input (call after Clay layout is computed)
void ui_piano_update_input(UI_PianoState *state);