summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2024-03-06 16:29:55 +0100
committerAldrik Ramaekers <aldrikboy@gmail.com>2024-03-06 16:29:55 +0100
commitd20b1bd3c2eef5fd4f692ba0e66d6d3d787853dd (patch)
tree021f35faf7891a1d2948f44219b10504f2bbd508
parent3d0274d1fefc20dab25657490ba6f1723c3f4632 (diff)
help text
-rw-r--r--src/main.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 306564d..bcdcd86 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -15,6 +15,16 @@
bool open_settings_window = false;
bool open_about_window = false;
+char* help_text =
+ "1. Search directory\n"
+ " - The absolute path to the folder to search.\n"
+ "2. File filter\n"
+ " - Filter files that should be included in file search\n"
+ " - Multiple filters can be declared separated by comma ','\n"
+ " - Supports wildcards '*' & '?' in filter\n"
+ "3. Text to search\n"
+ " - Supports wildcards '*' & '?' in text\n";
+
static void _ts_create_popups() {
ImGuiIO& io = ImGui::GetIO();
if (open_settings_window) {
@@ -297,6 +307,7 @@ void ts_create_gui(int window_w, int window_h) {
}
pos_y += textbox_area_height + 7;
+ if (current_search_result)
{ // Results
ImGui::SetNextWindowPos({5, pos_y});
@@ -322,6 +333,12 @@ void ts_create_gui(int window_w, int window_h) {
ImGui::EndTable();
}
}
+ else { // Help text
+ ImGui::Separator();
+ ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 20.0f);
+ ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 20.0f);
+ ImGui::TextWrapped(help_text);
+ }
pos_y += result_area_height;
{ // Statusbar