A bit more cleaning up of the gui and fsm, probaby done.
This commit is contained in:
parent
dd4f77a106
commit
6c1d851e85
3 changed files with 12 additions and 5 deletions
10
main_ui.cpp
10
main_ui.cpp
|
@ -90,8 +90,14 @@ namespace gui {
|
|||
}
|
||||
|
||||
// this could be an optional that returs a Point
|
||||
bool MainUI::play_move() {
|
||||
return $camera.play_move($rayview);
|
||||
std::optional<Point> MainUI::play_move() {
|
||||
if($camera.play_move($rayview)) {
|
||||
return std::make_optional<Point>({
|
||||
size_t($camera.target_x),
|
||||
size_t($camera.target_y)});
|
||||
} else {
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
|
||||
void MainUI::plan_rotate(int dir) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue