mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Unified IMGUI_SAME_LINE width
This commit is contained in:
@@ -81,7 +81,7 @@ void ImGuiVisitor::visit(Group &n)
|
|||||||
n.scale_.y = 1.f;
|
n.scale_.y = 1.f;
|
||||||
Action::manager().store("Geometry Reset");
|
Action::manager().store("Geometry Reset");
|
||||||
}
|
}
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::Text("Geometry");
|
ImGui::Text("Geometry");
|
||||||
|
|
||||||
if (ImGuiToolkit::ButtonIcon(6, 15)) {
|
if (ImGuiToolkit::ButtonIcon(6, 15)) {
|
||||||
@@ -89,7 +89,7 @@ void ImGuiVisitor::visit(Group &n)
|
|||||||
n.translation_.y = 0.f;
|
n.translation_.y = 0.f;
|
||||||
Action::manager().store("Position 0.0, 0.0");
|
Action::manager().store("Position 0.0, 0.0");
|
||||||
}
|
}
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
float translation[2] = { n.translation_.x, n.translation_.y};
|
float translation[2] = { n.translation_.x, n.translation_.y};
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||||
if ( ImGui::SliderFloat2("Position", translation, -5.0, 5.0) )
|
if ( ImGui::SliderFloat2("Position", translation, -5.0, 5.0) )
|
||||||
@@ -107,7 +107,7 @@ void ImGuiVisitor::visit(Group &n)
|
|||||||
n.scale_.y = 1.f;
|
n.scale_.y = 1.f;
|
||||||
Action::manager().store("Scale 1.0 x 1.0");
|
Action::manager().store("Scale 1.0 x 1.0");
|
||||||
}
|
}
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
float scale[2] = { n.scale_.x, n.scale_.y} ;
|
float scale[2] = { n.scale_.x, n.scale_.y} ;
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||||
if ( ImGui::SliderFloat2("Scale", scale, -MAX_SCALE, MAX_SCALE, "%.2f") )
|
if ( ImGui::SliderFloat2("Scale", scale, -MAX_SCALE, MAX_SCALE, "%.2f") )
|
||||||
@@ -125,7 +125,7 @@ void ImGuiVisitor::visit(Group &n)
|
|||||||
n.rotation_.z = 0.f;
|
n.rotation_.z = 0.f;
|
||||||
Action::manager().store("Angle 0.0");
|
Action::manager().store("Angle 0.0");
|
||||||
}
|
}
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||||
ImGui::SliderAngle("Angle", &(n.rotation_.z), -180.f, 180.f) ;
|
ImGui::SliderAngle("Angle", &(n.rotation_.z), -180.f, 180.f) ;
|
||||||
if (ImGui::IsItemDeactivatedAfterEdit()) {
|
if (ImGui::IsItemDeactivatedAfterEdit()) {
|
||||||
@@ -185,7 +185,7 @@ void ImGuiVisitor::visit(Shader &n)
|
|||||||
// n.blending = Shader::BLEND_OPACITY;
|
// n.blending = Shader::BLEND_OPACITY;
|
||||||
// n.color = glm::vec4(1.f, 1.f, 1.f, 1.f);
|
// n.color = glm::vec4(1.f, 1.f, 1.f, 1.f);
|
||||||
// }
|
// }
|
||||||
// ImGui::SameLine(0, 10);
|
// ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
// ImGui::ColorEdit3("Color", glm::value_ptr(n.color), ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel ) ;
|
// ImGui::ColorEdit3("Color", glm::value_ptr(n.color), ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel ) ;
|
||||||
// ImGui::SameLine(0, 5);
|
// ImGui::SameLine(0, 5);
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||||
@@ -237,7 +237,7 @@ void ImGuiVisitor::visit(Shader &n)
|
|||||||
// // get index of the mask used in this ImageShader
|
// // get index of the mask used in this ImageShader
|
||||||
// int item_current = n.mask;
|
// int item_current = n.mask;
|
||||||
//// if (ImGuiToolkit::ButtonIcon(10, 3)) n.mask = 0;
|
//// if (ImGuiToolkit::ButtonIcon(10, 3)) n.mask = 0;
|
||||||
//// ImGui::SameLine(0, 10);
|
//// ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
// ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
// ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||||
// // combo list of masks
|
// // combo list of masks
|
||||||
// if ( ImGui::Combo("Mask", &item_current, ImageShader::mask_names, IM_ARRAYSIZE(ImageShader::mask_names) ) )
|
// if ( ImGui::Combo("Mask", &item_current, ImageShader::mask_names, IM_ARRAYSIZE(ImageShader::mask_names) ) )
|
||||||
@@ -257,14 +257,14 @@ void ImGuiVisitor::visit(ImageProcessingShader &n)
|
|||||||
ImGui::PushID(std::to_string(n.id()).c_str());
|
ImGui::PushID(std::to_string(n.id()).c_str());
|
||||||
|
|
||||||
ImGuiToolkit::Icon(6, 2);
|
ImGuiToolkit::Icon(6, 2);
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::Text("Filters");
|
ImGui::Text("Filters");
|
||||||
|
|
||||||
if (ImGuiToolkit::ButtonIcon(6, 4)) {
|
if (ImGuiToolkit::ButtonIcon(6, 4)) {
|
||||||
n.gamma = glm::vec4(1.f, 1.f, 1.f, 1.f);
|
n.gamma = glm::vec4(1.f, 1.f, 1.f, 1.f);
|
||||||
Action::manager().store("Gamma & Color");
|
Action::manager().store("Gamma & Color");
|
||||||
}
|
}
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::ColorEdit3("Gamma Color", glm::value_ptr(n.gamma), ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel) ;
|
ImGui::ColorEdit3("Gamma Color", glm::value_ptr(n.gamma), ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel) ;
|
||||||
if (ImGui::IsItemDeactivatedAfterEdit())
|
if (ImGui::IsItemDeactivatedAfterEdit())
|
||||||
Action::manager().store("Gamma Color changed");
|
Action::manager().store("Gamma Color changed");
|
||||||
@@ -286,7 +286,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n)
|
|||||||
n.contrast = 0.f;
|
n.contrast = 0.f;
|
||||||
Action::manager().store("B & C 0.0 0.0");
|
Action::manager().store("B & C 0.0 0.0");
|
||||||
}
|
}
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||||
float bc[2] = { n.brightness, n.contrast};
|
float bc[2] = { n.brightness, n.contrast};
|
||||||
if ( ImGui::SliderFloat2("B & C", bc, -1.0, 1.0) )
|
if ( ImGui::SliderFloat2("B & C", bc, -1.0, 1.0) )
|
||||||
@@ -304,7 +304,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n)
|
|||||||
n.saturation = 0.f;
|
n.saturation = 0.f;
|
||||||
Action::manager().store("Saturation 0.0");
|
Action::manager().store("Saturation 0.0");
|
||||||
}
|
}
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||||
ImGui::SliderFloat("Saturation", &n.saturation, -1.0, 1.0);
|
ImGui::SliderFloat("Saturation", &n.saturation, -1.0, 1.0);
|
||||||
if (ImGui::IsItemDeactivatedAfterEdit()){
|
if (ImGui::IsItemDeactivatedAfterEdit()){
|
||||||
@@ -317,7 +317,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n)
|
|||||||
n.hueshift = 0.f;
|
n.hueshift = 0.f;
|
||||||
Action::manager().store("Hue shift 0.0");
|
Action::manager().store("Hue shift 0.0");
|
||||||
}
|
}
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||||
ImGui::SliderFloat("Hue shift", &n.hueshift, 0.0, 1.0);
|
ImGui::SliderFloat("Hue shift", &n.hueshift, 0.0, 1.0);
|
||||||
if (ImGui::IsItemDeactivatedAfterEdit()){
|
if (ImGui::IsItemDeactivatedAfterEdit()){
|
||||||
@@ -330,7 +330,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n)
|
|||||||
n.nbColors = 0;
|
n.nbColors = 0;
|
||||||
Action::manager().store("Posterize None");
|
Action::manager().store("Posterize None");
|
||||||
}
|
}
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||||
ImGui::SliderInt("Posterize", &n.nbColors, 0, 16, n.nbColors == 0 ? "None" : "%d colors");
|
ImGui::SliderInt("Posterize", &n.nbColors, 0, 16, n.nbColors == 0 ? "None" : "%d colors");
|
||||||
if (ImGui::IsItemDeactivatedAfterEdit()){
|
if (ImGui::IsItemDeactivatedAfterEdit()){
|
||||||
@@ -344,7 +344,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n)
|
|||||||
n.threshold = 0.f;
|
n.threshold = 0.f;
|
||||||
Action::manager().store("Threshold None");
|
Action::manager().store("Threshold None");
|
||||||
}
|
}
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||||
ImGui::SliderFloat("Threshold", &n.threshold, 0.0, 1.0, n.threshold < 0.001 ? "None" : "%.2f");
|
ImGui::SliderFloat("Threshold", &n.threshold, 0.0, 1.0, n.threshold < 0.001 ? "None" : "%.2f");
|
||||||
if (ImGui::IsItemDeactivatedAfterEdit()){
|
if (ImGui::IsItemDeactivatedAfterEdit()){
|
||||||
@@ -358,7 +358,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n)
|
|||||||
n.lumakey = 0.f;
|
n.lumakey = 0.f;
|
||||||
Action::manager().store("Lumakey 0.0");
|
Action::manager().store("Lumakey 0.0");
|
||||||
}
|
}
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||||
ImGui::SliderFloat("Lumakey", &n.lumakey, 0.0, 1.0);
|
ImGui::SliderFloat("Lumakey", &n.lumakey, 0.0, 1.0);
|
||||||
if (ImGui::IsItemDeactivatedAfterEdit()){
|
if (ImGui::IsItemDeactivatedAfterEdit()){
|
||||||
@@ -372,7 +372,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n)
|
|||||||
n.chromadelta = 0.f;
|
n.chromadelta = 0.f;
|
||||||
Action::manager().store("Chromakey & Color Reset");
|
Action::manager().store("Chromakey & Color Reset");
|
||||||
}
|
}
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::ColorEdit3("Chroma color", glm::value_ptr(n.chromakey), ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel ) ;
|
ImGui::ColorEdit3("Chroma color", glm::value_ptr(n.chromakey), ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel ) ;
|
||||||
if (ImGui::IsItemDeactivatedAfterEdit())
|
if (ImGui::IsItemDeactivatedAfterEdit())
|
||||||
Action::manager().store("Chroma color changed");
|
Action::manager().store("Chroma color changed");
|
||||||
@@ -390,7 +390,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n)
|
|||||||
n.invert = 0;
|
n.invert = 0;
|
||||||
Action::manager().store("Invert None");
|
Action::manager().store("Invert None");
|
||||||
}
|
}
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||||
if (ImGui::Combo("Invert", &n.invert, "None\0Invert Color\0Invert Luminance\0"))
|
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")));
|
Action::manager().store("Invert " + std::string(n.invert<1 ? "None": (n.invert>1 ? "Luminance" : "Color")));
|
||||||
@@ -399,7 +399,7 @@ void ImGuiVisitor::visit(ImageProcessingShader &n)
|
|||||||
n.filterid = 0;
|
n.filterid = 0;
|
||||||
Action::manager().store("Filter None");
|
Action::manager().store("Filter None");
|
||||||
}
|
}
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||||
if (ImGui::Combo("Filter", &n.filterid, ImageProcessingShader::filter_names, IM_ARRAYSIZE(ImageProcessingShader::filter_names) ) )
|
if (ImGui::Combo("Filter", &n.filterid, ImageProcessingShader::filter_names, IM_ARRAYSIZE(ImageProcessingShader::filter_names) ) )
|
||||||
Action::manager().store("Filter " + std::string(ImageProcessingShader::filter_names[n.filterid]));
|
Action::manager().store("Filter " + std::string(ImageProcessingShader::filter_names[n.filterid]));
|
||||||
@@ -541,7 +541,7 @@ void ImGuiVisitor::visit (Source& s)
|
|||||||
|
|
||||||
if (s.processingshader_link_.connected()) {
|
if (s.processingshader_link_.connected()) {
|
||||||
ImGuiToolkit::Icon(6, 2);
|
ImGuiToolkit::Icon(6, 2);
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::Text("Filters");
|
ImGui::Text("Filters");
|
||||||
Source *target = s.processingshader_link_.source();
|
Source *target = s.processingshader_link_.source();
|
||||||
ImGui::Text("Following");
|
ImGui::Text("Following");
|
||||||
@@ -558,7 +558,7 @@ void ImGuiVisitor::visit (Source& s)
|
|||||||
void ImGuiVisitor::visit (MediaSource& s)
|
void ImGuiVisitor::visit (MediaSource& s)
|
||||||
{
|
{
|
||||||
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
if ( s.mediaplayer()->isImage() )
|
if ( s.mediaplayer()->isImage() )
|
||||||
ImGui::Text("Image File");
|
ImGui::Text("Image File");
|
||||||
else
|
else
|
||||||
@@ -596,7 +596,7 @@ void ImGuiVisitor::visit (SessionFileSource& s)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::Text("Session File");
|
ImGui::Text("Session File");
|
||||||
|
|
||||||
// info
|
// info
|
||||||
@@ -622,7 +622,7 @@ void ImGuiVisitor::visit (SessionFileSource& s)
|
|||||||
|
|
||||||
if (ImGuiToolkit::ButtonIcon(3, 2)) s.session()->setFadingTarget(0.f);
|
if (ImGuiToolkit::ButtonIcon(3, 2)) s.session()->setFadingTarget(0.f);
|
||||||
float f = s.session()->fading();
|
float f = s.session()->fading();
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||||
if (ImGui::SliderFloat("Fading", &f, 0.0, 1.0, f < 0.001 ? "None" : "%.2f") )
|
if (ImGui::SliderFloat("Fading", &f, 0.0, 1.0, f < 0.001 ? "None" : "%.2f") )
|
||||||
s.session()->setFadingTarget(f);
|
s.session()->setFadingTarget(f);
|
||||||
@@ -651,7 +651,7 @@ void ImGuiVisitor::visit (SessionGroupSource& s)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::Text("Flat Sesion group");
|
ImGui::Text("Flat Sesion group");
|
||||||
|
|
||||||
// info
|
// info
|
||||||
@@ -678,7 +678,7 @@ void ImGuiVisitor::visit (SessionGroupSource& s)
|
|||||||
void ImGuiVisitor::visit (RenderSource& s)
|
void ImGuiVisitor::visit (RenderSource& s)
|
||||||
{
|
{
|
||||||
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::Text("Rendering Output");
|
ImGui::Text("Rendering Output");
|
||||||
if ( ImGui::Button(IMGUI_TITLE_PREVIEW, ImVec2(IMGUI_RIGHT_ALIGN, 0)) )
|
if ( ImGui::Button(IMGUI_TITLE_PREVIEW, ImVec2(IMGUI_RIGHT_ALIGN, 0)) )
|
||||||
Settings::application.widget.preview = true;
|
Settings::application.widget.preview = true;
|
||||||
@@ -687,7 +687,7 @@ void ImGuiVisitor::visit (RenderSource& s)
|
|||||||
void ImGuiVisitor::visit (CloneSource& s)
|
void ImGuiVisitor::visit (CloneSource& s)
|
||||||
{
|
{
|
||||||
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::Text("Clone");
|
ImGui::Text("Clone");
|
||||||
if ( ImGui::Button(s.origin()->name().c_str(), ImVec2(IMGUI_RIGHT_ALIGN, 0)) )
|
if ( ImGui::Button(s.origin()->name().c_str(), ImVec2(IMGUI_RIGHT_ALIGN, 0)) )
|
||||||
Mixer::manager().setCurrentSource(s.origin());
|
Mixer::manager().setCurrentSource(s.origin());
|
||||||
@@ -698,7 +698,7 @@ void ImGuiVisitor::visit (CloneSource& s)
|
|||||||
void ImGuiVisitor::visit (PatternSource& s)
|
void ImGuiVisitor::visit (PatternSource& s)
|
||||||
{
|
{
|
||||||
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::Text("Pattern");
|
ImGui::Text("Pattern");
|
||||||
|
|
||||||
// stream info
|
// stream info
|
||||||
@@ -711,7 +711,7 @@ void ImGuiVisitor::visit (PatternSource& s)
|
|||||||
if ( s.playable() ) {
|
if ( s.playable() ) {
|
||||||
ImVec2 pos = ImGui::GetCursorPos();
|
ImVec2 pos = ImGui::GetCursorPos();
|
||||||
ImGui::SameLine(0, 0);
|
ImGui::SameLine(0, 0);
|
||||||
ImGui::SameLine(0, 10.f + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN);
|
ImGui::SameLine(0, IMGUI_SAME_LINE + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN);
|
||||||
if (ImGuiToolkit::IconButton(ICON_FA_PLAY_CIRCLE, "Open in Player"))
|
if (ImGuiToolkit::IconButton(ICON_FA_PLAY_CIRCLE, "Open in Player"))
|
||||||
UserInterface::manager().showSourceEditor(&s);
|
UserInterface::manager().showSourceEditor(&s);
|
||||||
ImGui::SetCursorPos(pos);
|
ImGui::SetCursorPos(pos);
|
||||||
@@ -738,7 +738,7 @@ void ImGuiVisitor::visit (PatternSource& s)
|
|||||||
void ImGuiVisitor::visit (DeviceSource& s)
|
void ImGuiVisitor::visit (DeviceSource& s)
|
||||||
{
|
{
|
||||||
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::Text("Device");
|
ImGui::Text("Device");
|
||||||
|
|
||||||
ImGui::PushTextWrapPos(ImGui::GetCursorPos().x + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN);
|
ImGui::PushTextWrapPos(ImGui::GetCursorPos().x + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN);
|
||||||
@@ -750,7 +750,7 @@ void ImGuiVisitor::visit (DeviceSource& s)
|
|||||||
if ( s.playable() ) {
|
if ( s.playable() ) {
|
||||||
ImVec2 pos = ImGui::GetCursorPos();
|
ImVec2 pos = ImGui::GetCursorPos();
|
||||||
ImGui::SameLine(0, 0);
|
ImGui::SameLine(0, 0);
|
||||||
ImGui::SameLine(0, 10.f + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN);
|
ImGui::SameLine(0, IMGUI_SAME_LINE + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN);
|
||||||
if (ImGuiToolkit::IconButton(ICON_FA_PLAY_CIRCLE, "Open in Player"))
|
if (ImGuiToolkit::IconButton(ICON_FA_PLAY_CIRCLE, "Open in Player"))
|
||||||
UserInterface::manager().showSourceEditor(&s);
|
UserInterface::manager().showSourceEditor(&s);
|
||||||
ImGui::SetCursorPos(pos);
|
ImGui::SetCursorPos(pos);
|
||||||
@@ -777,7 +777,7 @@ void ImGuiVisitor::visit (DeviceSource& s)
|
|||||||
void ImGuiVisitor::visit (NetworkSource& s)
|
void ImGuiVisitor::visit (NetworkSource& s)
|
||||||
{
|
{
|
||||||
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::Text("Network stream");
|
ImGui::Text("Network stream");
|
||||||
|
|
||||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(IMGUI_COLOR_STREAM, 0.9f));
|
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(IMGUI_COLOR_STREAM, 0.9f));
|
||||||
@@ -794,7 +794,7 @@ void ImGuiVisitor::visit (NetworkSource& s)
|
|||||||
if ( s.playable() ) {
|
if ( s.playable() ) {
|
||||||
ImVec2 pos = ImGui::GetCursorPos();
|
ImVec2 pos = ImGui::GetCursorPos();
|
||||||
ImGui::SameLine(0, 0);
|
ImGui::SameLine(0, 0);
|
||||||
ImGui::SameLine(0, 10.f + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN);
|
ImGui::SameLine(0, IMGUI_SAME_LINE + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN);
|
||||||
if (ImGuiToolkit::IconButton(ICON_FA_PLAY_CIRCLE, "Open in Player"))
|
if (ImGuiToolkit::IconButton(ICON_FA_PLAY_CIRCLE, "Open in Player"))
|
||||||
UserInterface::manager().showSourceEditor(&s);
|
UserInterface::manager().showSourceEditor(&s);
|
||||||
ImGui::SetCursorPos(pos);
|
ImGui::SetCursorPos(pos);
|
||||||
@@ -811,7 +811,7 @@ void ImGuiVisitor::visit (NetworkSource& s)
|
|||||||
void ImGuiVisitor::visit (MultiFileSource& s)
|
void ImGuiVisitor::visit (MultiFileSource& s)
|
||||||
{
|
{
|
||||||
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
ImGuiToolkit::Icon(s.icon().x, s.icon().y);
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::Text("Images sequence");
|
ImGui::Text("Images sequence");
|
||||||
static uint64_t id = 0;
|
static uint64_t id = 0;
|
||||||
|
|
||||||
@@ -825,7 +825,7 @@ void ImGuiVisitor::visit (MultiFileSource& s)
|
|||||||
if ( s.playable() ) {
|
if ( s.playable() ) {
|
||||||
ImVec2 pos = ImGui::GetCursorPos();
|
ImVec2 pos = ImGui::GetCursorPos();
|
||||||
ImGui::SameLine(0, 0);
|
ImGui::SameLine(0, 0);
|
||||||
ImGui::SameLine(0, ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN);
|
ImGui::SameLine(0, IMGUI_SAME_LINE + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN);
|
||||||
if (ImGuiToolkit::IconButton(ICON_FA_PLAY_CIRCLE, "Open in Player"))
|
if (ImGuiToolkit::IconButton(ICON_FA_PLAY_CIRCLE, "Open in Player"))
|
||||||
UserInterface::manager().showSourceEditor(&s);
|
UserInterface::manager().showSourceEditor(&s);
|
||||||
ImGui::SetCursorPos(pos);
|
ImGui::SetCursorPos(pos);
|
||||||
|
|||||||
2
Log.cpp
2
Log.cpp
@@ -261,7 +261,7 @@ void Log::Render(bool *showWarnings)
|
|||||||
if (ImGui::BeginPopupModal("Warning", NULL, ImGuiWindowFlags_AlwaysAutoResize))
|
if (ImGui::BeginPopupModal("Warning", NULL, ImGuiWindowFlags_AlwaysAutoResize))
|
||||||
{
|
{
|
||||||
ImGuiToolkit::Icon(9, 4);
|
ImGuiToolkit::Icon(9, 4);
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::SetNextItemWidth(width);
|
ImGui::SetNextItemWidth(width);
|
||||||
ImGui::TextColored(ImVec4(1.0f,0.6f,0.0f,1.0f), "%ld error(s) occured.\n\n", warnings.size());
|
ImGui::TextColored(ImVec4(1.0f,0.6f,0.0f,1.0f), "%ld error(s) occured.\n\n", warnings.size());
|
||||||
ImGui::Dummy(ImVec2(width, 0));
|
ImGui::Dummy(ImVec2(width, 0));
|
||||||
|
|||||||
@@ -2351,37 +2351,37 @@ void HelperToolbox::Render()
|
|||||||
ImGui::SetColumnWidth(0, width_column0);
|
ImGui::SetColumnWidth(0, width_column0);
|
||||||
ImGui::PushTextWrapPos(width_window );
|
ImGui::PushTextWrapPos(width_window );
|
||||||
|
|
||||||
ImGuiToolkit::Icon(ICON_SOURCE_VIDEO); ImGui::SameLine(0, 10);ImGui::Text("Video"); 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.).");
|
ImGui::Text ("Video file (*.mpg, *mov, *.avi, etc.).");
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGuiToolkit::Icon(ICON_SOURCE_IMAGE); ImGui::SameLine(0, 10);ImGui::Text("Image"); ImGui::NextColumn();
|
ImGuiToolkit::Icon(ICON_SOURCE_IMAGE); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Image"); ImGui::NextColumn();
|
||||||
ImGui::Text ("Image file (*.jpg, *.png, etc.) or vector graphics (*.svg).");
|
ImGui::Text ("Image file (*.jpg, *.png, etc.) or vector graphics (*.svg).");
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGuiToolkit::Icon(ICON_SOURCE_SESSION); ImGui::SameLine(0, 10);ImGui::Text("Session"); ImGui::NextColumn();
|
ImGuiToolkit::Icon(ICON_SOURCE_SESSION); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Session"); ImGui::NextColumn();
|
||||||
ImGui::Text ("Render a session (*.mix) as a source.");
|
ImGui::Text ("Render a session (*.mix) as a source.");
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGuiToolkit::Icon(ICON_SOURCE_SEQUENCE); ImGui::SameLine(0, 10);ImGui::Text("Sequence"); ImGui::NextColumn();
|
ImGuiToolkit::Icon(ICON_SOURCE_SEQUENCE); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Sequence"); ImGui::NextColumn();
|
||||||
ImGui::Text ("Serie of images (*.jpg, *.png, etc.) numbered sequentially.");
|
ImGui::Text ("Serie of images (*.jpg, *.png, etc.) numbered sequentially.");
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGuiToolkit::Icon(ICON_SOURCE_DEVICE); ImGui::SameLine(0, 10);ImGui::Text("Device"); 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.");
|
ImGui::Text ("Connected webcam or frame grabber.");
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGuiToolkit::Icon(ICON_SOURCE_DEVICE_SCREEN); ImGui::SameLine(0, 10);ImGui::Text("Screen"); ImGui::NextColumn();
|
ImGuiToolkit::Icon(ICON_SOURCE_DEVICE_SCREEN); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Screen"); ImGui::NextColumn();
|
||||||
ImGui::Text ("Screen capture.");
|
ImGui::Text ("Screen capture.");
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGuiToolkit::Icon(ICON_SOURCE_NETWORK); ImGui::SameLine(0, 10);ImGui::Text("Network"); ImGui::NextColumn();
|
ImGuiToolkit::Icon(ICON_SOURCE_NETWORK); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Network"); ImGui::NextColumn();
|
||||||
ImGui::Text ("Connected stream from another vimix in the local network (shared output stream).");
|
ImGui::Text ("Connected stream from another vimix in the local network (shared output stream).");
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGuiToolkit::Icon(ICON_SOURCE_PATTERN); ImGui::SameLine(0, 10);ImGui::Text("Pattern"); 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...");
|
ImGui::Text ("Algorithmically generated source; colors, grids, test patterns, timers...");
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGuiToolkit::Icon(ICON_SOURCE_RENDER); ImGui::SameLine(0, 10);ImGui::Text("Rendering"); 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.");
|
ImGui::Text ("Loopback the rendering output as a source.");
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGuiToolkit::Icon(ICON_SOURCE_CLONE); ImGui::SameLine(0, 10);ImGui::Text("Clone"); ImGui::NextColumn();
|
ImGuiToolkit::Icon(ICON_SOURCE_CLONE); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Clone"); ImGui::NextColumn();
|
||||||
ImGui::Text ("Clone a source (original images) into another source.");
|
ImGui::Text ("Clone a source (original images) into another source.");
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGuiToolkit::Icon(ICON_SOURCE_GROUP); ImGui::SameLine(0, 10);ImGui::Text("Group"); ImGui::NextColumn();
|
ImGuiToolkit::Icon(ICON_SOURCE_GROUP); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Group"); ImGui::NextColumn();
|
||||||
ImGui::Text ("Group of sources rendered together after flatten in Layers view.");
|
ImGui::Text ("Group of sources rendered together after flatten in Layers view.");
|
||||||
|
|
||||||
ImGui::Columns(1);
|
ImGui::Columns(1);
|
||||||
@@ -5562,11 +5562,11 @@ void Navigator::RenderTransitionPannel()
|
|||||||
ImGuiToolkit::Spacing();
|
ImGuiToolkit::Spacing();
|
||||||
ImGui::Text("Animation");
|
ImGui::Text("Animation");
|
||||||
if (ImGuiToolkit::ButtonIcon(4, 13)) Settings::application.transition.duration = 1.f;
|
if (ImGuiToolkit::ButtonIcon(4, 13)) Settings::application.transition.duration = 1.f;
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||||
ImGui::SliderFloat("Duration", &Settings::application.transition.duration, TRANSITION_MIN_DURATION, TRANSITION_MAX_DURATION, "%.1f s");
|
ImGui::SliderFloat("Duration", &Settings::application.transition.duration, TRANSITION_MIN_DURATION, TRANSITION_MAX_DURATION, "%.1f s");
|
||||||
if (ImGuiToolkit::ButtonIcon(9, 1)) Settings::application.transition.profile = 0;
|
if (ImGuiToolkit::ButtonIcon(9, 1)) Settings::application.transition.profile = 0;
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||||
ImGui::Combo("Curve", &Settings::application.transition.profile, "Linear\0Quadratic\0");
|
ImGui::Combo("Curve", &Settings::application.transition.profile, "Linear\0Quadratic\0");
|
||||||
|
|
||||||
@@ -5716,7 +5716,7 @@ void SourcePreview::Render(float width)
|
|||||||
}
|
}
|
||||||
// information text
|
// information text
|
||||||
ImGuiToolkit::Icon(source_->icon().x, source_->icon().y);
|
ImGuiToolkit::Icon(source_->icon().x, source_->icon().y);
|
||||||
ImGui::SameLine(0, 10);
|
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||||
ImGui::Text("%s", label_.c_str());
|
ImGui::Text("%s", label_.c_str());
|
||||||
if (source_->ready())
|
if (source_->ready())
|
||||||
ImGui::Text("%d x %d %s", frame->width(), frame->height(), frame->use_alpha() ? "RGBA" : "RGB");
|
ImGui::Text("%d x %d %s", frame->width(), frame->height(), frame->use_alpha() ? "RGBA" : "RGB");
|
||||||
@@ -5820,21 +5820,15 @@ void ShowSandbox(bool* p_open)
|
|||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
static Source *tmp = nullptr;
|
static Source *tmp = nullptr;
|
||||||
// static char buf1[1280] = "videotestsrc pattern=smpte";
|
static char buf1[1280] = "videotestsrc pattern=smpte ! queue ! videoconvert";
|
||||||
// static char buf1[1280] = "udpsrc port=5000 buffer-size=200000 ! h264parse ! avdec_h264";
|
// static char buf1[1280] = "udpsrc port=5000 buffer-size=200000 ! h264parse ! avdec_h264";
|
||||||
static char buf1[1280] = "srtsrc uri=\"srt://192.168.0.37:5000?mode=listener\" ! decodebin ";
|
// static char buf1[1280] = "srtsrc uri=\"srt://192.168.0.37:5000?mode=listener\" ! decodebin ";
|
||||||
ImGui::InputText("gstreamer pipeline", buf1, 1280);
|
ImGui::InputText("gstreamer pipeline", buf1, 1280);
|
||||||
if (ImGui::Button("Create Generic Stream Source") )
|
if (ImGui::Button("Create Generic Stream Source") )
|
||||||
{
|
{
|
||||||
tmp = Mixer::manager().createSourceStream(buf1);
|
tmp = Mixer::manager().createSourceStream(buf1);
|
||||||
Mixer::manager().addSource( tmp );
|
Mixer::manager().addSource( tmp );
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
|
||||||
if ( tmp && ImGui::Button("delete") )
|
|
||||||
{
|
|
||||||
Mixer::manager().deleteSource( tmp );
|
|
||||||
tmp = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
static char str[128] = "";
|
static char str[128] = "";
|
||||||
|
|||||||
@@ -75,6 +75,7 @@
|
|||||||
#define IMGUI_LABEL_RECENT_FILES " Recent files"
|
#define IMGUI_LABEL_RECENT_FILES " Recent files"
|
||||||
#define IMGUI_LABEL_RECENT_RECORDS " Recent recordings"
|
#define IMGUI_LABEL_RECENT_RECORDS " Recent recordings"
|
||||||
#define IMGUI_RIGHT_ALIGN -3.5f * ImGui::GetTextLineHeightWithSpacing()
|
#define IMGUI_RIGHT_ALIGN -3.5f * ImGui::GetTextLineHeightWithSpacing()
|
||||||
|
#define IMGUI_SAME_LINE 10
|
||||||
#define IMGUI_TOP_ALIGN 10
|
#define IMGUI_TOP_ALIGN 10
|
||||||
#define IMGUI_COLOR_OVERLAY IM_COL32(5, 5, 5, 150)
|
#define IMGUI_COLOR_OVERLAY IM_COL32(5, 5, 5, 150)
|
||||||
#define IMGUI_COLOR_LIGHT_OVERLAY IM_COL32(5, 5, 5, 50)
|
#define IMGUI_COLOR_LIGHT_OVERLAY IM_COL32(5, 5, 5, 50)
|
||||||
|
|||||||
Reference in New Issue
Block a user