mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-08 16:59:59 +01:00
UI bugfix
This commit is contained in:
@@ -341,36 +341,59 @@ void Handles::accept(Visitor& v)
|
|||||||
|
|
||||||
Symbol::Symbol(Type t, glm::vec3 pos) : Node(), type_(t)
|
Symbol::Symbol(Type t, glm::vec3 pos) : Node(), type_(t)
|
||||||
{
|
{
|
||||||
|
static Mesh *shadow= new Mesh("mesh/border_handles_shadow.ply", "images/soft_shadow.dds");
|
||||||
|
static Mesh *shadows[(int)EMPTY+1] = {nullptr};
|
||||||
static Mesh *icons[(int)EMPTY+1] = {nullptr};
|
static Mesh *icons[(int)EMPTY+1] = {nullptr};
|
||||||
if (icons[0] == nullptr) {
|
if (icons[0] == nullptr) {
|
||||||
icons[CIRCLE_POINT] = new Mesh("mesh/point.ply");
|
icons[CIRCLE_POINT] = new Mesh("mesh/point.ply");
|
||||||
|
shadows[CIRCLE_POINT] = nullptr;
|
||||||
icons[SQUARE_POINT] = new Mesh("mesh/square_point.ply");
|
icons[SQUARE_POINT] = new Mesh("mesh/square_point.ply");
|
||||||
icons[IMAGE] = new Mesh("mesh/icon_image.ply");
|
shadows[SQUARE_POINT] = nullptr;
|
||||||
icons[VIDEO] = new Mesh("mesh/icon_video.ply");
|
icons[IMAGE] = new Mesh("mesh/icon_image.ply");
|
||||||
icons[SESSION] = new Mesh("mesh/icon_vimix.ply");
|
shadows[IMAGE] = shadow;
|
||||||
icons[CLONE] = new Mesh("mesh/icon_clone.ply");
|
icons[VIDEO] = new Mesh("mesh/icon_video.ply");
|
||||||
icons[RENDER] = new Mesh("mesh/icon_render.ply");
|
shadows[VIDEO] = shadow;
|
||||||
icons[PATTERN] = new Mesh("mesh/icon_gear.ply");
|
icons[SESSION] = new Mesh("mesh/icon_vimix.ply");
|
||||||
icons[CAMERA] = new Mesh("mesh/icon_camera.ply");
|
shadows[SESSION]= shadow;
|
||||||
icons[SHARE] = new Mesh("mesh/icon_share.ply");
|
icons[CLONE] = new Mesh("mesh/icon_clone.ply");
|
||||||
icons[DOTS] = new Mesh("mesh/icon_dots.ply");
|
shadows[CLONE] = shadow;
|
||||||
icons[BUSY] = new Mesh("mesh/icon_circles.ply");
|
icons[RENDER] = new Mesh("mesh/icon_render.ply");
|
||||||
icons[LOCK] = new Mesh("mesh/icon_lock.ply");
|
shadows[RENDER] = shadow;
|
||||||
icons[UNLOCK] = new Mesh("mesh/icon_unlock.ply");
|
icons[PATTERN] = new Mesh("mesh/icon_gear.ply");
|
||||||
icons[ARROWS] = new Mesh("mesh/icon_rightarrow.ply");
|
shadows[PATTERN]= shadow;
|
||||||
icons[CIRCLE] = new Mesh("mesh/icon_circle.ply");
|
icons[CAMERA] = new Mesh("mesh/icon_camera.ply");
|
||||||
icons[CLOCK] = new Mesh("mesh/icon_clock.ply");
|
shadows[CAMERA] = shadow;
|
||||||
icons[CLOCK_H] = new Mesh("mesh/icon_clock_hand.ply");
|
icons[SHARE] = new Mesh("mesh/icon_share.ply");
|
||||||
icons[SQUARE] = new Mesh("mesh/icon_square.ply");
|
shadows[SHARE] = shadow;
|
||||||
icons[CROSS] = new Mesh("mesh/icon_cross.ply");
|
icons[DOTS] = new Mesh("mesh/icon_dots.ply");
|
||||||
icons[GRID] = new Mesh("mesh/icon_grid.ply");
|
shadows[DOTS] = nullptr;
|
||||||
icons[EMPTY] = new Mesh("mesh/icon_empty.ply");
|
icons[BUSY] = new Mesh("mesh/icon_circles.ply");
|
||||||
|
shadows[BUSY] = nullptr;
|
||||||
|
icons[LOCK] = new Mesh("mesh/icon_lock.ply");
|
||||||
|
shadows[LOCK] = shadow;
|
||||||
|
icons[UNLOCK] = new Mesh("mesh/icon_unlock.ply");
|
||||||
|
shadows[UNLOCK] = shadow;
|
||||||
|
icons[ARROWS] = new Mesh("mesh/icon_rightarrow.ply");
|
||||||
|
shadows[ARROWS] = shadow;
|
||||||
|
icons[CIRCLE] = new Mesh("mesh/icon_circle.ply");
|
||||||
|
shadows[CIRCLE] = nullptr;
|
||||||
|
icons[CLOCK] = new Mesh("mesh/icon_clock.ply");
|
||||||
|
shadows[CLOCK] = nullptr;
|
||||||
|
icons[CLOCK_H] = new Mesh("mesh/icon_clock_hand.ply");
|
||||||
|
shadows[CLOCK_H]= nullptr;
|
||||||
|
icons[SQUARE] = new Mesh("mesh/icon_square.ply");
|
||||||
|
shadows[SQUARE] = nullptr;
|
||||||
|
icons[CROSS] = new Mesh("mesh/icon_cross.ply");
|
||||||
|
shadows[CROSS] = nullptr;
|
||||||
|
icons[GRID] = new Mesh("mesh/icon_grid.ply");
|
||||||
|
shadows[GRID] = nullptr;
|
||||||
|
icons[EMPTY] = new Mesh("mesh/icon_empty.ply");
|
||||||
|
shadows[EMPTY] = shadow;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Mesh *shadow= new Mesh("mesh/border_handles_shadow.ply", "images/soft_shadow.dds");
|
|
||||||
|
|
||||||
symbol_ = icons[type_];
|
symbol_ = icons[type_];
|
||||||
shadow_ = shadow;
|
shadow_ = shadows[type_];
|
||||||
translation_ = pos;
|
translation_ = pos;
|
||||||
color = glm::vec4( 1.f, 1.f, 1.f, 1.f);
|
color = glm::vec4( 1.f, 1.f, 1.f, 1.f);
|
||||||
}
|
}
|
||||||
@@ -413,7 +436,8 @@ void Symbol::draw(glm::mat4 modelview, glm::mat4 projection)
|
|||||||
// generate matrix
|
// generate matrix
|
||||||
ctm = GlmToolkit::transform(tran, rot, sca);
|
ctm = GlmToolkit::transform(tran, rot, sca);
|
||||||
|
|
||||||
shadow_->draw( ctm, projection );
|
if (shadow_)
|
||||||
|
shadow_->draw( ctm, projection );
|
||||||
symbol_->draw( ctm, projection);
|
symbol_->draw( ctm, projection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -751,6 +751,8 @@ void Mixer::saveas(const std::string& filename)
|
|||||||
|
|
||||||
void Mixer::load(const std::string& filename)
|
void Mixer::load(const std::string& filename)
|
||||||
{
|
{
|
||||||
|
if (filename.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
#ifdef THREADED_LOADING
|
#ifdef THREADED_LOADING
|
||||||
// load only one at a time
|
// load only one at a time
|
||||||
|
|||||||
@@ -829,7 +829,7 @@ void UserInterface::showMenuFile()
|
|||||||
|
|
||||||
if (ImGui::MenuItem( ICON_FA_FILE_UPLOAD " Open", CTRL_MOD "O"))
|
if (ImGui::MenuItem( ICON_FA_FILE_UPLOAD " Open", CTRL_MOD "O"))
|
||||||
selectOpenFilename();
|
selectOpenFilename();
|
||||||
if (ImGui::MenuItem( ICON_FA_FILE_UPLOAD " Re-Open", CTRL_MOD "+Shift+O"))
|
if (ImGui::MenuItem( ICON_FA_FILE_UPLOAD " Reload", CTRL_MOD "+Shift+O"))
|
||||||
Mixer::manager().load( Mixer::manager().session()->filename() );
|
Mixer::manager().load( Mixer::manager().session()->filename() );
|
||||||
|
|
||||||
if (ImGui::MenuItem( ICON_FA_FILE_EXPORT " Import")) {
|
if (ImGui::MenuItem( ICON_FA_FILE_EXPORT " Import")) {
|
||||||
@@ -1040,7 +1040,7 @@ void UserInterface::RenderHistory()
|
|||||||
{
|
{
|
||||||
if ( ImGui::MenuItem( ICON_FA_UNDO " Undo", CTRL_MOD "Z") )
|
if ( ImGui::MenuItem( ICON_FA_UNDO " Undo", CTRL_MOD "Z") )
|
||||||
Action::manager().undo();
|
Action::manager().undo();
|
||||||
if ( ImGui::MenuItem( ICON_FA_REDO " Redo", CTRL_MOD "+Shift Z") )
|
if ( ImGui::MenuItem( ICON_FA_REDO " Redo", CTRL_MOD "Shift+Z") )
|
||||||
Action::manager().redo();
|
Action::manager().redo();
|
||||||
|
|
||||||
ImGui::MenuItem( ICON_FA_DIRECTIONS " Follow view", nullptr, &Settings::application.action_history_follow_view);
|
ImGui::MenuItem( ICON_FA_DIRECTIONS " Follow view", nullptr, &Settings::application.action_history_follow_view);
|
||||||
|
|||||||
Reference in New Issue
Block a user