This commit is contained in:
Tsuki 2024-11-26 17:31:01 +08:00
parent c55c245792
commit 87e49cae9c
2 changed files with 17 additions and 0 deletions

View File

@ -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();

View File

@ -91,6 +91,11 @@ live_design! {
<H4>{ text: "Controller"}
start = <Button> {
text: "Start"
width: Fill
}
<Group> {
<Slider> {
width: Fill,