rs_sb3/
comment.rs

1//! Module to deal with Scratch comment
2
3use crate::prelude::*;
4
5/// Adjustable textboxes that can be attached to [`crate::block::Block`]s, or left floating
6#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)]
7#[serde(rename_all = "camelCase")]
8pub struct Comment {
9    /// The ID of the block the comment is attached to.
10    pub block_id: Option<Uid>,
11
12    /// The x-coordinate of the comment in the code area.
13    pub x: Option<Number>,
14
15    /// The y-coordinate of the comment in the code area.
16    pub y: Option<Number>,
17
18    /// The width.
19    pub width: Number,
20
21    /// The height.
22    pub height: Number,
23
24    /// True if the comment is collapsed and false otherwise.
25    pub minimized: bool,
26
27    /// The text.
28    pub text: Text,
29}