This commit is contained in:
Crispy 2024-12-24 23:18:41 +01:00
parent 2c522c1fe0
commit 987643f334
6 changed files with 19 additions and 23 deletions

View file

@ -92,7 +92,7 @@ impl Game {
ExitState::ExitAndSave => {
let solution = &mut self.solutions.get_mut(editor.level_id()).unwrap()
[self.selected_solution];
solution.board = editor.source_board().to_string();
solution.board = editor.source_board().serialize();
solution.score = editor.score();
solution.save();
self.open_editor = None;
@ -100,7 +100,7 @@ impl Game {
ExitState::Save => {
let solution = &mut self.solutions.get_mut(editor.level_id()).unwrap()
[self.selected_solution];
solution.board = editor.source_board().to_string();
solution.board = editor.source_board().serialize();
solution.score = editor.score();
solution.save();
}
@ -212,12 +212,13 @@ impl Game {
let mut solution_y = y;
for (solution_index, solution) in solutions.iter().enumerate() {
if simple_option_button(
d,
&mouse,
level_list_width + 10,
solution_y,
entry_width,
solution_entry_height,
(d, &mouse),
rect(
level_list_width + 10,
solution_y,
entry_width,
solution_entry_height,
),
solution_index,
&mut self.selected_solution,
) {