Skip to content
Snippets Groups Projects
Commit 466f5867 authored by Martin Štourač's avatar Martin Štourač
Browse files

rename build toolbar components

parent cafe9f88
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@
static const float mode_toolbar_width = 275.0f;
static const float mode_toolbar_height = 40.0f;
static const float build_toolbar_width = 400.0f;
static const float build_toolbar_button_width = 90.0f;
static const float build_toolbar_height = 40.0f;
void show_ui(const osi::Window &window, edit::UIData &data, const double &current_second);
......
......@@ -402,9 +402,15 @@ void mode_II_build_selection_ui(const osi::Window &window, edit::UIData &data)
void build_toolbar_ui(const osi::Window &window, edit::UIData &data)
{
auto window_pos_x =window.size().x * 0.5f - build_toolbar_width * 0.5f;
ImGui::SetNextWindowPos(ImVec2(window_pos_x, window.size().y - build_toolbar_height));
ImGui::SetNextWindowSize(ImVec2( build_toolbar_width, build_toolbar_height));
// auto window_pos_x =window.size().x * 0.5f - build_toolbar_width * 0.5f;
if (data.allowed_components.empty())
return;
float size_x = static_cast<float>(window.size().x);
float size_y = static_cast<float>(window.size().y);
ImGui::SetNextWindowPos(ImVec2(size_x * 0.5f, size_y), ImGuiCond_Always, ImVec2(0.5f, 1.0f));
ImGui::SetNextWindowSize(ImVec2(build_toolbar_button_width * data.allowed_components.size(), build_toolbar_height));
ImGuiWindowFlags window_flags = 0
| ImGuiWindowFlags_NoTitleBar
......@@ -429,11 +435,11 @@ void build_toolbar_buttons(edit::UIData &data)
set_build_toolbar_button_colors(data);
std::map<component, const char*> buttons = {
{component::voxel, "Voxel"},
{component::voxel, "Cube"},
{component::fixed_con, "Fixed"},
{component::open_con, "Open"},
{component::rotation_con, "Rot"},
{component::shared_rotation_con, "Shrd Rot"}
{component::open_con, "RoFICoM"},
{component::rotation_con, "Shoe"},
{component::shared_rotation_con, "Body Joint"}
};
for (auto &comp : data.allowed_components)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment