card dragging

This commit is contained in:
Asuro
2025-03-30 03:00:23 +02:00
parent e5076b0c3b
commit b006d14197
6 changed files with 76 additions and 48 deletions

View File

@@ -2,7 +2,7 @@
#include <cstdint>
#include <imgui.h>
#include "Gen.h"
#include "Gen.h" // IWYU pragma: keep
namespace Puzzle
{
@@ -36,6 +36,11 @@ namespace Puzzle
PuzzleElementType::Enum& EditCardNodeAt(StaticPuzzleCard& card, uint8_t rotation, int8_t x, int8_t y);
void DrawCard(const StaticPuzzleCard& card, uint8_t rotation, ImVec2 pos);
// TODO: targetPos is of type CardPos
bool ReturnPlacedCard(PuzzleData& obj, PuzPos targetPos);
// TODO: targetPos is of type CardPos
bool DragAvailableCardTo(PuzzleData& obj, PuzPos targetPos, int32_t availIdx, uint8_t rotation);
struct PuzzleSolver
{
bool IsPuzzleSolved(const Generated::PuzzleData& puzzle);