git repos / blockattack-game

commit 75e8dcd8

Poul Sander · 2023-11-11 14:41
75e8dcd85ee2e2dafcbfd8c70882f7bdb839cbac patch · browse files
parent 60b2bac034bf2223d2d27d73f541095dc77ff524

Make the plcaement of buttons and preview slightly more widescreen friendly

Changed files

M source/code/menudef.cpp before
diff --git a/source/code/menudef.cpp b/source/code/menudef.cpp index 317c40d..5432d3d 100644 --- a/source/code/menudef.cpp +++ b/source/code/menudef.cpp
@@ -442,13 +442,13 @@ private:
std::shared_ptr<BlockGameSdl> game;
public:
ThemesMenu(SDL_Renderer* screen, const std::string& title, bool submenu) : Menu(screen, title, submenu) {
- game = std::make_shared<BlockGameSdl>(1024-500,100,&globalData.spriteHolder->GetDataHolder());
+ game = std::make_shared<BlockGameSdl>(globalData.xsize-450,100,&globalData.spriteHolder->GetDataHolder());
game->putSampleBlocks();
}
void placeButtons() override {
int nextY = 100;
- int X = 50;
+ int X = 10;
for (Button* it : buttons) {
it->x = X;
it->y = nextY;