diff --git a/mp/src/app.rs b/mp/src/app.rs index a3f8561..ff536b8 100644 --- a/mp/src/app.rs +++ b/mp/src/app.rs @@ -235,6 +235,18 @@ impl MatchEvent for App { self.file_manager.try_deal_file(&self.ui, cx); } + fn handle_actions(&mut self, cx: &mut Cx, actions: &Actions) { + let ui = self.ui.clone(); + + if ui.button(id!(start)).clicked(actions) { + cx.action(AppAction::OpenFile); + } + + for action in actions.iter() { + self.handle_action(cx, action); + } + } + fn handle_action(&mut self, _cx: &mut Cx, e: &Action) { let ui = self.ui.clone(); diff --git a/mp/src/app_ui.rs b/mp/src/app_ui.rs index a91dcf5..d5679cd 100644 --- a/mp/src/app_ui.rs +++ b/mp/src/app_ui.rs @@ -91,6 +91,11 @@ live_design! {

{ text: "Controller"} + start =