feat: selectbox options context menu
This commit is contained in:
@@ -333,6 +333,15 @@ void Batch2D::rect(
|
||||
vertex(v1, glm::vec2(0, 0), r2,g2,b2,1.0f);
|
||||
}
|
||||
|
||||
void Batch2D::triangle(float x1, float y1, float x2, float y2, float x3, float y3) {
|
||||
if (index + 3 >= capacity) {
|
||||
flush();
|
||||
}
|
||||
vertex({x1, y1}, {x1, y1}, color.r, color.g, color.b, color.a);
|
||||
vertex({x2, y2}, {x2, y2}, color.r, color.g, color.b, color.a);
|
||||
vertex({x3, y3}, {x3, y3}, color.r, color.g, color.b, color.a);
|
||||
}
|
||||
|
||||
void Batch2D::sprite(float x, float y, float w, float h, const UVRegion& region, glm::vec4 tint){
|
||||
rect(x, y, w, h, region.u1, region.v1, region.u2-region.u1, region.v2-region.v1, tint.r, tint.g, tint.b, tint.a);
|
||||
}
|
||||
|
||||
@@ -117,6 +117,8 @@ public:
|
||||
float r4, float g4, float b4, int sh
|
||||
);
|
||||
|
||||
void triangle(float x1, float y1, float x2, float y2, float x3, float y3);
|
||||
|
||||
void flush() override;
|
||||
|
||||
void lineWidth(float width);
|
||||
|
||||
Reference in New Issue
Block a user