struct EE::UI::Borders

Overview

#include <border.hpp>

struct Borders {
    // fields

    Border left;
    Border top;
    Border right;
    Border bottom;
    BorderRadiuses radius;

    // methods

    static std::string fromBorderType(const BorderType& borderType);
    static BorderType toBorderType(const std::string& borderType);
    static Sizef radiusFromString(const UINode* node, const std::string& val);
    static void createBorders(VertexBuffer* vbo, const Borders& borders, const Vector2f& pos, const Sizef& size);
    static void createBackground(VertexBuffer* vbo, const BorderRadiuses& radius, const Vector2f& pos, const Sizef& size, const Color& color);
};

Detailed Documentation

Methods

static void createBorders(VertexBuffer* vbo, const Borders& borders, const Vector2f& pos, const Sizef& size)

Creates the border geometry into the VertexBuffer provided. The VertexBuffer must be a a EE::Graphics::PrimitiveType::PRIMITIVE_TRIANGLE_STRIP with VERTEX_FLAGS_PRIMITIVE flags.

static void createBackground(VertexBuffer* vbo, const BorderRadiuses& radius, const Vector2f& pos, const Sizef& size, const Color& color)

Creates a rounded rectangle to use as background of a UI node. The VertexBuffer must be a a EE::Graphics::PrimitiveType::PRIMITIVE_TRIANGLE_FAN with VERTEX_FLAGS_PRIMITIVE flags.