diff --git a/README.md b/README.md index c89405a..e6f6fe7 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,8 @@ very largest homes may not fit. - Packs several environments into one `.fbundle` to share or install together ([bundles](docs/bundles.md)). - Debug views (wireframe, meshes, GPU cost, overdraw), a home report, and the headset's settings and debug page from your desk. +- A navigation gizmo in the viewport corner: drag it to orbit, click an axis to snap to that view. +- Themes, from dark to light, drawn from the MetaDB palette (**Window > Theme**). ## Guides diff --git a/docs/studio-guide.md b/docs/studio-guide.md index 2ad37e5..77b503e 100644 --- a/docs/studio-guide.md +++ b/docs/studio-guide.md @@ -46,6 +46,9 @@ Layout** puts everything back; **Ctrl+Space** fills the window with the 3D Viewp (a big view with Properties on the World tab) and **Headset** (Properties on the Headset tab). Studio remembers your layout between runs. +**Themes.** **Window > Theme** recolours the whole interface, from dark to light, using the palette from the MetaDB +site. The choice is saved and comes back next time. + ## Opening a home - **File > Open...** (Ctrl+O), or drop a file on the window. It opens: @@ -61,7 +64,8 @@ your layout between runs. | Do this | With | |---|---| -| Orbit | middle-drag, or Alt + left-drag | +| Orbit | middle-drag, Alt + left-drag, or drag the axes gizmo in the top-right corner | +| Snap to a view (top, front, side...) | click an axis ball on the gizmo (or the Numpad: 1/3/7 front/side/top, Ctrl for the opposite) | | Pan | Shift + middle-drag | | Zoom | mouse wheel, or Ctrl + middle-drag | | Fly | hold the right mouse button + W A S D, Q / E down / up (wheel: speed, Shift: 4x) | diff --git a/studio/studio.cpp b/studio/studio.cpp index 3fe4de7..c2cc8d5 100644 --- a/studio/studio.cpp +++ b/studio/studio.cpp @@ -4907,10 +4907,12 @@ struct Studio { const ImVec2 p = ImGui::GetCursorScreenPos(); if (ImGui::InvisibleButton("##tab", ImVec2(side, side))) inspectorTab = t.tab; const bool on = inspectorTab == t.tab, hot = ImGui::IsItemHovered(); - if (on) dl->AddRectFilled(ImVec2(p.x - 3 * scale, p.y), ImVec2(p.x + side + (colW - side) * 0.5f + 1, p.y + side), col(kPanel), 5 * scale, - ImDrawFlags_RoundCornersLeft); - else if (hot) dl->AddRectFilled(p, ImVec2(p.x + side, p.y + side), col(kWidget), 5 * scale); - drawToolIcon(dl, t.icon, ImVec2(p.x + side * 0.5f, p.y + side * 0.5f), side * 0.6f, col(on ? 0xffffff : 0xb0b0b0)); + if (on) { + dl->AddRectFilled(ImVec2(p.x - 3 * scale, p.y), ImVec2(p.x + side + (colW - side) * 0.5f + 1, p.y + side), col(kPanel), 5 * scale, + ImDrawFlags_RoundCornersLeft); + dl->AddRectFilled(ImVec2(p.x - 3 * scale, p.y + 3 * scale), ImVec2(p.x - 3 * scale + 2.5f * scale, p.y + side - 3 * scale), col(kBlue), 1); // accent: which tab is open + } else if (hot) dl->AddRectFilled(p, ImVec2(p.x + side, p.y + side), col(kWidget), 5 * scale); + drawToolIcon(dl, t.icon, ImVec2(p.x + side * 0.5f, p.y + side * 0.5f), side * 0.6f, col(on ? kText : hot ? kText : kDim)); if (hot) ImGui::SetTooltip("%s", t.tip); ImGui::PopID(); ImGui::SetCursorPosX((colW - side) * 0.5f); @@ -6777,7 +6779,12 @@ struct Studio { if (ImGui::MenuItem("The Home's Meshes", nullptr, showMeshes)) { showMeshes = !showMeshes; refreshVisibility(); } ImGui::EndPopup(); } - ImGui::SameLine(0, 8 * scale); + { // a divider: the overlay toggle is one thing, the shading modes another + ImGui::SameLine(0, 7 * scale); + const ImVec2 p = ImGui::GetCursorScreenPos(); + ImGui::GetWindowDrawList()->AddLine(ImVec2(p.x, p.y + 4 * scale), ImVec2(p.x, p.y + fh - 4 * scale), col(kLine)); + ImGui::SameLine(0, 7 * scale); + } // Blender's shading spheres: wire, solid, material auto sphere = [&](ImDrawList* d, ImVec2 c, float r, int kind) { if (kind == 0) {