Mario: slightly better editor UI

This commit is contained in:
2021-05-28 19:51:02 +02:00
parent af3588501a
commit 9d9068091b
9 changed files with 503 additions and 88 deletions
+2 -1
View File
@@ -3,7 +3,8 @@
#include "blocks.hpp"
#include "sprites.hpp"
ToolBox::ToolBox(int x, int y, int map_width, int map_height, std::shared_ptr<SDLPP::Renderer> renderer) : SDLPP::RectangleRender((map_width - 4)*BLOCK_SIZE + x*BLOCK_SIZE, 1*BLOCK_SIZE + y*BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE, renderer) {
ToolBox::ToolBox(int x, int y, double start_x, double start_y, std::shared_ptr<SDLPP::Renderer> renderer) : SDLPP::RectangleRender(start_x + x*BLOCK_SIZE, start_y + y*BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE, renderer) {
std::cout << "X: " << start_x + x * BLOCK_SIZE << ", " << start_y + y * BLOCK_SIZE << std::endl;
_x = x;
_y = y;
setId(EDITOR_TOOL_ID);