From 470eeff5bd98207c463aeec308de6046bf3f6ac9 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Wed, 13 Mar 2024 21:23:02 +0100 Subject: drag drop ui --- src/image.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/image.cpp') diff --git a/src/image.cpp b/src/image.cpp index 1203df2..238232e 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -8,6 +8,7 @@ ts_image img_logo; ts_image img_search; ts_image img_folder; +ts_image img_drop; // Simple helper function to load an image into a OpenGL texture with common settings static bool _ts_load_texture(unsigned char* data, size_t size, GLuint* out_texture, int* out_width, int* out_height) @@ -66,6 +67,10 @@ void ts_load_images() { data = (unsigned char *)_binary_misc_folder_png_start; img_folder = _ts_load_image(data, size); + size = _binary_misc_drop_png_end - _binary_misc_drop_png_start; + data = (unsigned char *)_binary_misc_drop_png_start; + img_drop = _ts_load_image(data, size); + ifd::FileDialog::Instance().CreateTexture = [](uint8_t* data, int w, int h, char fmt) -> void* { GLuint tex; -- cgit v1.2.3-70-g09d2