gizmo: correct context ID ordering

split view: move preset editor and asset browser docks to the bottom as tabbed view
This commit is contained in:
sshumakov3
2020-11-26 16:03:05 +03:00
parent dd245abe31
commit 5687698972
2 changed files with 6 additions and 5 deletions

View File

@@ -215,12 +215,13 @@ void MapView::createGUI()
ads::CDockWidget* asset_browser_dock = new ads::CDockWidget("Asset Browser");
_asset_browser = new noggit::Red::AssetBrowser::Ui::AssetBrowserWidget(this);
//_asset_browser->show();
asset_browser_dock->setWidget(_asset_browser);
_main_window->getDockManager()->addDockWidget(ads::TopDockWidgetArea, asset_browser_dock);
auto dock_area_bottom = _main_window->getDockManager()->addDockWidgetTab(ads::BottomDockWidgetArea, asset_browser_dock);
ads::CDockWidget* preset_editor_dock = new ads::CDockWidget("Preset Editor");
auto preset_editor = new noggit::Red::PresetEditor::Ui::PresetEditorWidget(this);
preset_editor->show();
preset_editor_dock->setWidget(preset_editor);
_main_window->getDockManager()->addDockWidgetTabToArea(preset_editor_dock, dock_area_bottom);
auto overlay = new QWidget(this);
_viewport_overlay_ui = new ::Ui::MapViewOverlay();

View File

@@ -50,6 +50,8 @@ void ViewportGizmo::handleTransformGizmo(const std::vector<selection_type>& sele
WMOInstance* wmo_instance;
ModelInstance* model_instance;
ImGuizmo::SetID(_gizmo_context);
ImGuizmo::SetDrawlist();
ImGuizmo::SetOrthographic(false);
@@ -59,8 +61,6 @@ void ViewportGizmo::handleTransformGizmo(const std::vector<selection_type>& sele
ImGuiIO& io = ImGui::GetIO();
ImGuizmo::SetRect(0, 0, io.DisplaySize.x, io.DisplaySize.y);
ImGuizmo::SetID(_gizmo_context);
math::matrix_4x4 delta_matrix = math::matrix_4x4(math::matrix_4x4::unit).transposed();
math::matrix_4x4 object_matrix = {math::matrix_4x4::unit};
math::matrix_4x4 pivot_matrix = math::matrix_4x4(math::matrix_4x4::translation,