All tools now converted to use new net objects
This commit is contained in:
parent
45ba26446a
commit
7d1671229b
62 changed files with 492 additions and 481 deletions
|
|
@ -21,8 +21,8 @@ TextBoxCanvasComponent::TextBoxCanvasComponent():
|
|||
textBox->set_initial_text_style_modifier(std::make_shared<FontFamiliesTextStyleModifier>(std::vector<SkString>{SkString{"Roboto"}}));
|
||||
}
|
||||
|
||||
CanvasComponent::CompType TextBoxCanvasComponent::get_type() const {
|
||||
return CompType::TEXTBOX;
|
||||
CanvasComponentType TextBoxCanvasComponent::get_type() const {
|
||||
return CanvasComponentType::TEXTBOX;
|
||||
}
|
||||
|
||||
void TextBoxCanvasComponent::save(cereal::PortableBinaryOutputArchive& a) const {
|
||||
|
|
@ -58,6 +58,13 @@ void TextBoxCanvasComponent::load_file(cereal::PortableBinaryInputArchive& a, Ve
|
|||
}
|
||||
}
|
||||
|
||||
void TextBoxCanvasComponent::set_data_from(const CanvasComponent& other) {
|
||||
auto& otherTextBox = static_cast<const TextBoxCanvasComponent&>(other);
|
||||
d = otherTextBox.d;
|
||||
*cursor = *otherTextBox.cursor;
|
||||
textBox->set_rich_text_data(otherTextBox.textBox->get_rich_text_data());
|
||||
}
|
||||
|
||||
void TextBoxCanvasComponent::init_text_box(DrawingProgram& drawP) {
|
||||
textBox->set_font_data(drawP.world.main.fonts); // Getting a segfault relating to the paragraph cache means that the font collection hasn't been set yet
|
||||
textBox->set_width(d.p2.x() - d.p1.x() - TEXTBOX_PADDING * 2.0f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue