18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-19 22:44:59 +01:00

fix: the copies of the odometer counter (duplicate: yes) drop their offset too

the counter's offset no longer applies once it shows the odometer, the copies of the control which master added
kept theirs and showed it on top
This commit is contained in:
jerrrrycho
2026-11-09 15:54:10 +01:00
parent d53f3cc21a
commit e8735f1564

View File

@@ -58,11 +58,14 @@ public:
// copies of the control animated along with it, from its definitions marked duplicate: yes
std::vector<TGauge> const &mirrors() const {
return m_mirrors; }
// the value shown is value * scale + offset
// the value shown is value * scale + offset. the copies of the control (mirrors()) show the same value, so they
// get the same offset
float offset() const {
return m_offset; }
void offset( float const Offset ) {
m_offset = Offset; }
m_offset = Offset;
for( auto &mirror : m_mirrors ) {
mirror.m_offset = Offset; } }
float scale() const {
return m_scale; }
// returns offset of submodel associated with the button from the model centre