Compare commits

..

2 Commits

4 changed files with 13 additions and 9 deletions

View File

@ -173,17 +173,11 @@ private:
public:
auto GetBackgroundColor() const -> Color;
auto HelpPopup() -> void;
auto DrawSavePresetPopup() -> void;
auto DrawMainMenu() -> void;
auto DrawPuzzleBoard() -> void;
auto DrawGraphOverlay(int fps, int ups) -> void;
auto Update() -> void;
};

View File

@ -115,7 +115,8 @@ auto InputHandler::CameraRotate() -> void {
auto InputHandler::CameraStopRotate() -> void { camera_rotating = false; }
auto InputHandler::CameraZoom() -> void {
if (!MouseInGraphPane() || IsKeyDown(KEY_LEFT_CONTROL)) {
if (!MouseInGraphPane() || IsKeyDown(KEY_LEFT_CONTROL) ||
camera.projection == CAMERA_ORTHOGRAPHIC) {
return;
}

View File

@ -16,6 +16,15 @@
#endif
// TODO: Click states in the graph to display them in the board
// TODO: Add some popups
// - Next move, goto target, goto worst: Notify that the graph needs to be
// populated
// - Clear graph: Notify that this will clear the visited states and move
// history
// - Reset state: Notify that this will reset the move count
// Remove the keybindings, as it's simpler to show the popups from the
// button?
// TODO: Set selection to 0, 0 when resetting the state
// NOTE: Tracy uses a huge amount of memory. For longer testing disable Tracy.

View File

@ -81,13 +81,13 @@ auto StateManager::ResetState() -> void {
}
visited_states[current_state]++;
total_moves = 0;
if (edited) {
if (edited || !states.contains(current_state)) {
// We also need to clear the graph in case the state has been edited
// because the graph could contain states that are impossible to reach
// now.
ClearGraph();
edited = false;
}
edited = false;
}
auto StateManager::PreviousPreset() -> void {