-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moves common messages to RadiantSceneMessage
- Loading branch information
Showing
27 changed files
with
360 additions
and
301 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
use crate::RadiantNode; | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone)] | ||
pub enum RadiantSceneMessage { | ||
AddArtboard {}, | ||
SelectArtboard { | ||
id: u64, | ||
}, | ||
SelectNode { | ||
id: Option<u64>, | ||
}, | ||
TransformNode { | ||
id: u64, | ||
position: [f32; 2], | ||
scale: [f32; 2], | ||
}, | ||
SetTransform { | ||
id: u64, | ||
position: [f32; 2], | ||
scale: [f32; 2], | ||
}, | ||
SetFillColor { | ||
id: u64, | ||
fill_color: epaint::Color32, | ||
}, | ||
SetStrokeColor { | ||
id: u64, | ||
stroke_color: epaint::Color32, | ||
}, | ||
SelectTool { | ||
id: u32, | ||
}, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone)] | ||
pub enum RadiantSceneResponse<M, N: RadiantNode> { | ||
Message(M), | ||
NodeSelected(N), | ||
TransformUpdated { | ||
id: u64, | ||
position: [f32; 2], | ||
scale: [f32; 2], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.