diff --git a/data/layout.xml b/data/layout.xml index fad33e0..30830af 100644 --- a/data/layout.xml +++ b/data/layout.xml @@ -1429,18 +1429,6 @@ Here's a list of what's available in this release. - - - - - - - - - - - - @@ -1462,37 +1450,49 @@ Here's a list of what's available in this release. - - + + - + - + - + - + - - + + - - + + + + + + + + + + + + + + - + @@ -1510,7 +1510,7 @@ Here's a list of what's available in this release. - + @@ -1642,14 +1642,16 @@ Here's a list of what's available in this release. + - - + + diff --git a/src/app.h b/src/app.h index 771018b..4732277 100644 --- a/src/app.h +++ b/src/app.h @@ -173,7 +173,7 @@ public: void init_menu_file(); void init_menu_edit(); void init_menu_layer(); - void init_menu_experimental(); + void init_menu_tools(); void init_menu_about(); void dialog_usermanual(); void dialog_changelog(); diff --git a/src/app_layout.cpp b/src/app_layout.cpp index 1b4913e..779a42c 100644 --- a/src/app_layout.cpp +++ b/src/app_layout.cpp @@ -697,45 +697,19 @@ void App::init_menu_edit() popup->m_mouse_ignore = false; popup->m_flood_events = true; popup->m_capture_children = false; - - popup->find("clear-grids")->on_click = [this, popup](Node*) { - CanvasModeGrid* mode = (CanvasModeGrid*)Canvas::modes[(int)kCanvasMode::Grid][0]; - mode->clear(); - popup->mouse_release(); - popup->destroy(); - }; - - popup->find("camera-reset")->on_click = [this, popup](Node*) { - canvas->reset_camera(); - popup->mouse_release(); - popup->destroy(); - }; - - popup->find("clear-presets")->on_click = [this, popup](Node*) { - auto mb = message_box("Clear Presets", "Do you want to remove all the Brush Presets?", true); - mb->btn_ok->m_text->set_text("Yes"); - mb->btn_cancel->m_text->set_text("No"); - mb->btn_ok->on_click = mb->on_submit = [this,mb](Node*) { - presets->clear_brushes(); - presets->save(); - mb->destroy(); - }; - popup->mouse_release(); - popup->destroy(); - }; }; } } -void App::init_menu_experimental() +void App::init_menu_tools() { auto main = layout[main_id]; - if (auto menu_exp = main->find("menu-experimental")) + if (auto menu_exp = main->find("menu-tools")) { menu_exp->on_click = [this, menu_exp, main](Node*) { glm::vec2 pos = menu_exp->m_pos + glm::vec2(0, menu_exp->m_size.y); - auto popup_exp = (NodePopupMenu*)layout[const_hash("experimental-menu")]->m_children[0]->clone(); + auto popup_exp = (NodePopupMenu*)layout[const_hash("tools-menu")]->m_children[0]->clone(); popup_exp->update(); if (YGNodeStyleGetDirection(layout[main_id]->y_node) == YGDirectionRTL) pos.x = pos.x - popup_exp->m_size.x + menu_exp->m_size.x; @@ -748,9 +722,9 @@ void App::init_menu_experimental() popup_exp->m_flood_events = true; popup_exp->m_capture_children = false; - if (auto tick = popup_exp->find("experimental-timelapse-tick")) tick->on_click = [this, popup_exp](Node* b) + if (auto tick = popup_exp->find("tools-timelapse-tick")) tick->on_click = [this, popup_exp](Node* b) { - if (auto menu_time = popup_exp->find("experimental-timelapse")) + if (auto menu_time = popup_exp->find("tools-timelapse")) { glm::vec2 pos = b->m_pos + glm::vec2(b->m_size.x, 0); auto popup_time = (NodePopupMenu*)layout[const_hash("timelapse-menu")]->m_children[0]->clone(); @@ -794,9 +768,9 @@ void App::init_menu_experimental() } }; - if (auto tick = popup_exp->find("experimental-panels-tick")) tick->on_click = [this, popup_exp](Node* b) + if (auto tick = popup_exp->find("tools-panels-tick")) tick->on_click = [this, popup_exp](Node* b) { - if (auto menu_time = popup_exp->find("experimental-panels")) + if (auto menu_time = popup_exp->find("tools-panels")) { glm::vec2 pos = b->m_pos + glm::vec2(b->m_size.x, 0); auto popup_time = (NodePopupMenu*)layout[const_hash("panels-menu")]->m_children[0]->clone(); @@ -955,37 +929,37 @@ void App::init_menu_experimental() } }; - if (auto rtl_btn = popup_exp->find("experimental-rtl")) + if (auto rtl_btn = popup_exp->find("tools-rtl")) { auto ui = main->find("central-row"); - NodeCheckBox* cb = rtl_btn->find("experimental-rtl-check"); + NodeCheckBox* cb = rtl_btn->find("tools-rtl-check"); cb->set_value(ui->GetRTL() == YGDirectionRTL, false); rtl_btn->on_click = [this, popup_exp, rtl_btn](Node* b) { - NodeCheckBox* cb = rtl_btn->find("experimental-rtl-check"); + NodeCheckBox* cb = rtl_btn->find("tools-rtl-check"); cb->set_value(!cb->checked, true); }; - rtl_btn->find("experimental-rtl-check")->on_value_changed = [this, main](Node*, bool checked) + rtl_btn->find("tools-rtl-check")->on_value_changed = [this, main](Node*, bool checked) { auto ui = main->find("central-row"); ui->SetRTL(checked ? YGDirectionRTL : YGDirectionLTR); }; } - if (auto vr_btn = popup_exp->find("experimental-vr")) + if (auto vr_btn = popup_exp->find("tools-vr")) { - NodeCheckBox* cb = vr_btn->find("experimental-vr-check"); + NodeCheckBox* cb = vr_btn->find("tools-vr-check"); cb->set_value(has_vr); vr_btn->on_click = [this, popup_exp, vr_btn](Node* b) { - NodeCheckBox* cb = vr_btn->find("experimental-vr-check"); + NodeCheckBox* cb = vr_btn->find("tools-vr-check"); cb->set_value(!cb->checked, true); }; - vr_btn->find("experimental-vr-check")->on_value_changed = [this, main](Node* target, bool checked) + vr_btn->find("tools-vr-check")->on_value_changed = [this, main](Node* target, bool checked) { if (checked) { @@ -1002,7 +976,33 @@ void App::init_menu_experimental() } }; } - }; + + popup_exp->find("clear-grids")->on_click = [this, popup_exp](Node*) { + CanvasModeGrid* mode = (CanvasModeGrid*)Canvas::modes[(int)kCanvasMode::Grid][0]; + mode->clear(); + popup_exp->mouse_release(); + popup_exp->destroy(); + }; + + popup_exp->find("camera-reset")->on_click = [this, popup_exp](Node*) { + canvas->reset_camera(); + popup_exp->mouse_release(); + popup_exp->destroy(); + }; + + popup_exp->find("clear-presets")->on_click = [this, popup_exp](Node*) { + auto mb = message_box("Clear Presets", "Do you want to remove all the Brush Presets?", true); + mb->btn_ok->m_text->set_text("Yes"); + mb->btn_cancel->m_text->set_text("No"); + mb->btn_ok->on_click = mb->on_submit = [this, mb](Node*) { + presets->clear_brushes(); + presets->save(); + mb->destroy(); + }; + popup_exp->mouse_release(); + popup_exp->destroy(); + }; +}; } } @@ -1234,7 +1234,7 @@ void App::initLayout() init_menu_file(); init_menu_edit(); init_menu_layer(); - init_menu_experimental(); + init_menu_tools(); init_menu_about(); // set version string