From 9708d731992be2f24cfd229a28eedf642a8dee0f Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Fri, 27 Oct 2023 23:58:12 +0400 Subject: Init of the game resource viewer --- resource-viewer/src/main.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 resource-viewer/src/main.rs (limited to 'resource-viewer/src') diff --git a/resource-viewer/src/main.rs b/resource-viewer/src/main.rs new file mode 100644 index 0000000..4fa6b9f --- /dev/null +++ b/resource-viewer/src/main.rs @@ -0,0 +1,13 @@ +slint::include_modules!(); + +fn main() -> Result<(), slint::PlatformError> { + let ui = AppWindow::new()?; + + let ui_handle = ui.as_weak(); + ui.on_request_increase_value(move || { + let ui = ui_handle.unwrap(); + ui.set_counter(ui.get_counter() + 1); + }); + + ui.run() +} -- cgit v1.2.3