New overlay system that reimplements how overlays are drawn (#418)

* New overlay system that reimplements how overlays are drawn

* Fix overlay message declaration

* Fix small mistake

* WIP (broken) changes to plumb the overlay document

* Fix confusion over messaging system architecture

* Removed log

* Overlay system working

* (broken) WIP overlay association

* Finish the overlay system (except test failure)

* Change back IDs in test

* Fixed test, but stilled fails due to revealed real problem with layer reordering selection

* Disable broken test that has a bug in issue #444

Co-authored-by: Dennis <dennis@kobert.dev>
Co-authored-by: otdavies <oliver@psyfer.io>
This commit is contained in:
Keavon Chambers
2021-12-30 09:48:39 -08:00
parent 1a70667f63
commit eb96eafe60
22 changed files with 416 additions and 313 deletions

View File

@@ -220,6 +220,7 @@ impl Default for Mapping {
entry! {action=DocumentMessage::ExportDocument, key_down=KeyE, modifiers=[KeyControl]},
entry! {action=DocumentMessage::SaveDocument, key_down=KeyS, modifiers=[KeyControl]},
entry! {action=DocumentMessage::SaveDocument, key_down=KeyS, modifiers=[KeyControl, KeyShift]},
entry! {action=DocumentMessage::DebugPrintDocument, key_down=Key9},
// Initiate Transform Layers
entry! {action=TransformLayerMessage::BeginGrab, key_down=KeyG},
entry! {action=TransformLayerMessage::BeginRotate, key_down=KeyR},

View File

@@ -112,6 +112,16 @@ impl MessageHandler<InputPreprocessorMessage, ()> for InputPreprocessor {
}
.into(),
);
responses.push_back(
DocumentMessage::Overlay(
graphene::Operation::TransformLayer {
path: vec![],
transform: glam::DAffine2::from_translation(translation).to_cols_array(),
}
.into(),
)
.into(),
);
}
}
};