create constructors for VmcExtSettingColor
This commit is contained in:
parent
efe25b28f1
commit
63eed6d8ab
14
src/lib.rs
14
src/lib.rs
|
@ -1480,7 +1480,7 @@ impl VmcExtOpt {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct VmcExtSettingColor {
|
pub struct VmcExtSettingColor {
|
||||||
color: Color,
|
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)]
|
#[derive(Debug)]
|
||||||
struct VmcExtSettingWin {
|
struct VmcExtSettingWin {
|
||||||
is_top_most: bool,
|
is_top_most: bool,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user