trim exit button sizes
This commit is contained in:
parent
90d2e35ade
commit
1b74f9c996
1 changed files with 10 additions and 10 deletions
|
@ -40,7 +40,7 @@ pub struct Editor {
|
||||||
exit_state: ExitState,
|
exit_state: ExitState,
|
||||||
exit_menu: bool,
|
exit_menu: bool,
|
||||||
complete_popup: Popup,
|
complete_popup: Popup,
|
||||||
fail_popup: Popup,
|
// fail_popup: Popup,
|
||||||
score: Option<Score>,
|
score: Option<Score>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ impl Editor {
|
||||||
exit_state: ExitState::Dont,
|
exit_state: ExitState::Dont,
|
||||||
exit_menu: false,
|
exit_menu: false,
|
||||||
complete_popup: Popup::Start,
|
complete_popup: Popup::Start,
|
||||||
fail_popup: Popup::Start,
|
// fail_popup: Popup::Start,
|
||||||
score: solution.score,
|
score: solution.score,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -370,27 +370,27 @@ impl Editor {
|
||||||
);
|
);
|
||||||
|
|
||||||
if self.exit_menu {
|
if self.exit_menu {
|
||||||
if simple_button(d, 5, 5, 80, 30) {
|
if simple_button(d, 5, 5, 75, 30) {
|
||||||
self.exit_menu = false;
|
self.exit_menu = false;
|
||||||
}
|
}
|
||||||
d.draw_text("cancel", 10, 10, 20, Color::WHITE);
|
d.draw_text("cancel", 10, 10, 20, Color::WHITE);
|
||||||
if simple_button(d, 90, 5, 80, 30) {
|
if simple_button(d, 85, 5, 60, 30) {
|
||||||
self.exit_state = ExitState::ExitAndSave;
|
self.exit_state = ExitState::ExitAndSave;
|
||||||
}
|
}
|
||||||
d.draw_text("save", 95, 10, 20, Color::WHITE);
|
d.draw_text("save", 90, 10, 20, Color::WHITE);
|
||||||
if simple_button(d, 175, 5, 80, 30) {
|
if simple_button(d, 150, 5, 80, 30) {
|
||||||
self.exit_state = ExitState::ExitNoSave;
|
self.exit_state = ExitState::ExitNoSave;
|
||||||
}
|
}
|
||||||
d.draw_text("revert", 180, 10, 20, Color::WHITE);
|
d.draw_text("revert", 155, 10, 20, Color::WHITE);
|
||||||
} else {
|
} else {
|
||||||
if simple_button(d, 5, 5, 80, 30) {
|
if simple_button(d, 5, 5, 75, 30) {
|
||||||
self.exit_menu = true;
|
self.exit_menu = true;
|
||||||
}
|
}
|
||||||
d.draw_text("exit", 10, 10, 20, Color::WHITE);
|
d.draw_text("exit", 10, 10, 20, Color::WHITE);
|
||||||
if simple_button(d, 90, 5, 80, 30) {
|
if simple_button(d, 85, 5, 60, 30) {
|
||||||
self.exit_state = ExitState::Save;
|
self.exit_state = ExitState::Save;
|
||||||
}
|
}
|
||||||
d.draw_text("save", 95, 10, 20, Color::WHITE);
|
d.draw_text("save", 90, 10, 20, Color::WHITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
match self.sim_state {
|
match self.sim_state {
|
||||||
|
|
Loading…
Reference in a new issue