mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
Cleanup tooltips.
This commit is contained in:
@@ -226,12 +226,8 @@ bool ImGuiToolkit::IconToggle(int i, int j, int i_toggle, int j_toggle, bool* to
|
||||
}
|
||||
|
||||
int tooltipid = *toggle ? 1 : 0;
|
||||
if (tooltips != nullptr && tooltips[tooltipid] != nullptr && ImGui::IsItemHovered())
|
||||
{
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("%s", tooltips[tooltipid]);
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
if (tooltips != nullptr && IM_ARRAYSIZE(*tooltips) > 1 && ImGui::IsItemHovered())
|
||||
ImGuiToolkit::ToolTip(tooltips[tooltipid]);
|
||||
|
||||
ImGui::PopID();
|
||||
return ret;
|
||||
@@ -342,7 +338,7 @@ void ImGuiToolkit::ToolTip(const char* desc, const char* shortcut)
|
||||
{
|
||||
ImGuiToolkit::PushFont(ImGuiToolkit::FONT_DEFAULT);
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f);
|
||||
ImGui::PushTextWrapPos(ImGui::GetFontSize() * 13.0f);
|
||||
ImGui::TextUnformatted(desc);
|
||||
ImGui::PopTextWrapPos();
|
||||
|
||||
|
||||
@@ -421,15 +421,15 @@ void ImGuiVisitor::visit (Source& s)
|
||||
// Inform on workspace
|
||||
ImGui::SetCursorPos( ImVec2(preview_width + 20, pos.y + ImGui::GetFrameHeightWithSpacing()) );
|
||||
if (s.workspace() == Source::BACKGROUND)
|
||||
ImGuiToolkit::HelpIcon("Background",10, 16);
|
||||
ImGuiToolkit::HelpIcon(" in Background",10, 16);
|
||||
else if (s.workspace() == Source::FOREGROUND)
|
||||
ImGuiToolkit::HelpIcon("Foreground",12, 16);
|
||||
ImGuiToolkit::HelpIcon(" in Foreground",12, 16);
|
||||
else
|
||||
ImGuiToolkit::HelpIcon("Stage",11, 16);
|
||||
ImGuiToolkit::HelpIcon(" on Stage",11, 16);
|
||||
|
||||
// locking
|
||||
ImGui::SetCursorPos( ImVec2(preview_width + 20, pos.y + 2.f * ImGui::GetFrameHeightWithSpacing()) );
|
||||
const char *tooltip[2] = {"Unlocked", "Locked"};
|
||||
const char *tooltip[2] = {"Unlocked\n(clic to toggle)", "Locked\n(clic to toggle)"};
|
||||
bool l = s.locked();
|
||||
if (ImGuiToolkit::IconToggle(15,6,17,6, &l, tooltip ) )
|
||||
s.setLocked(l);
|
||||
|
||||
@@ -2254,8 +2254,8 @@ void Navigator::RenderSourcePannel(Source *s)
|
||||
ImGui::Text("Source");
|
||||
ImGui::PopFont();
|
||||
|
||||
ImGui::SetCursorPos(ImVec2(pannel_width_ - 35.f, 15.f));
|
||||
const char *tooltip[2] = {"Pin pannel\nCurrent: double-clic on source", "Un-pin Pannel\nCurrent: single-clic on source"};
|
||||
ImGui::SetCursorPos(ImVec2(pannel_width_ - 40.f, 15.f));
|
||||
const char *tooltip[2] = {"Panel unpined:\nDouble-clic on a source to open the source panel.", "Panel pined:\nSingle-clic on a source to open the source panel."};
|
||||
ImGuiToolkit::IconToggle(5,2,4,2, &Settings::application.pannel_stick, tooltip );
|
||||
|
||||
static char buf5[128];
|
||||
@@ -2533,7 +2533,7 @@ void Navigator::RenderNewPannel()
|
||||
|
||||
// Indication
|
||||
ImGui::SameLine();
|
||||
ImGuiToolkit::HelpMarker("Create a source getting images from connected devices or machines;\n- webcams or frame grabbers\n- screen capture\n- vimix stream from connected machines");
|
||||
ImGuiToolkit::HelpMarker("Create a source getting images from connected devices or machines;\n- webcams or frame grabbers\n- screen capture\n- vimix shared stream");
|
||||
|
||||
}
|
||||
|
||||
@@ -2602,7 +2602,7 @@ void Navigator::RenderTransitionPannel()
|
||||
if ( ImGui::Button( ICON_FA_DOOR_OPEN " Exit", ImVec2(IMGUI_RIGHT_ALIGN, 0)) )
|
||||
Mixer::manager().setView(View::MIXING);
|
||||
ImGui::SameLine();
|
||||
ImGuiToolkit::HelpMarker("Exit transition leaves the output 'as is',\nwith the newly openned session as a source\nif the transition is not finished.");
|
||||
ImGuiToolkit::HelpMarker("Exit transition leaves the output 'as is', with the newly openned session as a source if the transition is not finished.");
|
||||
|
||||
}
|
||||
ImGui::End();
|
||||
@@ -2624,7 +2624,7 @@ void Navigator::RenderMainPannel()
|
||||
|
||||
// Icon to switch fullscreen
|
||||
ImGui::SetCursorPos(ImVec2(pannel_width_ - 40.f, 13.f));
|
||||
const char *tooltip[2] = {"Enter Fullscreen (" CTRL_MOD "Shift+F)", "Exit Fullscreen (" CTRL_MOD "Shift+F)"};
|
||||
const char *tooltip[2] = {"Enter Fullscreen " CTRL_MOD "Shift+F", "Exit Fullscreen " CTRL_MOD "Shift+F)"};
|
||||
bool fs = Rendering::manager().mainWindow().isFullscreen();
|
||||
if ( ImGuiToolkit::IconToggle(4,15,3,15, &fs, tooltip ) ) {
|
||||
Rendering::manager().mainWindow().toggleFullscreen();
|
||||
@@ -2794,7 +2794,7 @@ void Navigator::RenderMainPannel()
|
||||
|
||||
pos = ImGui::GetCursorPos();
|
||||
ImGui::SameLine();
|
||||
ImGuiToolkit::HelpMarker("Quick access to Session files;\nSelect the history of recently\nopened files or a folder, and\ndouble-clic a filename to open.");
|
||||
ImGuiToolkit::HelpMarker("Quick access to Session files;\nSelect the history of recently opened files or a folder, and double-clic a filename to open.");
|
||||
ImGui::SetCursorPos(pos);
|
||||
|
||||
// done the selection !
|
||||
|
||||
Reference in New Issue
Block a user