MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / viewportIsFocusedOnEntity

Function viewportIsFocusedOnEntity

src/OpenLoco/src/Ui/Windows/Main.cpp:125–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123 }
124
125 bool viewportIsFocusedOnEntity(const Window& main, EntityId targetEntity)
126 {
127 if (targetEntity == EntityId::null || main.viewports[0] == nullptr)
128 {
129 return false;
130 }
131
132 return main.viewportConfigurations[0].viewportTargetSprite == targetEntity;
133 }
134
135 bool viewportIsFocusedOnAnyEntity(const Window& main)
136 {

Callers 2

onPickupFunction · 0.85
deleteTrainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected