#include "tool_box.hpp" #include "objectids.hpp" #include "blocks.hpp" #include "sprites.hpp" ToolBox::ToolBox(int x, int y, double start_x, double start_y, std::shared_ptr 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); setColiderColor("#FF00AA"); setColor("#FFFFFF88"); setPermanent(); setAlignment(SDLPP::OBJ_CENTER, SDLPP::OBJ_CENTER); addCollision(SDLPP::RectColider(0,0,1,1)); } SDLPP::Vec2D ToolBox::getIndexes() const { return {_x, _y}; } void ToolBox::visit( SDLPP::Visitor &visitor ) { visitor.visit( *this ); }