Updated behavior navigator pannel and menu. Updated icons.
@@ -158,6 +158,34 @@ bool ImGuiToolkit::ButtonIconToggle(int i, int j, int i_toggle, int j_toggle, bo
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
bool ImGuiToolkit::IconToggle(int i, int j, int i_toggle, int j_toggle, bool* toggle)
|
||||
{
|
||||
// bool ret = false;
|
||||
ImGui::PushID( i * 20 + j + i_toggle * 20 + j_toggle);
|
||||
|
||||
float frame_height = ImGui::GetFrameHeight();
|
||||
float frame_width = frame_height;
|
||||
ImVec2 draw_pos = ImGui::GetCursorScreenPos();
|
||||
|
||||
// toggle action : operate on the whole area
|
||||
ImGui::InvisibleButton("##icontoggle", ImVec2(frame_width, frame_height));
|
||||
if (ImGui::IsItemClicked())
|
||||
*toggle = !*toggle;
|
||||
|
||||
ImGui::SetCursorScreenPos(draw_pos);
|
||||
if (*toggle) {
|
||||
Icon(i_toggle, j_toggle);
|
||||
}
|
||||
else {
|
||||
Icon(i, j);
|
||||
}
|
||||
|
||||
ImGui::PopID();
|
||||
return *toggle;
|
||||
}
|
||||
|
||||
|
||||
struct Sum
|
||||
{
|
||||
void operator()(std::pair<int, int> n) { sum += n.first * 20 + n.second; }
|
||||
|
||||
@@ -15,19 +15,20 @@ namespace ImGuiToolkit
|
||||
void ShowIconsWindow(bool* p_open);
|
||||
|
||||
// utility buttons
|
||||
bool ButtonIcon(int i, int j);
|
||||
bool ButtonIconToggle(int i, int j, int i_toggle, int j_toggle, bool* toggle);
|
||||
bool ButtonIconMultistate(std::vector<std::pair<int, int> > icons, int* state);
|
||||
void ButtonToggle( const char* label, bool* toggle );
|
||||
void ButtonSwitch(const char* label, bool* toggle , const char *help = nullptr);
|
||||
void ButtonOpenUrl( const char* url, const ImVec2& size_arg = ImVec2(0,0));
|
||||
bool ButtonIcon (int i, int j);
|
||||
bool ButtonIconToggle (int i, int j, int i_toggle, int j_toggle, bool* toggle);
|
||||
bool ButtonIconMultistate (std::vector<std::pair<int, int> > icons, int* state);
|
||||
void ButtonToggle (const char* label, bool* toggle );
|
||||
void ButtonSwitch (const char* label, bool* toggle , const char *help = nullptr);
|
||||
bool IconToggle (int i, int j, int i_toggle, int j_toggle, bool* toggle);
|
||||
void ButtonOpenUrl (const char* url, const ImVec2& size_arg = ImVec2(0,0));
|
||||
|
||||
void HelpMarker(const char* desc);
|
||||
void HelpMarker (const char* desc);
|
||||
|
||||
// utility sliders
|
||||
void Bar(float value, float in, float out, float min, float max, const char* title, bool expand);
|
||||
bool TimelineSlider(const char* label, guint64 *time, guint64 duration, guint64 step);
|
||||
bool TimelineSliderEdit(const char* label, guint64 *time, guint64 duration, guint64 step,
|
||||
void Bar (float value, float in, float out, float min, float max, const char* title, bool expand);
|
||||
bool TimelineSlider (const char* label, guint64 *time, guint64 duration, guint64 step);
|
||||
bool TimelineSliderEdit (const char* label, guint64 *time, guint64 duration, guint64 step,
|
||||
std::list<std::pair<guint64, guint64> >& segments);
|
||||
|
||||
// fonts from ressources 'fonts/'
|
||||
@@ -38,8 +39,8 @@ namespace ImGuiToolkit
|
||||
FONT_MONO,
|
||||
FONT_LARGE
|
||||
} font_style;
|
||||
void SetFont(font_style type, const std::string &ttf_font_name, int pointsize, int oversample = 2);
|
||||
void PushFont(font_style type);
|
||||
void SetFont (font_style type, const std::string &ttf_font_name, int pointsize, int oversample = 2);
|
||||
void PushFont (font_style type);
|
||||
|
||||
// color of gui items
|
||||
typedef enum {
|
||||
@@ -47,10 +48,10 @@ namespace ImGuiToolkit
|
||||
ACCENT_ORANGE,
|
||||
ACCENT_GREY
|
||||
} accent_color;
|
||||
void SetAccentColor(accent_color color);
|
||||
struct ImVec4 GetHighlightColor();
|
||||
void SetAccentColor (accent_color color);
|
||||
struct ImVec4 GetHighlightColor ();
|
||||
|
||||
void ShowStats(bool* p_open, int* p_corner);
|
||||
void ShowStats (bool* p_open, int* p_corner);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -292,6 +292,7 @@ void Mixer::insertSource(Source *s)
|
||||
layer_.setDepth(s);
|
||||
|
||||
// update view to show source created
|
||||
setCurrentView(View::MIXING);
|
||||
current_view_->update(0);
|
||||
current_view_->restoreSettings();
|
||||
}
|
||||
|
||||
@@ -74,6 +74,8 @@ void PickingVisitor::visit(Handles &n)
|
||||
if (!n.visible_)
|
||||
return;
|
||||
|
||||
// TODO fixme !
|
||||
|
||||
// apply inverse transform to the point of interest
|
||||
glm::vec4 P = glm::inverse(modelview_) * glm::vec4( point_, 0.f, 1.f );
|
||||
|
||||
@@ -110,7 +112,7 @@ void PickingVisitor::visit(Handles &n)
|
||||
}
|
||||
|
||||
if ( picked )
|
||||
// add this surface to the nodes picked
|
||||
// add this to the nodes picked
|
||||
nodes_.push_back( std::pair(&n, glm::vec2(P)) );
|
||||
|
||||
}
|
||||
|
||||
@@ -374,13 +374,17 @@ void UserInterface::handleMouse()
|
||||
Mixer::manager().currentView()->scene.accept(pv);
|
||||
|
||||
// picking visitor found nodes?
|
||||
if (pv.picked().empty())
|
||||
if (pv.picked().empty()) {
|
||||
Mixer::manager().unsetCurrentSource();
|
||||
navigator.hidePannel();
|
||||
}
|
||||
else {
|
||||
// top-most Node picked
|
||||
pick = pv.picked().back();
|
||||
// find source containing the cliced Node
|
||||
Mixer::manager().setCurrentSource( pick.first );
|
||||
if (navigator.pannelVisible())
|
||||
navigator.showPannelSource( Mixer::manager().indexCurrentSource() );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -391,7 +395,7 @@ void UserInterface::handleMouse()
|
||||
}
|
||||
if ( ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left) )
|
||||
{
|
||||
// display the info on source in left pannel
|
||||
// display source in left pannel
|
||||
navigator.showPannelSource( Mixer::manager().indexCurrentSource() );
|
||||
}
|
||||
|
||||
@@ -890,52 +894,55 @@ void UserInterface::RenderShaderEditor()
|
||||
|
||||
Navigator::Navigator()
|
||||
{
|
||||
clearSelection();
|
||||
selected_source_index = -1;
|
||||
width = 100;
|
||||
pannel_width = 5.f * width;
|
||||
height = 100;
|
||||
padding_width = 100;
|
||||
// default geometry
|
||||
width_ = 100;
|
||||
pannel_width_ = 5.f * width_;
|
||||
height_ = 100;
|
||||
padding_width_ = 100;
|
||||
new_source_type_ = 0;
|
||||
sprintf(new_source_filename_, " ");
|
||||
|
||||
// clean start
|
||||
clearButtonSelection();
|
||||
}
|
||||
|
||||
void Navigator::toggle(int index)
|
||||
void Navigator::applyButtonSelection(int index)
|
||||
{
|
||||
bool s = selected_button[index];
|
||||
clearSelection();
|
||||
selected_button[index] = s;
|
||||
if (s)
|
||||
selected_source_index = index;
|
||||
else
|
||||
selected_source_index = -1;
|
||||
// ensure only one button is active at a time
|
||||
bool status = selected_button[index];
|
||||
clearButtonSelection();
|
||||
selected_button[index] = status;
|
||||
|
||||
// set visible if button is active
|
||||
pannel_visible_ = status;
|
||||
}
|
||||
|
||||
void Navigator::clearSelection()
|
||||
void Navigator::clearButtonSelection()
|
||||
{
|
||||
// clear all buttons
|
||||
for(int i=0; i<NAV_COUNT; ++i)
|
||||
selected_button[i] = false;
|
||||
|
||||
// clear new source pannel
|
||||
sprintf(new_source_filename_, " ");
|
||||
new_source_preview_.setSource();
|
||||
}
|
||||
|
||||
void Navigator::showPannelSource(int index)
|
||||
{
|
||||
selected_source_index = index;
|
||||
selected_button[index] = true;
|
||||
applyButtonSelection(index);
|
||||
}
|
||||
|
||||
void Navigator::toggleMenu()
|
||||
{
|
||||
bool previous = selected_button[NAV_MENU];
|
||||
hidePannel();
|
||||
selected_button[NAV_MENU] = !previous;
|
||||
selected_button[NAV_MENU] = !selected_button[NAV_MENU];
|
||||
applyButtonSelection(NAV_MENU);
|
||||
}
|
||||
|
||||
void Navigator::hidePannel()
|
||||
{
|
||||
clearSelection();
|
||||
selected_source_index = -1;
|
||||
clearButtonSelection();
|
||||
pannel_visible_ = false;
|
||||
}
|
||||
|
||||
void Navigator::Render()
|
||||
@@ -951,25 +958,25 @@ void Navigator::Render()
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_SelectableTextAlign, ImVec2(0.50f, 0.50f));
|
||||
|
||||
// calculate size of items based on text size and display dimensions
|
||||
width = 2.f * ImGui::GetTextLineHeightWithSpacing(); // dimension of left bar depends on FONT_LARGE
|
||||
pannel_width = 5.f * width; // pannel is 5x the bar
|
||||
padding_width = 2.f * style.WindowPadding.x; // panning for alighment
|
||||
height = io.DisplaySize.y; // cover vertically
|
||||
sourcelist_height = height - 6.f * ImGui::GetTextLineHeight(); // space for 3 icons of view
|
||||
float icon_width = width - 2.f * style.WindowPadding.x; // icons keep padding
|
||||
width_ = 2.f * ImGui::GetTextLineHeightWithSpacing(); // dimension of left bar depends on FONT_LARGE
|
||||
pannel_width_ = 5.f * width_; // pannel is 5x the bar
|
||||
padding_width_ = 2.f * style.WindowPadding.x; // panning for alighment
|
||||
height_ = io.DisplaySize.y; // cover vertically
|
||||
sourcelist_height_ = height_ - 6.f * ImGui::GetTextLineHeight(); // space for 3 icons of view
|
||||
float icon_width = width_ - 2.f * style.WindowPadding.x; // icons keep padding
|
||||
ImVec2 iconsize(icon_width, icon_width);
|
||||
|
||||
// Left bar top
|
||||
ImGui::SetNextWindowPos( ImVec2(0, 0), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowSize( ImVec2(width, sourcelist_height), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowSize( ImVec2(width_, sourcelist_height_), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowBgAlpha(0.95f); // Transparent background
|
||||
if (ImGui::Begin("##navigator", NULL, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav))
|
||||
{
|
||||
// the "=" icon for menu
|
||||
if (ImGui::Selectable( ICON_FA_BARS, &selected_button[NAV_MENU], 0, iconsize))
|
||||
{
|
||||
Mixer::manager().unsetCurrentSource();
|
||||
toggle(NAV_MENU);
|
||||
// Mixer::manager().unsetCurrentSource();
|
||||
applyButtonSelection(NAV_MENU);
|
||||
}
|
||||
// the list of INITIALS for sources
|
||||
int index = 0;
|
||||
@@ -988,9 +995,9 @@ void Navigator::Render()
|
||||
// draw select box
|
||||
if (ImGui::Selectable( (*iter)->initials(), &selected_button[index], 0, iconsize))
|
||||
{
|
||||
toggle(index);
|
||||
applyButtonSelection(index);
|
||||
if (selected_button[index])
|
||||
Mixer::manager().setCurrentSource(selected_source_index);
|
||||
Mixer::manager().setCurrentSource(index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -998,15 +1005,15 @@ void Navigator::Render()
|
||||
if (ImGui::Selectable( ICON_FA_PLUS, &selected_button[NAV_NEW], 0, iconsize))
|
||||
{
|
||||
Mixer::manager().unsetCurrentSource();
|
||||
toggle(NAV_NEW);
|
||||
applyButtonSelection(NAV_NEW);
|
||||
}
|
||||
|
||||
}
|
||||
ImGui::End();
|
||||
|
||||
// Left bar bottom
|
||||
ImGui::SetNextWindowPos( ImVec2(0, sourcelist_height), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowSize( ImVec2(width, height - sourcelist_height), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowPos( ImVec2(0, sourcelist_height_), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowSize( ImVec2(width_, height_ - sourcelist_height_), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowBgAlpha(0.95f); // Transparent background
|
||||
if (ImGui::Begin("##navigatorViews", NULL, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav))
|
||||
{
|
||||
@@ -1030,38 +1037,25 @@ void Navigator::Render()
|
||||
ImGui::PopStyleVar();
|
||||
ImGui::PopFont();
|
||||
|
||||
// window menu
|
||||
if (selected_button[NAV_MENU])
|
||||
{
|
||||
// if a source is selected in the meantime, revert to selected source pannel
|
||||
if (Mixer::manager().indexCurrentSource() > -1 )
|
||||
selected_button[NAV_MENU] = false;
|
||||
else
|
||||
if (pannel_stick_ || pannel_visible_){
|
||||
// pannel menu
|
||||
if (selected_button[NAV_MENU])
|
||||
{
|
||||
RenderMainPannel();
|
||||
}
|
||||
// window to create a source
|
||||
else if (selected_button[NAV_NEW])
|
||||
{
|
||||
// if a source is selected in the meantime, revert to selected source pannel
|
||||
if (Mixer::manager().indexCurrentSource() > -1 )
|
||||
selected_button[NAV_NEW] = false;
|
||||
else
|
||||
// show new source pannel
|
||||
}
|
||||
// pannel to create a source
|
||||
else if (selected_button[NAV_NEW])
|
||||
{
|
||||
RenderNewPannel();
|
||||
}
|
||||
// window to configure a selected source
|
||||
else if (selected_source_index > -1)
|
||||
{
|
||||
// manipulate current source, and activate corresponding button
|
||||
clearSelection();
|
||||
selected_button[Mixer::manager().indexCurrentSource()] = true;
|
||||
Source *s = Mixer::manager().currentSource();
|
||||
if (s)
|
||||
RenderSourcePannel(s);
|
||||
}
|
||||
// pannel to configure a selected source
|
||||
else
|
||||
selected_source_index = -1;
|
||||
}
|
||||
|
||||
{
|
||||
Source *s = Mixer::manager().currentSource();
|
||||
if (s)
|
||||
RenderSourcePannel(s);
|
||||
}
|
||||
}
|
||||
ImGui::PopStyleColor(2);
|
||||
ImGui::PopStyleVar();
|
||||
|
||||
@@ -1071,19 +1065,23 @@ void Navigator::Render()
|
||||
void Navigator::RenderSourcePannel(Source *s)
|
||||
{
|
||||
// Next window is a side pannel
|
||||
ImGui::SetNextWindowPos( ImVec2(width, 0), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowSize( ImVec2(pannel_width, height), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowPos( ImVec2(width_, 0), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowSize( ImVec2(pannel_width_, height_), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowBgAlpha(0.85f); // Transparent background
|
||||
if (ImGui::Begin("##navigatorSource", NULL, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav))
|
||||
{
|
||||
// TITLE
|
||||
ImGui::SetCursorPosY(10);
|
||||
ImGuiToolkit::PushFont(ImGuiToolkit::FONT_LARGE);
|
||||
ImGui::Text("Source");
|
||||
ImGui::Text("");
|
||||
ImGui::PopFont();
|
||||
|
||||
ImGui::SetCursorPos(ImVec2(pannel_width_ - 35.f, 10.f));
|
||||
ImGuiToolkit::IconToggle(13,11,11,11,&pannel_stick_);
|
||||
|
||||
static char buf5[128];
|
||||
sprintf ( buf5, "%s", s->name().c_str() );
|
||||
ImGui::SetCursorPosY(80);
|
||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||
if (ImGui::InputText("Name", buf5, 64, ImGuiInputTextFlags_CharsNoBlank)){
|
||||
Mixer::manager().renameSource(s, buf5);
|
||||
@@ -1148,17 +1146,18 @@ void SourcePreview::draw(float width)
|
||||
void Navigator::RenderNewPannel()
|
||||
{
|
||||
// Next window is a side pannel
|
||||
ImGui::SetNextWindowPos( ImVec2(width, 0), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowSize( ImVec2(pannel_width, height), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowPos( ImVec2(width_, 0), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowSize( ImVec2(pannel_width_, height_), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowBgAlpha(0.85f); // Transparent background
|
||||
if (ImGui::Begin("##navigatorNewSource", NULL, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav))
|
||||
{
|
||||
// TITLE
|
||||
ImGui::SetCursorPosY(10);
|
||||
ImGuiToolkit::PushFont(ImGuiToolkit::FONT_LARGE);
|
||||
ImGui::Text("New Source");
|
||||
ImGui::Text("");
|
||||
ImGui::PopFont();
|
||||
|
||||
ImGui::SetCursorPosY(80);
|
||||
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
|
||||
ImGui::Combo("Origin", &new_source_type_, "File\0Software\0Hardware\0");
|
||||
|
||||
@@ -1166,7 +1165,7 @@ void Navigator::RenderNewPannel()
|
||||
if (new_source_type_ == 0) {
|
||||
|
||||
// helper
|
||||
ImGui::SetCursorPosX(pannel_width - 30 + IMGUI_RIGHT_ALIGN);
|
||||
ImGui::SetCursorPosX(pannel_width_ - 30 + IMGUI_RIGHT_ALIGN);
|
||||
ImGuiToolkit::HelpMarker("Create a source from a file:\n- Video (*.mpg, *mov, *.avi, etc.)\n- Image (*.jpg, *.png, etc.)\n- Vector graphics (*.svg)\n- vimix session (*.vmx)\n\nEquivalent to dropping the file in the workspace.");
|
||||
|
||||
// browse for a filename
|
||||
@@ -1203,7 +1202,7 @@ void Navigator::RenderNewPannel()
|
||||
// show preview
|
||||
new_source_preview_.draw(ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN);
|
||||
// or press Validate button
|
||||
if ( ImGui::Button("Import", ImVec2(pannel_width - padding_width, 0)) ) {
|
||||
if ( ImGui::Button("Import", ImVec2(pannel_width_ - padding_width_, 0)) ) {
|
||||
Mixer::manager().insertSource(new_source_preview_.getSource());
|
||||
selected_button[NAV_NEW] = false;
|
||||
}
|
||||
@@ -1213,7 +1212,7 @@ void Navigator::RenderNewPannel()
|
||||
else if (new_source_type_ == 1){
|
||||
|
||||
// helper
|
||||
ImGui::SetCursorPosX(pannel_width - 30 + IMGUI_RIGHT_ALIGN);
|
||||
ImGui::SetCursorPosX(pannel_width_ - 30 + IMGUI_RIGHT_ALIGN);
|
||||
ImGuiToolkit::HelpMarker("Create a source from a software algorithm or from vimix objects.");
|
||||
|
||||
// fill new_source_preview with a new source
|
||||
@@ -1239,7 +1238,7 @@ void Navigator::RenderNewPannel()
|
||||
// show preview
|
||||
new_source_preview_.draw(ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN);
|
||||
// ask to import the source in the mixer
|
||||
if ( ImGui::Button("Import", ImVec2(pannel_width - padding_width, 0)) ) {
|
||||
if ( ImGui::Button("Import", ImVec2(pannel_width_ - padding_width_, 0)) ) {
|
||||
Mixer::manager().insertSource(new_source_preview_.getSource());
|
||||
// reset for next time
|
||||
selected_button[NAV_NEW] = false;
|
||||
@@ -1249,7 +1248,7 @@ void Navigator::RenderNewPannel()
|
||||
// Hardware
|
||||
else {
|
||||
// helper
|
||||
ImGui::SetCursorPosX(pannel_width - 30 + IMGUI_RIGHT_ALIGN);
|
||||
ImGui::SetCursorPosX(pannel_width_ - 30 + IMGUI_RIGHT_ALIGN);
|
||||
ImGuiToolkit::HelpMarker("Create a source capturing images from an external hardware.");
|
||||
}
|
||||
|
||||
@@ -1261,20 +1260,21 @@ void Navigator::RenderNewPannel()
|
||||
void Navigator::RenderMainPannel()
|
||||
{
|
||||
// Next window is a side pannel
|
||||
ImGui::SetNextWindowPos( ImVec2(width, 0), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowSize( ImVec2(pannel_width, height), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowPos( ImVec2(width_, 0), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowSize( ImVec2(pannel_width_, height_), ImGuiCond_Always );
|
||||
ImGui::SetNextWindowBgAlpha(0.85f); // Transparent background
|
||||
if (ImGui::Begin("##navigatorMain", NULL, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav))
|
||||
{
|
||||
// TITLE
|
||||
ImGui::SetCursorPosY(10);
|
||||
ImGuiToolkit::PushFont(ImGuiToolkit::FONT_LARGE);
|
||||
ImGui::Text(APP_NAME);
|
||||
ImGui::Text("");
|
||||
ImGui::PopFont();
|
||||
|
||||
ImGui::SetCursorPosY(80);
|
||||
ImGui::Text("Session");
|
||||
ImGui::SameLine();
|
||||
ImGui::SetCursorPosX(pannel_width IMGUI_RIGHT_ALIGN);
|
||||
ImGui::SetCursorPosX(pannel_width_ IMGUI_RIGHT_ALIGN);
|
||||
if (ImGui::BeginMenu("File"))
|
||||
{
|
||||
UserInterface::manager().showMenuFile();
|
||||
@@ -1321,16 +1321,16 @@ void Navigator::RenderMainPannel()
|
||||
if ( ImGui::Combo("Accent", &Settings::application.accent_color, "Blue\0Orange\0Grey\0\0"))
|
||||
ImGuiToolkit::SetAccentColor(static_cast<ImGuiToolkit::accent_color>(Settings::application.accent_color));
|
||||
|
||||
// Bottom aligned
|
||||
// Bottom aligned Logo
|
||||
static unsigned int vimixicon = Resource::getTextureImage("images/v-mix_256x256.png");
|
||||
static float h = 4.f * ImGui::GetTextLineHeightWithSpacing();
|
||||
if ( ImGui::GetCursorPosY() + h + 128.f < height ) {
|
||||
ImGui::SetCursorPos(ImVec2(pannel_width / 2.f - 64.f, height -h - 128.f));
|
||||
if ( ImGui::GetCursorPosY() + h + 128.f < height_ ) {
|
||||
ImGui::SetCursorPos(ImVec2(pannel_width_ / 2.f - 64.f, height_ -h - 128.f));
|
||||
ImGui::Image((void*)(intptr_t)vimixicon, ImVec2(128, 128));
|
||||
ImGui::Text("");
|
||||
}
|
||||
else {
|
||||
ImGui::SetCursorPosY(height -h);
|
||||
ImGui::SetCursorPosY(height_ -h);
|
||||
ImGui::Text("About");
|
||||
}
|
||||
if ( ImGui::Button( ICON_FA_CROW " About vimix", ImVec2(ImGui::GetContentRegionAvail().x, 0)) )
|
||||
|
||||
@@ -30,24 +30,25 @@ public:
|
||||
|
||||
class Navigator
|
||||
{
|
||||
// geometry left bar
|
||||
float width;
|
||||
float pannel_width;
|
||||
float height;
|
||||
float sourcelist_height;
|
||||
float padding_width;
|
||||
// geometry left bar & pannel
|
||||
float width_;
|
||||
float height_;
|
||||
float pannel_width_;
|
||||
float sourcelist_height_;
|
||||
float padding_width_;
|
||||
|
||||
// top items : group of buttons openning a pannel
|
||||
int selected_source_index;
|
||||
// behavior pannel
|
||||
bool pannel_visible_;
|
||||
bool pannel_stick_;
|
||||
bool selected_button[NAV_COUNT];
|
||||
void clearSelection();
|
||||
void toggle(int index);
|
||||
void clearButtonSelection();
|
||||
void applyButtonSelection(int index);
|
||||
|
||||
// side pannels
|
||||
void RenderSourcePannel(Source *s);
|
||||
void RenderNewPannel();
|
||||
void RenderMainPannel();
|
||||
|
||||
void RenderNewPannel();
|
||||
int new_source_type_;
|
||||
char new_source_filename_[2048];
|
||||
|
||||
@@ -56,11 +57,12 @@ class Navigator
|
||||
public:
|
||||
Navigator();
|
||||
|
||||
void toggleMenu();
|
||||
bool pannelVisible() { return pannel_visible_; }
|
||||
void hidePannel();
|
||||
void showPannelSource(int index);
|
||||
void Render();
|
||||
void toggleMenu();
|
||||
|
||||
void Render();
|
||||
};
|
||||
|
||||
class ToolBox
|
||||
|
||||
30
rsc/mesh/icon_empty.ply
Normal file
@@ -0,0 +1,30 @@
|
||||
ply
|
||||
format ascii 1.0
|
||||
comment Created by Blender 2.82 (sub 7) - www.blender.org, source file: 'icons.blend'
|
||||
element vertex 8
|
||||
property float x
|
||||
property float y
|
||||
property float z
|
||||
property uchar red
|
||||
property uchar green
|
||||
property uchar blue
|
||||
property uchar alpha
|
||||
element face 8
|
||||
property list uchar uint vertex_indices
|
||||
end_header
|
||||
-0.122248 -0.092391 0.000000 255 255 255 255
|
||||
-0.101952 0.069939 0.000000 255 255 255 255
|
||||
-0.122248 0.090230 0.000000 255 255 255 255
|
||||
0.121299 0.090230 0.000000 255 255 255 255
|
||||
0.101003 0.069939 0.000000 255 255 255 255
|
||||
0.121299 -0.092391 0.000000 255 255 255 255
|
||||
-0.101952 -0.072100 0.000000 255 255 255 255
|
||||
0.101003 -0.072100 0.000000 255 255 255 255
|
||||
3 0 1 2
|
||||
3 1 3 2
|
||||
3 1 4 3
|
||||
3 4 5 3
|
||||
3 0 6 1
|
||||
3 7 5 4
|
||||
3 0 7 6
|
||||
3 0 5 7
|
||||
@@ -1 +1,15 @@
|
||||
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd"><path d="M18 18h-12c-3.311 0-6-2.689-6-6s2.689-6 6-6h12.039c3.293.021 5.961 2.701 5.961 6 0 3.311-2.688 6-6 6zm0-10h-12c-2.208 0-4 1.792-4 4s1.792 4 4 4h12c2.208 0 4-1.792 4-4 0-2.199-1.778-3.986-3.974-4h-.026zm-12 1c1.656 0 3 1.344 3 3s-1.344 3-3 3-3-1.344-3-3 1.344-3 3-3z"/></svg>
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="32px"
|
||||
height="24px" viewBox="0 0 32 24" style="enable-background:new 0 0 32 24;" xml:space="preserve">
|
||||
<g id="Layer_1">
|
||||
</g>
|
||||
<g id="eye">
|
||||
<g>
|
||||
<path style="fill:#010101;" d="M16,0C7.164,0,0,11.844,0,11.844S7.164,24,16,24s16-12.156,16-12.156S24.836,0,16,0z M16,20
|
||||
c-4.418,0-8-3.582-8-8s3.582-8,8-8s8,3.582,8,8S20.418,20,16,20z"/>
|
||||
<circle style="fill:#010101;" cx="16" cy="12.016" r="4"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 386 B After Width: | Height: | Size: 787 B |
@@ -1 +1,69 @@
|
||||
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd"><path d="M18 18h-12c-3.311 0-6-2.689-6-6s2.689-6 6-6h12.039c3.293.021 5.961 2.701 5.961 6 0 3.311-2.688 6-6 6zm0-10h-12c-2.208 0-4 1.792-4 4s1.792 4 4 4h12c2.208 0 4-1.792 4-4 0-2.199-1.778-3.986-3.974-4h-.026zm-6 1c1.656 0 3 1.344 3 3s-1.344 3-3 3-3-1.344-3-3 1.344-3 3-3z"/></svg>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
width="32px"
|
||||
height="32px"
|
||||
viewBox="0 0 32 32"
|
||||
style="enable-background:new 0 0 32 32;"
|
||||
xml:space="preserve"
|
||||
id="svg6"
|
||||
sodipodi:docname="iconmonstr-control-panel-22.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><metadata
|
||||
id="metadata12"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs10" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="2167"
|
||||
inkscape:window-height="1159"
|
||||
id="namedview8"
|
||||
showgrid="false"
|
||||
inkscape:zoom="20.85965"
|
||||
inkscape:cx="9.2931333"
|
||||
inkscape:cy="17.909737"
|
||||
inkscape:window-x="76"
|
||||
inkscape:window-y="30"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="pin" />
|
||||
<g
|
||||
id="Layer_1">
|
||||
</g>
|
||||
<g
|
||||
id="pin">
|
||||
<path
|
||||
style="fill:#010101"
|
||||
d="m 15.96875,3.96875 c -6.629,0 -12,5.371 -12,12 0,2.527 0.7890937,4.866875 2.1210938,6.796875 l 1.3046874,1.695313 1.8945313,1.476562 c 1.9100005,1.281 4.2066875,2.03125 6.6796875,2.03125 6.629,0 12,-5.371 12,-12 0,-0.346 -0.06956,-0.669812 -0.101562,-1.007812 -0.167261,-1.123229 -0.519301,-2.520288 -1.152344,-3.935547 A 4.1947012,3.9789739 0 0 1 23.259766,12.871094 4.1947012,3.9789739 0 0 1 18.986328,9.0078125 4.1947012,3.9789739 0 0 1 21.396484,5.296875 C 20.174468,4.6866971 18.750522,4.2464826 17.0625,4.0859375 c 0,-0.002 0.0039,-0.00386 0.0039,-0.00586 -0.367,-0.035 -0.722656,-0.1113281 -1.097656,-0.1113281 z m 0.03516,3.984375 C 16.003906,7.969125 16,7.984 16,8 c 0,0.695 0.11725,1.3550469 0.28125,1.9980469 l -3.171875,3.1738281 c -1.562,1.562 -1.562,4.09425 0,5.65625 1.562,1.562 4.09425,1.562 5.65625,0 L 21.90625,15.6875 c 0.66,0.18 1.343594,0.304594 2.058594,0.308594 -0.016,4.402 -3.594094,7.972656 -7.996094,7.972656 -4.414,0 -8,-3.586 -8,-8 0,-4.412 3.586,-8 8,-8 0.012,0 0.02325,0.00391 0.03125,0.00391 0,-0.008 0.0039,-0.013531 0.0039,-0.019531 z"
|
||||
id="path3"
|
||||
inkscape:connector-curvature="0" />
|
||||
<g
|
||||
id="g839"
|
||||
transform="translate(-0.7552564,0.947015)"><g
|
||||
id="Layer_1-3">
|
||||
</g><g
|
||||
id="pin-6">
|
||||
<path
|
||||
id="path825"
|
||||
d="M 32,8 C 32,3.584 28.414,0 24,0 21.016,0 18.438,1.658 17.062,4.086 17.062,4.084 17.0665,4.07766 17.066,4.08 14.43433,15.330967 20.781593,15.971292 27.579363,14.913061 30.245749,14.497976 32,11.006 32,8 Z m -8,4 c -2.203,0 -4,-1.795 -4,-4 0,-2.205 1.797,-4 4,-4 2.203,0 4,1.795 4,4 0,2.205 -1.797,4 -4,4 z"
|
||||
style="fill:#010101"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="sscssssssss" />
|
||||
</g></g></g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 385 B After Width: | Height: | Size: 3.2 KiB |
@@ -1 +1,17 @@
|
||||
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd"><path d="M6 18h12c3.311 0 6-2.689 6-6s-2.689-6-6-6h-12.039c-3.293.021-5.961 2.701-5.961 6 0 3.311 2.688 6 6 6zm0-10h12c2.208 0 4 1.792 4 4s-1.792 4-4 4h-12c-2.208 0-4-1.792-4-4 0-2.199 1.778-3.986 3.974-4h.026zm12 1c-1.656 0-3 1.344-3 3s1.344 3 3 3 3-1.344 3-3-1.344-3-3-3z"/></svg>
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="32px"
|
||||
height="32px" viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
|
||||
<g id="Layer_1">
|
||||
</g>
|
||||
<g id="pin">
|
||||
<path style="fill:#010101;" d="M32,8c0-4.416-3.586-8-8-8c-2.984,0-5.562,1.658-6.938,4.086c0-0.002,0.004-0.004,0.004-0.006
|
||||
c-0.367-0.035-0.723-0.111-1.098-0.111c-6.629,0-12,5.371-12,12c0,2.527,0.789,4.867,2.121,6.797L0,32l9.289-6.062
|
||||
c1.91,1.281,4.207,2.031,6.68,2.031c6.629,0,12-5.371,12-12c0-0.346-0.07-0.67-0.102-1.008C30.32,13.594,32,11.006,32,8z
|
||||
M15.969,23.969c-4.414,0-8-3.586-8-8c0-4.412,3.586-8,8-8c0.012,0,0.023,0.004,0.031,0.004c0-0.008,0.004-0.014,0.004-0.02
|
||||
C16.004,7.969,16,7.984,16,8c0,0.695,0.117,1.355,0.281,1.998l-3.172,3.174c-1.562,1.562-1.562,4.094,0,5.656s4.094,1.562,5.656,0
|
||||
l3.141-3.141c0.66,0.18,1.344,0.305,2.059,0.309C23.949,20.398,20.371,23.969,15.969,23.969z M24,12c-2.203,0-4-1.795-4-4
|
||||
s1.797-4,4-4s4,1.795,4,4S26.203,12,24,12z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 385 B After Width: | Height: | Size: 1.3 KiB |
@@ -1 +1,60 @@
|
||||
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" xmlns:serif="http://www.serif.com/" fill-rule="evenodd" clip-rule="evenodd"><path serif:id="shape 18" d="M12 23.999h-12l6.871.001 5.129-.001m12 0h-12l5.12.001 6.88-.001m-12-24c-8.635.006-12.032 3.352-12 12-.032 8.647 3.365 11.993 12 12 8.635-.007 12.032-3.353 12-12 .032-8.648-3.365-11.994-12-12m-5.129-.001l-6.871.001h12l-5.129-.001m10.249 0l-5.12.001h12l-6.88-.001m-5.12 2.001c3.873.003 6.368.699 7.853 2.19 1.479 1.486 2.162 3.965 2.147 7.817.015 3.837-.668 6.316-2.147 7.802-1.485 1.492-3.981 2.188-7.852 2.191-3.873-.003-6.369-.699-7.854-2.191-1.479-1.486-2.161-3.965-2.147-7.817-.014-3.837.668-6.316 2.147-7.802 1.485-1.491 3.98-2.187 7.853-2.19"/></svg>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:serif="http://www.serif.com/"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="24"
|
||||
height="24"
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="iconmonstr-shape-18.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1419"
|
||||
inkscape:window-height="1346"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="27.812867"
|
||||
inkscape:cx="13.744098"
|
||||
inkscape:cy="7.0276084"
|
||||
inkscape:window-x="551"
|
||||
inkscape:window-y="271"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
serif:id="shape 22"
|
||||
d="M 12.00014,3.2542373 3.3559322,12.000729 12.00014,20.745763 20.645068,12.000729 Z M 8.7735349,12.000729 12.072049,8.6957815 15.299374,11.964774 12.00014,15.053994 Z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#000000;fill-opacity:1;stroke-width:0.72456974"
|
||||
sodipodi:nodetypes="cccccccccc" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 723 B After Width: | Height: | Size: 1.9 KiB |
@@ -1 +1,58 @@
|
||||
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" xmlns:serif="http://www.serif.com/" fill-rule="evenodd" clip-rule="evenodd"><path serif:id="shape 22" d="M12 0l-12 12.001 12 11.999 12.001-11.999-12.001-12.001zm-9.171 12.001l9.171-9.172 9.172 9.172-9.172 9.172-9.171-9.172z"/></svg>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:serif="http://www.serif.com/"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="24"
|
||||
height="24"
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="iconmonstr-shape-22.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1286"
|
||||
inkscape:window-height="947"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="9.8333333"
|
||||
inkscape:cx="0.45762712"
|
||||
inkscape:cy="12"
|
||||
inkscape:window-x="551"
|
||||
inkscape:window-y="271"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
serif:id="shape 22"
|
||||
d="M 12.00014,3.2542373 3.3559322,12.000729 12.00014,20.745763 20.645068,12.000729 Z M 5.3938042,12.000729 12.00014,5.3160508 18.607196,12.000729 12.00014,18.685407 Z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="stroke-width:0.72456974" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 295 B After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.7 MiB After Width: | Height: | Size: 3.7 MiB |