From e0522608a457931dc10d42ffb2992e78592ff3bc Mon Sep 17 00:00:00 2001 From: Bruno Herbelin Date: Tue, 4 Jan 2022 00:54:12 +0100 Subject: [PATCH] UI improvement; hovering icons indicate possible action Source filters icons without button. Unified lock icon with view. Updated help. --- ImGuiToolkit.cpp | 61 ++++++++++++++++++++++++--------------- ImGuiToolkit.h | 5 ++-- ImGuiVisitor.cpp | 32 ++++++++++---------- TextureView.cpp | 22 +++++++------- UserInterfaceManager.cpp | 54 +++++++++++++++++----------------- rsc/images/icons.dds | Bin 1638528 -> 1638528 bytes 6 files changed, 95 insertions(+), 79 deletions(-) diff --git a/ImGuiToolkit.cpp b/ImGuiToolkit.cpp index 943d4f0..d08c504 100644 --- a/ImGuiToolkit.cpp +++ b/ImGuiToolkit.cpp @@ -232,13 +232,16 @@ bool ImGuiToolkit::IconButton(int i, int j, const char *tooltip) bool hovered, held; bool pressed = ImGui::ButtonBehavior(bb, id, &hovered, &held, flags); - // tooltip - if (tooltip != nullptr && hovered) - ImGuiToolkit::ToolTip(tooltip); + const ImVec4* colors = ImGui::GetStyle().Colors; - // draw icon + // draw with hovered color + ImGui::PushStyleColor( ImGuiCol_Text, hovered ? colors[ImGuiCol_NavWindowingHighlight] : colors[ImGuiCol_Text] ); ImGui::SetCursorScreenPos(draw_pos); Icon(i, j, !pressed); + ImGui::PopStyleColor(); + + if (tooltip != nullptr && ImGui::IsItemHovered()) + ImGuiToolkit::ToolTip(tooltip); ImGui::PopID(); return pressed; @@ -260,8 +263,12 @@ bool ImGuiToolkit::IconButton(const char* icon, const char *tooltip) if (ImGui::IsItemClicked()) ret = true; + // draw with hovered color + const ImVec4* colors = ImGui::GetStyle().Colors; + ImGui::PushStyleColor( ImGuiCol_Text, ImGui::IsItemHovered() ? colors[ImGuiCol_NavWindowingHighlight] : colors[ImGuiCol_Text] ); ImGui::SetCursorScreenPos(draw_pos); ImGui::Text(icon); + ImGui::PopStyleColor(); if (tooltip != nullptr && ImGui::IsItemHovered()) ImGuiToolkit::ToolTip(tooltip); @@ -287,6 +294,9 @@ bool ImGuiToolkit::IconToggle(int i, int j, int i_toggle, int j_toggle, bool* to ret = true; } + // draw with hovered color + const ImVec4* colors = ImGui::GetStyle().Colors; + ImGui::PushStyleColor( ImGuiCol_Text, ImGui::IsItemHovered() ? colors[ImGuiCol_NavWindowingHighlight] : colors[ImGuiCol_Text] ); ImGui::SetCursorScreenPos(draw_pos); if (*toggle) { Icon(i_toggle, j_toggle, !ret); @@ -294,6 +304,7 @@ bool ImGuiToolkit::IconToggle(int i, int j, int i_toggle, int j_toggle, bool* to else { Icon(i, j, !ret); } + ImGui::PopStyleColor(); int tooltipid = *toggle ? 1 : 0; if (tooltips != nullptr && tooltips[tooltipid] != nullptr && ImGui::IsItemHovered()) @@ -510,11 +521,8 @@ bool ImGuiToolkit::toolTipsEnabled () return tooltips_enabled; } -void ImGuiToolkit::ToolTip(const char* desc, const char* shortcut) +void showToolTip(const char* desc, const char* shortcut) { - if (!tooltips_enabled) - return; - ImGuiToolkit::PushFont(ImGuiToolkit::FONT_DEFAULT); ImGui::BeginTooltip(); ImGui::PushTextWrapPos(ImGui::GetFontSize() * 14.0f); @@ -527,31 +535,38 @@ void ImGuiToolkit::ToolTip(const char* desc, const char* shortcut) ImGui::Text(shortcut); ImGui::PopStyleColor(); } - ImGui::EndTooltip(); ImGui::PopFont(); + ImGui::EndTooltip(); +} + +void ImGuiToolkit::ToolTip(const char* desc, const char* shortcut) +{ + if (tooltips_enabled) + showToolTip(desc, shortcut); } // Helper to display a little (?) mark which shows a tooltip when hovered. -void ImGuiToolkit::HelpMarker(const char* desc, const char* icon, const char* shortcut) +void ImGuiToolkit::HelpToolTip(const char* desc, const char* shortcut) { - if (tooltips_enabled) { - ImGui::TextDisabled( icon ); - if (ImGui::IsItemHovered()) - ImGuiToolkit::ToolTip(desc, shortcut); - } + if (tooltips_enabled) + ImGuiToolkit::Indication( desc, ICON_FA_QUESTION_CIRCLE, shortcut); else ImGui::Text(" "); } -void ImGuiToolkit::HelpIcon(const char* desc, int i, int j, const char* shortcut) +// Helper to display a little (?) mark which shows a tooltip when hovered. +void ImGuiToolkit::Indication(const char* desc, const char* icon, const char* shortcut) { - if (tooltips_enabled) { - ImGuiToolkit::Icon(i, j, false); - if (ImGui::IsItemHovered()) - ImGuiToolkit::ToolTip(desc, shortcut); - } - else - ImGui::Text(" "); + ImGui::TextDisabled( icon ); + if (ImGui::IsItemHovered()) + showToolTip(desc, shortcut); +} + +void ImGuiToolkit::Indication(const char* desc, int i, int j, const char* shortcut) +{ + ImGuiToolkit::Icon(i, j, false); + if (ImGui::IsItemHovered()) + showToolTip(desc, shortcut); } diff --git a/ImGuiToolkit.h b/ImGuiToolkit.h index f109e07..2c8a0eb 100644 --- a/ImGuiToolkit.h +++ b/ImGuiToolkit.h @@ -40,8 +40,9 @@ namespace ImGuiToolkit void setToolTipsEnabled (bool on); bool toolTipsEnabled (); void ToolTip (const char* desc, const char* shortcut = nullptr); - void HelpMarker (const char* desc, const char* icon = ICON_FA_QUESTION_CIRCLE, const char* shortcut = nullptr); - void HelpIcon (const char* desc, int i = 19, int j = 5, const char* shortcut = nullptr); + void HelpToolTip(const char* desc, const char* shortcut = nullptr); + void Indication (const char* desc, const char* icon, const char* shortcut = nullptr); + void Indication (const char* desc, int i, int j, const char* shortcut = nullptr); // sliders bool SliderTiming (const char* label, uint *ms, uint v_min, uint v_max, uint v_step, const char* text_max = nullptr); diff --git a/ImGuiVisitor.cpp b/ImGuiVisitor.cpp index 9be4a0f..f7934e0 100644 --- a/ImGuiVisitor.cpp +++ b/ImGuiVisitor.cpp @@ -260,7 +260,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n) ImGui::SameLine(0, IMGUI_SAME_LINE); ImGui::Text("Filters"); - if (ImGuiToolkit::ButtonIcon(6, 4)) { + if (ImGuiToolkit::IconButton(6, 4)) { n.gamma = glm::vec4(1.f, 1.f, 1.f, 1.f); Action::manager().store("Gamma & Color"); } @@ -281,7 +281,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n) // ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN); // ImGui::SliderFloat4("Levels", glm::value_ptr(n.levels), 0.0, 1.0); - if (ImGuiToolkit::ButtonIcon(5, 16)) { + if (ImGuiToolkit::IconButton(5, 16)) { n.brightness = 0.f; n.contrast = 0.f; Action::manager().store("B & C 0.0 0.0"); @@ -300,7 +300,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n) Action::manager().store(oss.str()); } - if (ImGuiToolkit::ButtonIcon(9, 16)) { + if (ImGuiToolkit::IconButton(9, 16)) { n.saturation = 0.f; Action::manager().store("Saturation 0.0"); } @@ -313,7 +313,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n) Action::manager().store(oss.str()); } - if (ImGuiToolkit::ButtonIcon(12, 4)) { + if (ImGuiToolkit::IconButton(12, 4)) { n.hueshift = 0.f; Action::manager().store("Hue shift 0.0"); } @@ -326,7 +326,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n) Action::manager().store(oss.str()); } - if (ImGuiToolkit::ButtonIcon(18, 1)) { + if (ImGuiToolkit::IconButton(18, 1)) { n.nbColors = 0; Action::manager().store("Posterize None"); } @@ -340,7 +340,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n) Action::manager().store(oss.str()); } - if (ImGuiToolkit::ButtonIcon(8, 1)) { + if (ImGuiToolkit::IconButton(8, 1)) { n.threshold = 0.f; Action::manager().store("Threshold None"); } @@ -354,7 +354,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n) Action::manager().store(oss.str()); } - if (ImGuiToolkit::ButtonIcon(3, 1)) { + if (ImGuiToolkit::IconButton(3, 1)) { n.lumakey = 0.f; Action::manager().store("Lumakey 0.0"); } @@ -367,7 +367,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n) Action::manager().store(oss.str()); } - if (ImGuiToolkit::ButtonIcon(13, 4)) { + if (ImGuiToolkit::IconButton(13, 4)) { n.chromakey = glm::vec4(0.f, 0.8f, 0.f, 1.f); n.chromadelta = 0.f; Action::manager().store("Chromakey & Color Reset"); @@ -386,7 +386,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n) Action::manager().store(oss.str()); } - if (ImGuiToolkit::ButtonIcon(6, 16)) { + if (ImGuiToolkit::IconButton(6, 16)) { n.invert = 0; Action::manager().store("Invert None"); } @@ -395,7 +395,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n) if (ImGui::Combo("Invert", &n.invert, "None\0Invert Color\0Invert Luminance\0")) Action::manager().store("Invert " + std::string(n.invert<1 ? "None": (n.invert>1 ? "Luminance" : "Color"))); - if (ImGuiToolkit::ButtonIcon(1, 7)) { + if (ImGuiToolkit::IconButton(1, 7)) { n.filterid = 0; Action::manager().store("Filter None"); } @@ -435,21 +435,21 @@ void ImGuiVisitor::visit (Source& s) ImGui::SetCursorPos( ImVec2(preview_width + 20, pos.y ) ); if (s.active()) { if (s.blendingShader()->color.a > 0.f) - ImGuiToolkit::HelpMarker("Visible", ICON_FA_EYE); + ImGuiToolkit::Indication("Visible", ICON_FA_EYE); else - ImGuiToolkit::HelpMarker("Not visible", ICON_FA_EYE_SLASH); + ImGuiToolkit::Indication("Not visible", ICON_FA_EYE_SLASH); } else - ImGuiToolkit::HelpMarker("Inactive", ICON_FA_SNOWFLAKE); + ImGuiToolkit::Indication("Inactive", ICON_FA_SNOWFLAKE); // Inform on workspace ImGui::SetCursorPos( ImVec2(preview_width + 20, pos.y + ImGui::GetFrameHeightWithSpacing()) ); if (s.workspace() == Source::BACKGROUND) - ImGuiToolkit::HelpIcon("in Background",10, 16); + ImGuiToolkit::Indication("in Background",10, 16); else if (s.workspace() == Source::FOREGROUND) - ImGuiToolkit::HelpIcon("in Foreground",12, 16); + ImGuiToolkit::Indication("in Foreground",12, 16); else - ImGuiToolkit::HelpIcon("in Workspace",11, 16); + ImGuiToolkit::Indication("in Workspace",11, 16); // locking ImGui::SetCursorPos( ImVec2(preview_width + 20, pos.y + 2.f * ImGui::GetFrameHeightWithSpacing()) ); diff --git a/TextureView.cpp b/TextureView.cpp index b630fbc..c18f911 100644 --- a/TextureView.cpp +++ b/TextureView.cpp @@ -607,11 +607,11 @@ void TextureView::draw() if (edit_source_->maskShader()->mode == MaskShader::PAINT) { ImGui::SameLine(); - ImGuiToolkit::HelpMarker( ICON_FA_EDIT "\tMask paint \n\n" + ImGuiToolkit::HelpToolTip( ICON_FA_EDIT "\tMask paint \n\n" ICON_FA_MOUSE_POINTER "\t Edit texture\n" ICON_FA_PAINT_BRUSH "\tBrush\n" ICON_FA_ERASER "\tEraser\n\n" - ICON_FA_CARET_SQUARE_DOWN "\tBrush shape\n" + ICON_FA_ARROW_DOWN "\tBrush shape\n" ICON_FA_DOT_CIRCLE "\tBrush size\n" ICON_FA_FEATHER_ALT "\tBrush Pressure\n\n" ICON_FA_MAGIC "\tEffects\n" @@ -662,7 +662,7 @@ void TextureView::draw() int pixel_size = int(Settings::application.brush.x * edit_source_->frame()->height() ); show_cursor_forced_ = true; ImGuiToolkit::PushFont(ImGuiToolkit::FONT_DEFAULT); - ImGuiToolkit::HelpIcon("Large ", 16, 1, ICON_FA_CARET_SQUARE_RIGHT); + ImGuiToolkit::Indication("Large ", 16, 1, ICON_FA_ARROW_RIGHT); if (ImGui::VSliderInt("##BrushSize", ImVec2(30,260), &pixel_size, pixel_size_min, pixel_size_max, "") ){ Settings::application.brush.x = CLAMP(float(pixel_size) / edit_source_->frame()->height(), BRUSH_MIN_SIZE, BRUSH_MAX_SIZE); } @@ -671,7 +671,7 @@ void TextureView::draw() ImGui::Text("%d px", pixel_size); ImGui::EndTooltip(); } - ImGuiToolkit::HelpIcon("Small ", 15, 1, ICON_FA_CARET_SQUARE_LEFT); + ImGuiToolkit::Indication("Small ", 15, 1, ICON_FA_ARROW_LEFT); ImGui::PopFont(); ImGui::EndPopup(); } @@ -686,14 +686,14 @@ void TextureView::draw() if (ImGui::BeginPopup("brush_pressure_popup", ImGuiWindowFlags_NoMove)) { ImGuiToolkit::PushFont(ImGuiToolkit::FONT_DEFAULT); - ImGuiToolkit::HelpMarker("Light ", ICON_FA_FEATHER_ALT, ICON_FA_CARET_SQUARE_UP); + ImGuiToolkit::Indication("Light ", ICON_FA_FEATHER_ALT, ICON_FA_ARROW_UP); ImGui::VSliderFloat("##BrushPressure", ImVec2(30,260), &Settings::application.brush.y, BRUSH_MAX_PRESS, BRUSH_MIN_PRESS, "", 0.3f); if (ImGui::IsItemHovered() || ImGui::IsItemActive() ) { ImGui::BeginTooltip(); ImGui::Text("%.1f%%", Settings::application.brush.y * 100.0); ImGui::EndTooltip(); } - ImGuiToolkit::HelpMarker("Heavy ", ICON_FA_WEIGHT_HANGING, ICON_FA_CARET_SQUARE_DOWN); + ImGuiToolkit::Indication("Heavy ", ICON_FA_WEIGHT_HANGING, ICON_FA_ARROW_DOWN); ImGui::PopFont(); ImGui::EndPopup(); } @@ -765,10 +765,10 @@ void TextureView::draw() else if (edit_source_->maskShader()->mode == MaskShader::SHAPE) { ImGui::SameLine(); - ImGuiToolkit::HelpMarker( ICON_FA_SHAPES "\tMask shape\n\n" + ImGuiToolkit::HelpToolTip( ICON_FA_SHAPES "\tMask shape\n\n" ICON_FA_MOUSE_POINTER "\t Edit texture\n" ICON_FA_CROP_ALT "\tCrop & Edit shape\n\n" - ICON_FA_CARET_SQUARE_DOWN "\tShape of the mask\n" + ICON_FA_ARROW_DOWN "\tShape of the mask\n" ICON_FA_RADIATION_ALT "\tShape blur"); // select cursor @@ -813,7 +813,7 @@ void TextureView::draw() { static bool smoothchanged = false; ImGuiToolkit::PushFont(ImGuiToolkit::FONT_DEFAULT); - ImGuiToolkit::HelpIcon("Blur ", 7, 16, ICON_FA_CARET_SQUARE_UP); + ImGuiToolkit::Indication("Blur ", 7, 16, ICON_FA_ARROW_UP); if (ImGui::VSliderInt("##shapeblur", ImVec2(30,260), &blur_percent, 0, 100, "") ){ edit_source_->maskShader()->blur = float(blur_percent) / 100.f; edit_source_->touch(); @@ -832,7 +832,7 @@ void TextureView::draw() ImGui::Text("%.d%%", blur_percent); ImGui::EndTooltip(); } - ImGuiToolkit::HelpIcon("Sharp ", 8, 16, ICON_FA_CARET_SQUARE_DOWN); + ImGuiToolkit::Indication("Sharp ", 8, 16, ICON_FA_ARROW_DOWN); ImGui::PopFont(); ImGui::EndPopup(); } @@ -848,7 +848,7 @@ void TextureView::draw() } else {// mode == MaskShader::NONE ImGui::SameLine(); - ImGuiToolkit::HelpMarker( ICON_FA_EXPAND "\tNo mask\n\n" + ImGuiToolkit::HelpToolTip( ICON_FA_EXPAND "\tNo mask\n\n" ICON_FA_MOUSE_POINTER "\t Edit texture\n"); // always active mouse pointer ImGui::SameLine(0, 60); diff --git a/UserInterfaceManager.cpp b/UserInterfaceManager.cpp index 6dfcbd6..a4534b1 100644 --- a/UserInterfaceManager.cpp +++ b/UserInterfaceManager.cpp @@ -91,7 +91,7 @@ TextEditor editor; #include "UserInterfaceManager.h" #define PLOT_ARRAY_SIZE 180 -#define LABEL_AUTO_MEDIA_PLAYER ICON_FA_CARET_SQUARE_RIGHT " Dynamic selection" +#define LABEL_AUTO_MEDIA_PLAYER ICON_FA_ARROW_RIGHT " Dynamic selection" #define LABEL_STORE_SELECTION " Store selection" #define LABEL_EDIT_FADING ICON_FA_RANDOM " Fade in & out" @@ -2351,8 +2351,8 @@ void HelperToolbox::Render() ImGui::SetColumnWidth(0, width_column0); ImGui::PushTextWrapPos(width_window ); - ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); ImGui::Text(ICON_FA_PHOTO_VIDEO " File"); ImGui::PopFont(); - ImGui::NextColumn(); + ImGui::Text(ICON_FA_PHOTO_VIDEO); ImGui::NextColumn(); + ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); ImGui::Text("File");ImGui::PopFont(); ImGui::NextColumn(); ImGuiToolkit::Icon(ICON_SOURCE_VIDEO); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Video"); ImGui::NextColumn(); ImGui::Text ("Video file (*.mpg, *mov, *.avi, etc.)."); @@ -2364,15 +2364,15 @@ void HelperToolbox::Render() ImGui::Text ("Render a session (*.mix) as a source."); ImGui::NextColumn(); ImGui::Separator(); - ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); ImGui::Text(ICON_FA_SORT_NUMERIC_DOWN " Sequence"); ImGui::PopFont(); - ImGui::NextColumn(); + ImGui::Text(ICON_FA_SORT_NUMERIC_DOWN); ImGui::NextColumn(); + ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); ImGui::Text("Sequence");ImGui::PopFont(); ImGui::NextColumn(); ImGuiToolkit::Icon(ICON_SOURCE_SEQUENCE); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Sequence"); ImGui::NextColumn(); ImGui::Text ("Set of images numbered sequentially (*.jpg, *.png, etc.)."); ImGui::NextColumn(); ImGui::Separator(); - ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); ImGui::Text(ICON_FA_PLUG " Connected"); ImGui::PopFont(); - ImGui::NextColumn(); + ImGui::Text(ICON_FA_PLUG); ImGui::NextColumn(); + ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); ImGui::Text("Connected");ImGui::PopFont(); ImGui::NextColumn(); ImGuiToolkit::Icon(ICON_SOURCE_DEVICE); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Device"); ImGui::NextColumn(); ImGui::Text ("Connected webcam or frame grabber."); @@ -2384,8 +2384,8 @@ void HelperToolbox::Render() ImGui::Text ("Connected stream from another vimix in the local network (shared output stream)."); ImGui::NextColumn(); ImGui::Separator(); - ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); ImGui::Text(ICON_FA_COG " Generated"); ImGui::PopFont(); - ImGui::NextColumn(); + ImGui::Text(ICON_FA_COG); ImGui::NextColumn(); + ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); ImGui::Text("Generated");ImGui::PopFont(); ImGui::NextColumn(); ImGuiToolkit::Icon(ICON_SOURCE_PATTERN); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Pattern"); ImGui::NextColumn(); ImGui::Text ("Algorithmically generated source; colors, grids, test patterns, timers..."); @@ -2394,8 +2394,8 @@ void HelperToolbox::Render() ImGui::Text ("Custom gstreamer pipeline, as described in command line for gst-launch-1.0 (without the target sink)."); ImGui::NextColumn(); ImGui::Separator(); - ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); ImGui::Text(ICON_FA_SYNC " Internal"); ImGui::PopFont(); - ImGui::NextColumn(); + ImGui::Text(ICON_FA_SYNC); ImGui::NextColumn(); + ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); ImGui::Text("Internal");ImGui::PopFont(); ImGui::NextColumn(); ImGuiToolkit::Icon(ICON_SOURCE_RENDER); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Rendering"); ImGui::NextColumn(); ImGui::Text ("Loopback the rendering output as a source."); @@ -2480,8 +2480,8 @@ void HelperToolbox::Render() ImGui::Text("Toggle Play/Pause selected videos"); ImGui::NextColumn(); ImGui::Text("B"); ImGui::NextColumn(); ImGui::Text("Back restart selected videos"); ImGui::NextColumn(); - ImGui::Text(ICON_FA_ARROW_LEFT ICON_FA_ARROW_UP ICON_FA_ARROW_DOWN ICON_FA_ARROW_RIGHT ); ImGui::NextColumn(); - ImGui::Text("Move the source in the canvas"); ImGui::NextColumn(); + ImGui::Text(ICON_FA_ARROW_DOWN " " ICON_FA_ARROW_UP " " ICON_FA_ARROW_DOWN " " ICON_FA_ARROW_RIGHT ); ImGui::NextColumn(); + ImGui::Text("Move the selection in the canvas"); ImGui::NextColumn(); ImGui::Separator(); ImGui::Text(SHORTCUT_LOGS); ImGui::NextColumn(); ImGui::Text(IMGUI_TITLE_LOGS); ImGui::NextColumn(); @@ -3260,7 +3260,7 @@ bool SourceController::SourceButton(Source *s, ImVec2 framesize) draw_list->AddRect(frame_top, frame_top + framesize - ImVec2(1.f, 0.f), ImGui::GetColorU32(ImGuiCol_Text), 0, 0, 3.f); frame_top.x += (framesize.x - ImGui::GetTextLineHeight()) / 2.f; frame_top.y += (framesize.y - ImGui::GetTextLineHeight()) / 2.f; - draw_list->AddText(frame_top, ImGui::GetColorU32(ImGuiCol_Text), ICON_FA_CARET_SQUARE_RIGHT); + draw_list->AddText(frame_top, ImGui::GetColorU32(ImGuiCol_Text), ICON_FA_ARROW_RIGHT); } ImGui::PopID(); @@ -3598,7 +3598,7 @@ void SourceController::RenderMediaPlayer(MediaPlayer *mp) if (Settings::application.widget.timeline_editmode) { // action cut if (mediaplayer_active_->isPlaying()) { - ImGuiToolkit::HelpIcon("Pause video to enable cut options", 9, 3); + ImGuiToolkit::Indication("Pause video to enable cut options", 9, 3); } else if (ImGuiToolkit::IconButton(9, 3, "Cut at cursor")) { ImGui::OpenPopup("timeline_cut_context_menu"); @@ -4359,7 +4359,7 @@ void Navigator::RenderNewPannel() fileimportdialog.open(); // Indication ImGui::SameLine(); - ImGuiToolkit::HelpMarker("Create a source from a file:\n" + ImGuiToolkit::HelpToolTip("Create a source from a file:\n" ICON_FA_CARET_RIGHT " Video (*.mpg, *mov, *.avi, etc.)\n" ICON_FA_CARET_RIGHT " Image (*.jpg, *.png, etc.)\n" ICON_FA_CARET_RIGHT " Vector graphics (*.svg)\n" @@ -4521,7 +4521,7 @@ void Navigator::RenderNewPannel() // Bottom Right side of the list: helper and options ImVec2 pos_bot = ImGui::GetCursorPos(); ImGui::SetCursorPos( ImVec2( pannel_width_ IMGUI_RIGHT_ALIGN, pos_bot.y - 2.f * ImGui::GetFrameHeightWithSpacing())); - ImGuiToolkit::HelpMarker("Recently recorded videos (lastest on top). Clic on a filename to open.\n\n" + ImGuiToolkit::HelpToolTip("Recently recorded videos (lastest on top). Clic on a filename to open.\n\n" ICON_FA_CHEVRON_CIRCLE_RIGHT " Auto-preload prepares this panel with the " "most recent recording after 'Stop Record' or 'Save & continue'."); ImGui::SetCursorPos( ImVec2( pannel_width_ IMGUI_RIGHT_ALIGN, pos_bot.y - ImGui::GetFrameHeightWithSpacing()) ); @@ -4553,7 +4553,7 @@ void Navigator::RenderNewPannel() // Indication ImGui::SameLine(); - ImGuiToolkit::HelpMarker("Create a source from a sequence of numbered images."); + ImGuiToolkit::HelpToolTip("Create a source from a sequence of numbered images."); // return from thread for folder openning if (_selectImagesDialog.closed()) { @@ -4623,7 +4623,7 @@ void Navigator::RenderNewPannel() // Indication ImGui::SameLine(); - ImGuiToolkit::HelpMarker("Create a source replicating internal vimix objects.\n" + ImGuiToolkit::HelpToolTip("Create a source replicating internal vimix objects.\n" ICON_FA_CARET_RIGHT " Loopback from output\n" ICON_FA_CARET_RIGHT " Clone other sources"); } @@ -4652,7 +4652,7 @@ void Navigator::RenderNewPannel() // Indication ImGui::SameLine(); - ImGuiToolkit::HelpMarker("Create a source with graphics generated algorithmically."); + ImGuiToolkit::HelpToolTip("Create a source with graphics generated algorithmically."); if (custom_pipeline) { static std::vector< std::pair< std::string, std::string> > _examples = { {"Videotest", "videotestsrc horizontal-speed=1 " }, @@ -4738,7 +4738,7 @@ void Navigator::RenderNewPannel() // Indication ImGui::SameLine(); - ImGuiToolkit::HelpMarker("Create a source getting images from connected devices or machines;\n" + ImGuiToolkit::HelpToolTip("Create a source getting images from connected devices or machines;\n" ICON_FA_CARET_RIGHT " webcams or frame grabbers\n" ICON_FA_CARET_RIGHT " screen capture\n" ICON_FA_CARET_RIGHT " stream from connected vimix"); @@ -4987,7 +4987,7 @@ void Navigator::RenderMainPannelVimix() ImGuiToolkit::ToolTip("New session", SHORTCUT_NEW_FILE); ImGui::SetCursorPos( ImVec2( pannel_width_ IMGUI_RIGHT_ALIGN, pos_bot.y - 2.f * ImGui::GetFrameHeightWithSpacing())); - ImGuiToolkit::HelpMarker("Select the history of recently opened files or a folder. " + ImGuiToolkit::HelpToolTip("Select the history of recently opened files or a folder. " "Double-clic on a filename to open the session.\n\n" ICON_FA_ARROW_CIRCLE_RIGHT " Smooth transition " "performs cross fading to the openned session."); @@ -5378,7 +5378,7 @@ void Navigator::RenderMainPannelVimix() ImGuiToolkit::ToolTip("Save & Keep version"); ImGui::SetCursorPos( ImVec2( pannel_width_ IMGUI_RIGHT_ALIGN, pos_bot.y - 2.f * ImGui::GetFrameHeightWithSpacing())); - ImGuiToolkit::HelpMarker("Previous versions of the session (latest on top). " + ImGuiToolkit::HelpToolTip("Previous versions of the session (latest on top). " "Double-clic on a version to restore it.\n\n" ICON_FA_CODE_BRANCH " Iterative saving automatically " "keeps a version each time a session is saved."); @@ -5500,7 +5500,7 @@ void Navigator::RenderMainPannelSettings() nb = VideoRecorder::buffering_preset_value[Settings::application.record.buffering_mode] / (output->width() * output->height() * 4); char buf[256]; sprintf(buf, "Buffer can contain %ld frames (%dx%d), %.1f sec", nb, output->width(), output->height(), (float)nb / (float) VideoRecorder::framerate_preset_value[Settings::application.record.framerate_mode] ); - ImGuiToolkit::HelpMarker(buf, ICON_FA_INFO_CIRCLE); + ImGuiToolkit::Indication(buf, ICON_FA_MEMORY); ImGui::SameLine(0); } @@ -5509,7 +5509,7 @@ void Navigator::RenderMainPannelSettings() ImGui::SliderInt("Buffer", &Settings::application.record.buffering_mode, 0, IM_ARRAYSIZE(VideoRecorder::buffering_preset_name)-1, VideoRecorder::buffering_preset_name[Settings::application.record.buffering_mode]); - ImGuiToolkit::HelpMarker("Priority when buffer is full and recorder has to skip frames;\n" + ImGuiToolkit::HelpToolTip("Priority when buffer is full and recorder has to skip frames;\n" ICON_FA_CARET_RIGHT " Duration:\n Variable framerate, correct duration.\n" ICON_FA_CARET_RIGHT " Framerate:\n Correct framerate, shorter duration."); ImGui::SameLine(0); @@ -5525,7 +5525,7 @@ void Navigator::RenderMainPannelSettings() char msg[256]; sprintf(msg, "You can send OSC messages via UDP to the IP address %s", NetworkToolkit::host_ips()[1].c_str()); - ImGuiToolkit::HelpMarker(msg, ICON_FA_INFO_CIRCLE); + ImGuiToolkit::Indication(msg, ICON_FA_NETWORK_WIRED); ImGui::SameLine(0); ImGui::SetCursorPosX(-1.f * IMGUI_RIGHT_ALIGN); @@ -5576,7 +5576,7 @@ void Navigator::RenderMainPannelSettings() change |= ImGuiToolkit::ButtonSwitch( "Blit framebuffer", &blit); change |= ImGuiToolkit::ButtonSwitch( "Antialiasing framebuffer", &multi); // hardware support deserves more explanation - ImGuiToolkit::HelpMarker("If enabled, tries to find a platform adapted hardware-accelerated " + ImGuiToolkit::Indication("If enabled, tries to find a platform adapted hardware-accelerated " "driver to decode (read) or encode (record) videos.", ICON_FA_MICROCHIP); ImGui::SameLine(0); change |= ImGuiToolkit::ButtonSwitch( "Hardware video en/decoding", &gpu); diff --git a/rsc/images/icons.dds b/rsc/images/icons.dds index 22799f97c83ed4251dfd90caf30b77efda374387..1ae46222d1924d320837153ea5b1e74c76759c10 100644 GIT binary patch delta 3175 zcmcIme@qis9DjFh@2;%EUAcmy)E1Ksg9^AMOs5f(xfv5TG#YVg1hark*g~?I&6$iA zOMvNS>*3x%1=$~)i&;d`?3}2K{b3|gK|8l(nKo*WCCfw?#VOFY_r2?DsS_vJ_Flie zet&(wpYMC`?&|Zu>7$AfnTlR!JwFnUw)O#KDWZ>PYA~mkg`&M>V}p}OJ){qODb7%`5b~f- z`5}X;9D4viHL-euXJ|I*0|f?jh>#U+LQyNzL%vnQK+)I{GEBn@ozb_L1FnQr^=iMW z`S`ZeZnJa~g1?&QXclgkPA0w;H*B;!^}!ROLs1cuQ5gUOmmnD+Bb4W$>fUg=&&AAe zt=@*vc>QNmlxPp^Yyb?IL-s$qv{sas$Pf97Wm**lQ4gd+%BXfn^^`=(OMU!niMVIY z?M&#Dsxes7kHj;AzDK3n)Q9=<473^TM^TPBL%zy*k&Dd4iWH15LiZ{K^hre|Rz#Dk zcI!V}5ObBHc615dL-$z?xUyla1tC#VN9KYJ^a9QMx(E04+A=LSNIPEF&A%bupa8>Y zm~L#YV~B>wL(_2aEg>(oGncOPJ#w8~0*3)&{D^-6=#Yg7#*F)E?-Z0mnxNCigC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