mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 06:19:19 +02:00
feat(editor): fields of work chosen in the toolbar, one at a time: edit modes, tracks, signals, vehicle, roads, terrain; Toolset split into Tool options (tools of the field of work and the gizmo), Inspector (what it has selected: node with array and bend, path, road) and Node bank (list only); Scene window with the models of the scenery by layer and group, filtered by name or uuid, a click selects, a double click flies the camera to it; track window replaced by a palette of the track tools in groups (build, by the track, checks) with the tools under it, the selected path in the inspector, results of the speed, joints and infrastructure checks in a docked window; road window split into the tools in tool options and the selection in the inspector; terrain tools moved out of the editor settings into tool options together with the orthophoto settings (map menu opens them), leaving the terrain puts sculpting and chunk editing away; default layout: tool options and scene on the left, inspector on the right, node bank and checks at the bottom; Polish translation
This commit is contained in:
@@ -598,8 +598,7 @@ void nodebank_panel::render()
|
||||
}
|
||||
else
|
||||
{
|
||||
// mode settings are drawn above the list, so start with a window tall enough for both
|
||||
ImGui::SetNextWindowSize(ImVec2S(440, 640), ImGuiCond_FirstUseEver);
|
||||
ImGui::SetNextWindowSize(ImVec2S(440, 400), ImGuiCond_FirstUseEver);
|
||||
}
|
||||
if (size_min.x > 0)
|
||||
{
|
||||
@@ -619,32 +618,8 @@ void nodebank_panel::render()
|
||||
m_setsopen = !m_setsopen;
|
||||
}
|
||||
|
||||
if (header_sections)
|
||||
{
|
||||
header_sections();
|
||||
}
|
||||
|
||||
// edit modes as tabs, each with its own settings
|
||||
std::pair<char const *, edit_mode> const modes[] = {{STR_C("Select"), MODIFY}, {STR_C("Insert"), ADD}, {STR_C("Brush"), BRUSH}, {STR_C("Area fill"), FILL}, {STR_C("Copy to bank"), COPY}};
|
||||
if (ImGui::BeginTabBar("##editmodes", ImGuiTabBarFlags_FittingPolicyResizeDown))
|
||||
{
|
||||
for (auto const &tab : modes)
|
||||
{
|
||||
if (false == ImGui::BeginTabItem(tab.first, nullptr, requested_mode == tab.second ? ImGuiTabItemFlags_SetSelected : 0))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
mode = tab.second;
|
||||
if (mode_options)
|
||||
{
|
||||
mode_options(mode);
|
||||
}
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
ImGui::EndTabBar();
|
||||
requested_mode = -1;
|
||||
}
|
||||
|
||||
// the edit modes are chosen in the toolbar and set up in the tool options window, the gizmo and the node
|
||||
// properties are in the inspector: what's left here is the node bank itself
|
||||
ImGui::Separator();
|
||||
ImGui::PushItemWidth(-1);
|
||||
ImGui::InputTextWithHint(STR_C("Search"), STR_C("Search node bank"), m_nodesearch, IM_ARRAYSIZE(m_nodesearch));
|
||||
|
||||
Reference in New Issue
Block a user