mod patch; use gtk4::prelude::*; use gtk4::{ Align, Application, ApplicationWindow, Button }; fn main() { let app = Application::new(Some("com.wyattjmiller.snespatcher"), Default::default()); app.connect_activate(build_ui); app.run(); } fn build_ui(app: &Application) { let window = ApplicationWindow::builder() .application(app) .title("SNES Patcher") .default_width(600) .default_height(400) .build(); let button = Button::builder() .margin_top(10) .margin_bottom(10) .margin_start(10) .margin_end(10) .halign(Align::Center) .valign(Align::Center) .label("Click meh!") .build(); button.connect_clicked( move |button| { button.set_label("avery is gay"); }); window.set_child(Some(&button)); window.show(); }