mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-03 06:35:21 +01:00
merge: staging (6a716b67) into pr/brush: the brush kept beside the track names list in CMakeLists.txt, the unit tests and editor_pl.po
This commit is contained in:
@@ -20,6 +20,8 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "application/editorgestures.h"
|
||||
#include "scene/scenenodegroups.h"
|
||||
#include "application/editoruilayer.h"
|
||||
#include "physics/vehicle.h"
|
||||
#include "vehicle/DynObj.h"
|
||||
#ifndef _WIN32
|
||||
#include <spawn.h>
|
||||
#include <unistd.h>
|
||||
@@ -584,7 +586,16 @@ editor_mode::editor_mode() {
|
||||
ui()->set_open_scenery([this]() { m_openscenery_asked = true; });
|
||||
ui()->set_memcell_focus([this](scene::basic_node *Node) { start_focus(Node); });
|
||||
ui()->set_edit_menu([this]() { render_edit_menu(); });
|
||||
ui()->set_tools_menu([this]() { render_track_presets_menu(); });
|
||||
ui()->set_tools_menu([this]() {
|
||||
render_track_presets_menu();
|
||||
if (ImGui::MenuItem(STR_C("Track names outside of ASCII..."), nullptr, m_track_names_open))
|
||||
{
|
||||
check_track_names(false);
|
||||
m_track_names_open = true;
|
||||
}
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("%s", STR_C("The tracks whose names have Polish letters or other characters outside of ASCII, and what an ASCII name would collide with; nothing is changed"));
|
||||
});
|
||||
ui()->set_menu_options([this]() {
|
||||
render_object_menu();
|
||||
render_view_menu();
|
||||
@@ -1678,6 +1689,7 @@ bool editor_mode::update()
|
||||
m_gauge.update();
|
||||
m_gauge.render_windows();
|
||||
m_minimap.render_windows();
|
||||
render_track_names_window();
|
||||
|
||||
// roads: trajectories of the lanes, and the tools of the road window
|
||||
update_road_tool();
|
||||
@@ -7562,7 +7574,7 @@ void editor_mode::enter()
|
||||
auto const *vehicle = Camera.m_owner;
|
||||
if (vehicle)
|
||||
{
|
||||
const int cab = vehicle->MoverParameters->CabOccupied == 0 ? 1 : vehicle->MoverParameters->CabOccupied;
|
||||
const int cab = vehicle->physics->CabOccupied() == 0 ? 1 : vehicle->physics->CabOccupied();
|
||||
const glm::dvec3 left = vehicle->VectorLeft() * (double)cab;
|
||||
Camera.Pos = glm::dvec3(Camera.Pos.x, vehicle->GetPosition().y, Camera.Pos.z) + left * vehicle->GetWidth() + glm::dvec3(1.25f * left.x, 1.6f, 1.25f * left.z);
|
||||
Camera.m_owner = nullptr;
|
||||
@@ -7575,6 +7587,7 @@ void editor_mode::enter()
|
||||
if (Global.editor_session && false == m_opened_at_track)
|
||||
{
|
||||
m_opened_at_track = true;
|
||||
check_track_names(true);
|
||||
auto const saved{scene::Layers.empty() ? std::vector<std::string>{} : scene::Layers.marked(scene::layer_handle{1}, "//$c")};
|
||||
if (false == saved.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user