cushy/examples/cursor-icon.rs
Jonathan Johnson 3e651c2964
CursorIcon + disabled refactoring
Input can now accept focus while disabled, and all controls should do
the right thing with regard to cursor icons now.
2023-11-22 12:06:29 -08:00

25 lines
688 B
Rust

use gooey::value::Dynamic;
use gooey::widget::MakeWidget;
use gooey::widgets::input::InputValue;
use gooey::widgets::Custom;
use gooey::Run;
use kludgine::app::winit::window::CursorIcon;
fn main() -> gooey::Result {
Custom::new(
"Try hovering the mouse cursor around this window"
.and(
Dynamic::new(String::from("Input fields show the text selection cursor"))
.into_input(),
)
.into_rows()
.pad()
.centered(),
)
.on_hover(|_location, _context| Some(CursorIcon::Help))
.on_hit_test(|_location, _context| true)
.contain()
.centered()
.expand()
.run()
}