start account ui

This commit is contained in:
2025-12-07 00:32:48 -05:00
parent a1928edb66
commit f9376eb6d4
4 changed files with 47 additions and 16 deletions

View File

@@ -37,14 +37,23 @@ pub fn submit_button(
text: &str,
on_submit: impl Fn(&mut Client, &mut Ui) + 'static,
) -> impl WidgetRet {
let color = Color::GREEN;
let color = Color::rgb(0, 200, 0);
rect(color)
.radius(15)
.on(CursorSense::click(), move |ctx| {
ctx.ui[ctx.id].color = color.darker(0.3);
ctx.ui[ctx.id].color = color.darker(0.2);
on_submit(ctx.state, ctx.ui);
})
.height(40)
.foreground(wtext(text).size(20).text_align(Align::CENTER))
.on(
CursorSense::HoverStart | CursorSense::unclick(),
move |ctx| {
ctx.ui[ctx.id].color = color.brighter(0.1);
},
)
.on(CursorSense::HoverEnd, move |ctx| {
ctx.ui[ctx.id].color = color;
})
.height(60)
.foreground(wtext(text).size(25).text_align(Align::CENTER))
.to_any()
}