#pragma once #include #include #include "imgui-SFML_export.h" #define IM_VEC2_CLASS_EXTRA \ template \ ImVec2(const sf::Vector2& v) \ { \ x = static_cast(v.x); \ y = static_cast(v.y); \ } \ \ template \ operator sf::Vector2() const \ { \ return sf::Vector2(x, y); \ } #define IM_VEC4_CLASS_EXTRA \ ImVec4(const sf::Color& c) : x(c.r / 255.f), y(c.g / 255.f), z(c.b / 255.f), w(c.a / 255.f) {} \ operator sf::Color() const \ { \ return sf::Color(static_cast(x * 255.f), static_cast(y * 255.f), \ static_cast(z * 255.f), static_cast(w * 255.f)); \ } #define ImTextureID unsigned int