Use platform windows for windowing instead of custom draggable window system
This commit is contained in:
20
src/ui/ui_piano.h
Normal file
20
src/ui/ui_piano.h
Normal 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);
|
||||
Reference in New Issue
Block a user