|
@@ -10,6 +10,7 @@ use crate::{
|
|
|
|
|
|
use super::ObjectCore;
|
|
|
|
|
|
+#[cfg_attr(feature = "default-debug", derive(Debug))]
|
|
|
#[derive(BinRead, BinWrite, Diff, PartialEq)]
|
|
|
#[diff(attr(
|
|
|
#[derive(Debug, PartialEq)]
|
|
@@ -27,6 +28,7 @@ pub struct Rectangle {
|
|
|
}
|
|
|
|
|
|
// Custom Debug implementation to only print known fields
|
|
|
+#[cfg(not(feature = "default-debug"))]
|
|
|
impl Debug for Rectangle {
|
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
|
f.debug_struct("Rectangle")
|
|
@@ -40,3 +42,27 @@ impl Debug for Rectangle {
|
|
|
.finish()
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+impl Default for Rectangle {
|
|
|
+ fn default() -> Self {
|
|
|
+ Self {
|
|
|
+ core: Default::default(),
|
|
|
+ corner_a: Point { x: 0.0, y: 0.0 }.into(),
|
|
|
+ corner_b: Point { x: 0.0, y: 0.0 }.into(),
|
|
|
+ round_bottom_left: 0.0.into(),
|
|
|
+ round_bottom_right: 0.0.into(),
|
|
|
+ round_top_right: 0.0.into(),
|
|
|
+ round_top_left: 0.0.into(),
|
|
|
+ _unknown_1: [
|
|
|
+ vec![0, 0, 0, 0].into(), // 0_u32
|
|
|
+ vec![
|
|
|
+ 0, 0, 0, 0, 0, 0, 240, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 63,
|
|
|
+ ] // ???
|
|
|
+ .into(),
|
|
|
+ ]
|
|
|
+ .into(),
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|