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

@@ -54,9 +54,16 @@ impl DefaultAppState for Client {
let dir = DataDir::default();
let notif = WidgetPtr::default().add(ui);
let main_ui = WidgetPtr::default().add(ui);
let bg = (
image(include_bytes!("./assets/fuit.jpg")),
rect(Color::BLACK.alpha((0.8 * 255.0) as u8)),
)
.stack();
(
notif.clone().pad(Padding::top(10)).align(Align::TOP_CENTER),
bg,
main_ui.clone(),
notif.clone().pad(Padding::top(10)).align(Align::TOP_CENTER),
)
.stack()
.set_root(ui);
@@ -86,7 +93,7 @@ impl DefaultAppState for Client {
thread: th,
},
});
login_screen(self, ui).set_ptr(&self.main_ui, ui);
// login_screen(self, ui).set_ptr(&self.main_ui, ui);
}
ClientEvent::ServerMsg(msg) => match msg {
ServerMsg::SendMsg(msg) => {