// Draw a ring around the object to show it's selected inline void set_select_state(bool select) { select_state = select; if (select) { circ.setOutlineColor(sf::Color::Green); circ.setOutlineThickness(OBJECT_SIZE/5); } else { circ.setOutlineColor(sf::Color::Black); circ.setOutlineThickness(OBJECT_SIZE/10); } }
void createGeometry() { fill = type == Type::Follower ? sf::Color(198, 156, 109, 255) : sf::Color(0, 191, 243, 255); outline = type == Type::Follower ? sf::Color(166, 124, 82, 255) : sf::Color(64, 140, 203, 255); geometry.setRadius(radius); geometry.setPointCount(6); geometry.setFillColor(fill); geometry.setOutlineColor(outline); geometry.setOutlineThickness(2); geometry.setOrigin(radius, radius); }
static void init(sf::RenderWindow &window) { window.setMouseCursorVisible(false); window.setVerticalSyncEnabled(true); crosshair.setFillColor(sf::Color(0, 0, 0, 0)); crosshair.setOutlineColor(sf::Color(0, 0, 0)); crosshair.setOutlineThickness(2.0f); srand(static_cast<unsigned>(time(0))); }