diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2024-05-30 16:19:33 +0200 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2024-05-30 16:19:33 +0200 |
| commit | 6bbe7d88b8fd93f6c07b7d1ece14af00353526eb (patch) | |
| tree | c691f324842e8fcff8f52754648f769f92faa5d6 | |
| parent | ba8672ad29b8c32afee761d5b00d4014bb591871 (diff) | |
microui: make clipboard optional during init
Clipboard is an optional addition to the microui functionality, but the
init function makes it look like it is required. Additionally, a bunch of
the examples both on the Odin-Lang/examples repo and others are now
"broken".
| -rw-r--r-- | vendor/microui/microui.odin | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vendor/microui/microui.odin b/vendor/microui/microui.odin index cf39e2f55..e545b742b 100644 --- a/vendor/microui/microui.odin +++ b/vendor/microui/microui.odin @@ -319,7 +319,12 @@ default_draw_frame :: proc(ctx: ^Context, rect: Rect, colorid: Color_Type) { } } -init :: proc(ctx: ^Context, set_clipboard: proc(user_data: rawptr, text: string) -> (ok: bool), get_clipboard: proc(user_data: rawptr) -> (text: string, ok: bool), clipboard_user_data: rawptr) { +init :: proc( + ctx: ^Context, + set_clipboard: proc(user_data: rawptr, text: string) -> (ok: bool) = nil, + get_clipboard: proc(user_data: rawptr) -> (text: string, ok: bool) = nil, + clipboard_user_data: rawptr = nil, +) { ctx^ = {} // zero memory ctx.draw_frame = default_draw_frame ctx._style = default_style |