From dbc4330fc50a6319ce26177da263c27a9c0e2765 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Mon, 8 May 2023 00:31:34 +0300 Subject: [PATCH] Fixed positioning of resource bar and town list in other windows --- client/renderSDL/WindowHandler.cpp | 2 +- client/windows/CCastleInterface.cpp | 4 ++-- client/windows/CKingdomInterface.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/renderSDL/WindowHandler.cpp b/client/renderSDL/WindowHandler.cpp index 427cce029..f1b177623 100644 --- a/client/renderSDL/WindowHandler.cpp +++ b/client/renderSDL/WindowHandler.cpp @@ -122,7 +122,7 @@ WindowHandler::WindowHandler() SDL_SetHint(SDL_HINT_WINDOWS_DPI_AWARENESS, "permonitor"); #endif - if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_NOPARACHUTE)) + if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_AUDIO)) { logGlobal->error("Something was wrong: %s", SDL_GetError()); exit(-1); diff --git a/client/windows/CCastleInterface.cpp b/client/windows/CCastleInterface.cpp index ec16dd775..beb04a596 100644 --- a/client/windows/CCastleInterface.cpp +++ b/client/windows/CCastleInterface.cpp @@ -1198,9 +1198,9 @@ CCastleInterface::CCastleInterface(const CGTownInstance * Town, const CGTownInst Rect barRect(9, 182, 732, 18); auto statusbarBackground = std::make_shared(panel->getSurface(), barRect, 9, 555); statusbar = CGStatusBar::create(statusbarBackground); - resdatabar = std::make_shared("ARESBAR", 3, 575, 32, 2, 85, 85); + resdatabar = std::make_shared("ARESBAR", 3, 575, 37, 3, 84, 78); - townlist = std::make_shared(3, Rect(Point(745, 430), Point(48, 32*4)), Point(0,0), Point(0, 32), LOCPLINT->localState->getOwnedTowns().size() ); + townlist = std::make_shared(3, Rect(Point(743, 414), Point(48, 128)), Point(1,16), Point(0, 32), LOCPLINT->localState->getOwnedTowns().size() ); townlist->setScrollUpButton( std::make_shared( Point(744, 414), "IAM014", CButton::tooltipLocalized("core.help.306"))); townlist->setScrollDownButton( std::make_shared( Point(744, 526), "IAM015", CButton::tooltipLocalized("core.help.307"))); diff --git a/client/windows/CKingdomInterface.cpp b/client/windows/CKingdomInterface.cpp index 172cea839..2bed49f2c 100644 --- a/client/windows/CKingdomInterface.cpp +++ b/client/windows/CKingdomInterface.cpp @@ -484,7 +484,7 @@ CKingdomInterface::CKingdomInterface() generateButtons(); statusbar = CGStatusBar::create(std::make_shared("KSTATBAR", 10,pos.h - 45)); - resdatabar = std::make_shared("KRESBAR", 3, 111+footerPos, 32, 2, 76, 76); + resdatabar = std::make_shared("KRESBAR", 7, 111+footerPos, 29, 5, 76, 81); } void CKingdomInterface::generateObjectsList(const std::vector &ownedObjects)