mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 00:49:19 +02:00
cross event detection also without :, bring highlight on map to front
This commit is contained in:
@@ -59,6 +59,8 @@ bool node_groups::assign_cross_switch(map::track_switch& sw, TTrack* track, std:
|
||||
sw_name.pop_back();
|
||||
|
||||
sw.action[idx] = simulation::Events.FindEvent(sw_name + ":" + id);
|
||||
if (!sw.action[idx])
|
||||
sw.action[idx] = simulation::Events.FindEvent(sw_name + id);
|
||||
|
||||
if (!sw.action[idx])
|
||||
return false;
|
||||
@@ -161,7 +163,7 @@ node_groups::update_map()
|
||||
char lastc = sw_name.back();
|
||||
sw_name.pop_back();
|
||||
|
||||
if (!simulation::Events.FindEvent(sw_name + ":ac"))
|
||||
if (!(simulation::Events.FindEvent(sw_name + ":ac") || simulation::Events.FindEvent(sw_name + "ac")))
|
||||
continue;
|
||||
|
||||
if (!last_switch || last_switch->name != sw_name) {
|
||||
|
||||
@@ -144,11 +144,6 @@ void ui::map_panel::render_map_texture(glm::mat4 transform, glm::vec2 surface_si
|
||||
|
||||
gl33->Draw_Geometry(m_section_handles.begin(), m_section_handles.end());
|
||||
|
||||
glLineWidth(4.0f);
|
||||
scene_ubs.cascade_end = glm::vec4(0.3f, 0.3f, 1.0f, 0.0f);
|
||||
scene_ubo->update(scene_ubs);
|
||||
gl33->Draw_Geometry(m_colored_paths.highlighted.begin(), m_colored_paths.highlighted.end());
|
||||
|
||||
glLineWidth(1.5f);
|
||||
scene_ubs.cascade_end = glm::vec4(0.7f, 0.7f, 0.0f, 0.0f);
|
||||
scene_ubo->update(scene_ubs);
|
||||
@@ -164,6 +159,11 @@ void ui::map_panel::render_map_texture(glm::mat4 transform, glm::vec2 surface_si
|
||||
scene_ubo->update(scene_ubs);
|
||||
gl33->Draw_Geometry(m_colored_paths.occupied.begin(), m_colored_paths.occupied.end());
|
||||
|
||||
glLineWidth(4.0f);
|
||||
scene_ubs.cascade_end = glm::vec4(0.3f, 0.3f, 1.0f, 0.0f);
|
||||
scene_ubo->update(scene_ubs);
|
||||
gl33->Draw_Geometry(m_colored_paths.highlighted.begin(), m_colored_paths.highlighted.end());
|
||||
|
||||
if (!Global.gfx_usegles || GLAD_GL_EXT_geometry_shader) {
|
||||
gl33->Bind_Texture(0, m_icon_atlas);
|
||||
m_poi_shader->bind();
|
||||
|
||||
Reference in New Issue
Block a user