1 #pragma once 2 #include "core/tool.hpp" 3 4 namespace horizon { 5 6 class ToolResizeSymbol : public ToolBase { 7 public: 8 using ToolBase::ToolBase; 9 ToolResponse begin(const ToolArgs &args) override; 10 ToolResponse update(const ToolArgs &args) override; 11 bool can_begin() override; get_actions() const12 std::set<InToolActionID> get_actions() const override 13 { 14 using I = InToolActionID; 15 return { 16 I::LMB, I::CANCEL, I::RMB, I::MOVE_UP, I::MOVE_DOWN, I::MOVE_LEFT, I::MOVE_RIGHT, 17 }; 18 } 19 20 21 private: 22 Coordi pos_orig; 23 Coordi delta_key; 24 std::map<std::pair<ObjectType, UUID>, Coordi> positions; 25 26 void update_positions(const Coordi &ac); 27 }; 28 } // namespace horizon 29