All tools now converted to use new net objects

This commit is contained in:
Yousef Khadadeh 2025-12-15 15:36:42 +03:00
parent 45ba26446a
commit 7d1671229b
62 changed files with 492 additions and 481 deletions

View file

@ -9,8 +9,8 @@
#include "../DrawCollision.hpp"
#include "CanvasComponentContainer.hpp"
CanvasComponent::CompType ImageCanvasComponent::get_type() const {
return CompType::IMAGE;
CanvasComponentType ImageCanvasComponent::get_type() const {
return CanvasComponentType::IMAGE;
}
void ImageCanvasComponent::save(cereal::PortableBinaryOutputArchive& a) const {
@ -48,6 +48,11 @@ void ImageCanvasComponent::draw_download_progress_bar(SkCanvas* canvas, const Dr
}
}
void ImageCanvasComponent::set_data_from(const CanvasComponent& other) {
auto& otherImage = static_cast<const ImageCanvasComponent&>(other);
d = otherImage.d;
}
void ImageCanvasComponent::draw(SkCanvas* canvas, const DrawData& drawData) const {
ResourceDisplay* display = drawData.rMan->get_display_data(d.imageID);
if(display)