From 0fad70cac701d5a78990b57f9d8baff767e47796 Mon Sep 17 00:00:00 2001 From: Laserlicht <13953785+Laserlicht@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:31:48 +0200 Subject: [PATCH] puzzlemap fine tuning --- client/windows/CPuzzleWindow.cpp | 9 +++++++-- client/windows/CPuzzleWindow.h | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/client/windows/CPuzzleWindow.cpp b/client/windows/CPuzzleWindow.cpp index a1a87c266..a9dd08e44 100644 --- a/client/windows/CPuzzleWindow.cpp +++ b/client/windows/CPuzzleWindow.cpp @@ -21,6 +21,7 @@ #include "../widgets/Buttons.h" #include "../widgets/Images.h" #include "../widgets/TextControls.h" +#include "../widgets/GraphicalPrimitiveCanvas.h" #include "../../lib/callback/CCallback.h" #include "../../lib/entities/faction/CFaction.h" @@ -42,7 +43,7 @@ CPuzzleWindow::CPuzzleWindow(const int3 & GrailPos, double discoveredRatio) quitb = std::make_shared(Point(670, 538), AnimationPath::builtin("IOK6432.DEF"), CButton::tooltip(LIBRARY->generaltexth->allTexts[599]), std::bind(&CPuzzleWindow::close, this), EShortcut::GLOBAL_RETURN); quitb->setBorderColor(Colors::METALLIC_GOLD); - mapView = std::make_shared(Point(8,9), Point(591, 544), grailPos); + mapView = std::make_shared(Point(8,8), Point(592, 544), grailPos); mapView->needFullUpdate = true; logo = std::make_shared(ImagePath::builtin("PUZZLOGO"), 607, 3); @@ -57,7 +58,7 @@ CPuzzleWindow::CPuzzleWindow(const int3 & GrailPos, double discoveredRatio) { const SPuzzleInfo & info = elem; - auto piece = std::make_shared(info.filename, info.position.x, info.position.y); + auto piece = std::make_shared(info.filename, info.position.x + 1, info.position.y); piece->needRefresh = true; //piece that will slowly disappear @@ -71,6 +72,10 @@ CPuzzleWindow::CPuzzleWindow(const int3 & GrailPos, double discoveredRatio) visiblePieces.push_back(piece); } } + + border = std::make_shared(Rect(Point(6,6), Point(596, 548))); + for(int i = 0; i < 3; i++) + border->addRectangle(Point(i, i), Point(border->pos.w - i * 2, border->pos.h - i * 2), Colors::BLACK); } void CPuzzleWindow::showAll(Canvas & to) diff --git a/client/windows/CPuzzleWindow.h b/client/windows/CPuzzleWindow.h index 18f502d52..d15c508d7 100644 --- a/client/windows/CPuzzleWindow.h +++ b/client/windows/CPuzzleWindow.h @@ -16,6 +16,7 @@ class CLabel; class CButton; class CResDataBar; class PuzzleMapView; +class GraphicalPrimitiveCanvas; /// Puzzle screen which gets uncovered when you visit obilisks class CPuzzleWindow : public CWindowObject @@ -24,6 +25,7 @@ private: int3 grailPos; std::shared_ptr mapView; std::shared_ptr logo; + std::shared_ptr border; std::shared_ptr title; std::shared_ptr quitb; std::shared_ptr resDataBar;