#ifndef CLASS_SELECTION_HIGHLIGHTER #define CLASS_SELECTION_HIGHLIGHTER #include #include "graphic/Image.h" #include "Element.h" #include "Layer.h" #define H_SPACE 10 #define V_SPACE 10 #define SELECT_OPACITY 128 /// layer that shows graphic selection highlighter class SelectionHighlighter : public Layer { private: /// current selected object Element * _sel_elem; /// images that made the highlighter std::vector < graphic::Image * > _images; public: /// constructor SelectionHighlighter(std::vector < graphic::Image * > images); /// destroyer ~SelectionHighlighter() { }; /// store a pointer to the selected object void SetSelected(Element * obj) { _sel_elem = obj; }; /// set the pointer to the selected object to NULL void ClearSelected() { _sel_elem = NULL; }; /// return true if an object is selected bool IsSelected() { return (_sel_elem != NULL); }; /// blit part of the layer on a surface, if the surface is NULL blit on screen void BlitLayer(SDL_Rect limits_rect, graphic::Surface * dst_surf = NULL); }; #endif