| 596 | |
| 597 | let mut script = self.script.borrow_mut(); |
| 598 | script.set_explain(&format!("选择支:{explain}")); |
| 599 | let mut choose_branch = Vec::with_capacity(choices.len()); |
| 600 | for (index, choice) in choices.iter().enumerate() { |
| 601 | choose_branch.push((index as i32, SharedString::from(choice.0.clone()))); |
| 602 | } |
| 603 | script.push_backlog( |
| 604 | "选择支".to_shared_string(), |
| 605 | explain.to_shared_string(), |
| 606 | None, |
| 607 | ); |
| 608 | window.set_choose_branch(Rc::new(VecModel::from(choose_branch)).into()); |
| 609 | window.set_current_choose(choices.len() as i32); |
| 610 | } |
| 611 | Command::Dialogue { speaker, text } => { |
| 612 | { |
| 613 | let mut script = self.script.borrow_mut(); |
| 614 | let voice = script.pre_voice(); |