| | |
| | | |
| | | for (int nRow = 0; nRow < SIGNAL_GRID_ROWS; ++nRow) { |
| | | for (int nCol = 0; nCol < SIGNAL_GRID_COLS; ++nCol) { |
| | | BOOL bCurrentState = m_pEquipment->isLinkSignalOn(nRow, nCol); |
| | | BOOL bCurrentState = m_pEquipment->isLinkSignalUpstreamOn(nRow, nCol); |
| | | UpdateSignalState(nRow, nCol, bCurrentState); |
| | | } |
| | | } |
| | |
| | | int index = nRow * SIGNAL_GRID_COLS + nCol; |
| | | if (index >= 0 && index < (int)m_vSignalList.size() && m_vSignalList[index].bClickable && m_pEquipment != nullptr) { |
| | | // 读取当前状态并切换 |
| | | const BOOL bCurrentState = m_pEquipment->isLinkSignalOn(nRow, nCol); |
| | | m_pEquipment->setLinkSignal(nRow, nCol, !bCurrentState); |
| | | const BOOL bCurrentState = m_pEquipment->isLinkSignalUpstreamOn(nRow, nCol); |
| | | m_pEquipment->setLinkSignalUpstream(nRow, nCol, !bCurrentState); |
| | | } |
| | | }); |
| | | |