add fuit background
This commit is contained in:
BIN
src/bin/client/assets/fuit.jpg
Normal file
BIN
src/bin/client/assets/fuit.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
@@ -30,8 +30,13 @@ pub fn main_view(client: &mut Client, network: NetSender) -> WidgetId {
|
|||||||
let msg_panel = msg_panel(client, network);
|
let msg_panel = msg_panel(client, network);
|
||||||
let side_bar = rect(Color::BLACK.brighter(0.05)).width(80);
|
let side_bar = rect(Color::BLACK.brighter(0.05)).width(80);
|
||||||
|
|
||||||
|
let bg = (
|
||||||
|
image(include_bytes!("./assets/fuit.jpg")),
|
||||||
|
rect(Color::BLACK.alpha((0.8 * 255.0) as u8)),
|
||||||
|
).stack();
|
||||||
(side_bar, msg_panel)
|
(side_bar, msg_panel)
|
||||||
.span(Dir::RIGHT)
|
.span(Dir::RIGHT)
|
||||||
|
.background(bg)
|
||||||
.add(&mut client.ui)
|
.add(&mut client.ui)
|
||||||
.any()
|
.any()
|
||||||
}
|
}
|
||||||
@@ -145,7 +150,7 @@ pub fn focus_other(id: WidgetId<TextEdit>) -> impl Fn(&mut Client, CursorData) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn msg_panel(client: &mut Client, network: NetSender) -> impl WidgetFn<Stack> + use<> {
|
pub fn msg_panel(client: &mut Client, network: NetSender) -> impl WidgetFn<Sized> + use<> {
|
||||||
let Client { ui, channel, .. } = client;
|
let Client { ui, channel, .. } = client;
|
||||||
let msg_area = Span::empty(Dir::DOWN).gap(15).add(ui);
|
let msg_area = Span::empty(Dir::DOWN).gap(15).add(ui);
|
||||||
*channel = Some(msg_area.clone());
|
*channel = Some(msg_area.clone());
|
||||||
@@ -186,5 +191,5 @@ pub fn msg_panel(client: &mut Client, network: NetSender) -> impl WidgetFn<Stack
|
|||||||
)
|
)
|
||||||
.span(Dir::DOWN)
|
.span(Dir::DOWN)
|
||||||
.width(rest(1))
|
.width(rest(1))
|
||||||
.background(rect(Color::BLACK.brighter(0.1)))
|
// .background(rect(Color::BLACK.brighter(0.1)))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user