update iris
This commit is contained in:
@@ -11,7 +11,7 @@ pub fn main_view(client: &mut Client, ui: &mut Ui) -> WidgetRef {
|
||||
let msg_panel = msg_panel(ui, state);
|
||||
let side_bar = rect(Color::BLACK.brighter(0.05)).width(80);
|
||||
|
||||
(side_bar, msg_panel).span(Dir::RIGHT).add(ui).any()
|
||||
(side_bar, msg_panel).span(Dir::RIGHT).add(ui)
|
||||
}
|
||||
|
||||
pub fn msg_widget(username: &str, content: &str) -> impl WidgetRet {
|
||||
@@ -36,7 +36,7 @@ pub fn msg_widget(username: &str, content: &str) -> impl WidgetRet {
|
||||
.to_any()
|
||||
}
|
||||
|
||||
pub fn msg_panel(ui: &mut Ui, state: &mut LoggedIn) -> impl WidgetRet + use<> {
|
||||
pub fn msg_panel(ui: &mut Ui, state: &mut LoggedIn) -> WidgetRef {
|
||||
let msg_area = Span::empty(Dir::DOWN).gap(15).add(ui);
|
||||
state.channel = Some(msg_area.clone());
|
||||
|
||||
@@ -65,7 +65,7 @@ pub fn msg_panel(ui: &mut Ui, state: &mut LoggedIn) -> impl WidgetRet + use<> {
|
||||
};
|
||||
state.network.send(ClientMsg::SendMsg(msg.clone()));
|
||||
let msg = msg_widget(&state.username, &content).add(ctx.ui);
|
||||
msg_area.get_mut().children.push(msg.any());
|
||||
msg_area.get_mut().children.push(msg);
|
||||
})
|
||||
.pad(15)
|
||||
.attr::<Selector>(send_text)
|
||||
@@ -78,5 +78,5 @@ pub fn msg_panel(ui: &mut Ui, state: &mut LoggedIn) -> impl WidgetRet + use<> {
|
||||
)
|
||||
.span(Dir::DOWN)
|
||||
.width(rest(1))
|
||||
.to_any()
|
||||
.add(ui)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user