16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 20:39:18 +02:00

Add isolation list to track tooltips

If a track is hovered when debug mode is on, it will now also show the names of isolated circuits the track belongs to, if any.
This commit is contained in:
jakubg1
2025-09-04 03:37:50 +02:00
parent b28ea826c5
commit baadd5f14c
5 changed files with 30 additions and 14 deletions

View File

@@ -30,14 +30,10 @@ editor_ui::update() {
set_tooltip( "" );
if( ( true == Global.ControlPicking )
&& ( true == DebugModeFlag ) ) {
auto const scenerynode = GfxRenderer->Pick_Node();
set_tooltip(
( scenerynode ?
scenerynode->name() :
"" ) );
if( Global.ControlPicking && DebugModeFlag ) {
const auto sceneryNode = GfxRenderer->Pick_Node();
const std::string content = sceneryNode ? sceneryNode->tooltip() : "";
set_tooltip(content);
}
ui_layer::update();