cleanup
This commit is contained in:
parent
2c522c1fe0
commit
987643f334
6 changed files with 19 additions and 23 deletions
17
src/main.rs
17
src/main.rs
|
@ -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,
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue