summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 4520d9c..4365f2a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -500,7 +500,25 @@ void ts_create_gui(int window_w, int window_h) {
}
pos_y += textbox_area_height + 7;
- if (current_search_result)
+ if (dragdrop_data.did_drop) {
+ printf("Do loading..\n");
+ dragdrop_data.did_drop = false;
+ }
+
+ if (dragdrop_data.is_dragging_file)
+ {
+ if (ImGui::BeginDragDropSource(ImGuiDragDropFlags_SourceExtern)) // we use an external source (i.e. not ImGui-created)
+ {
+ ImGui::SetDragDropPayload("FILES", nullptr, 0);
+ ImGui::BeginTooltip();
+ ImGui::Text("Drop to load file");
+ ImGui::EndTooltip();
+ ImGui::EndDragDropSource();
+ }
+
+ ImGui::Text("Drag test");
+ }
+ else if (current_search_result)
{ // Results
ImGui::SetNextWindowPos({5, pos_y});