create constructors for VmcExtSettingColor

This commit is contained in:
Cassandra de la Cruz-Munoz 2024-01-01 13:50:01 -05:00
parent efe25b28f1
commit 63eed6d8ab
Signed by: cassdlcm
GPG Key ID: BFEBACEA812DDA70

View File

@ -1480,7 +1480,7 @@ impl VmcExtOpt {
}
#[derive(Debug)]
struct VmcExtSettingColor {
pub struct VmcExtSettingColor {
color: Color,
}
@ -1524,6 +1524,18 @@ impl VmcMessage for VmcExtSettingColor {
}
}
impl VmcExtSettingColor {
pub fn new(color: Color) ->MsgNewResult<Self> {
Ok(Self{color})
}
pub fn new_vmc_message(color: Color) -> TraitMsgNewResult {
match Self::new(color) {
Ok(val) => Ok(Box::new(val)),
Err(val) => Err(val),
}
}
}
#[derive(Debug)]
struct VmcExtSettingWin {
is_top_most: bool,