finally usable state stuff ig

This commit is contained in:
2025-12-08 00:12:30 -05:00
parent 9511b4443b
commit 4aa7219d49
7 changed files with 205 additions and 156 deletions

View File

@@ -1,12 +1,5 @@
use super::*;
use crate::state::{ClientState, LoggedIn};
use iris::{
layout::len_fns::*,
winit::{
attr::{Selectable, Selector},
event::Submit,
},
};
use openworm::net::{ClientMsg, NetClientMsg};
pub const SIZE: u32 = 20;
@@ -18,16 +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);
let bg = (
image(include_bytes!("../assets/fuit.jpg")),
rect(Color::BLACK.alpha((0.8 * 255.0) as u8)),
)
.stack();
(side_bar, msg_panel)
.span(Dir::RIGHT)
.background(bg)
.add(ui)
.any()
(side_bar, msg_panel).span(Dir::RIGHT).add(ui).any()
}
pub fn msg_widget(username: &str, content: &str) -> impl WidgetRet {