| 28 | } |
| 29 | |
| 30 | void MonitorPanel::notifyCommand(std::string_view /*_name*/, MyGUI::Any _data) |
| 31 | { |
| 32 | std::string* data = _data.castType<std::string>(false); |
| 33 | if (data != nullptr) |
| 34 | { |
| 35 | MyGUI::IResource* base_resource = MyGUI::ResourceManager::getInstance().getByName(*data, false); |
| 36 | if (base_resource != nullptr) |
| 37 | { |
| 38 | ResourceDevice* device = base_resource->castType<ResourceDevice>(false); |
| 39 | if (device != nullptr) |
| 40 | { |
| 41 | mShipImage->setItemName(device->getDeviceName()); |
| 42 | mDescription->setProperty("Caption", device->getDeviceDescription()); |
| 43 | mEnergy->setProperty("RangePosition", MyGUI::utility::toString(device->getValueEnergy())); |
| 44 | mExplosion->setProperty("RangePosition", MyGUI::utility::toString(device->getValueExplosion())); |
| 45 | mTarget->setProperty("RangePosition", MyGUI::utility::toString(device->getValueTarget())); |
| 46 | mHP->setProperty("RangePosition", MyGUI::utility::toString(device->getValueHP())); |
| 47 | } |
| 48 | } |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | } // namespace demo |
nothing calls this directly
no test coverage detected