GfxContext renamed to DrawContext

This commit is contained in:
MihailRis
2024-04-30 00:31:13 +03:00
parent 4af0a8acf7
commit bcf2f5029d
37 changed files with 101 additions and 101 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
#include "Container.hpp"
#include "../../core/GfxContext.hpp"
#include "../../core/DrawContext.hpp"
#include "../../core/Batch2D.hpp"
using namespace gui;
@@ -73,7 +73,7 @@ void Container::setScrollable(bool flag) {
scrollable = flag;
}
void Container::draw(const GfxContext* pctx, Assets* assets) {
void Container::draw(const DrawContext* pctx, Assets* assets) {
glm::vec2 pos = calcPos();
glm::vec2 size = getSize();
drawBackground(pctx, assets);
@@ -82,7 +82,7 @@ void Container::draw(const GfxContext* pctx, Assets* assets) {
batch->texture(nullptr);
batch->flush();
{
GfxContext ctx = pctx->sub();
DrawContext ctx = pctx->sub();
ctx.setScissors(glm::vec4(pos.x, pos.y, size.x, size.y));
for (auto node : nodes) {
if (node->isVisible())
@@ -91,7 +91,7 @@ void Container::draw(const GfxContext* pctx, Assets* assets) {
}
}
void Container::drawBackground(const GfxContext* pctx, Assets* assets) {
void Container::drawBackground(const DrawContext* pctx, Assets* assets) {
glm::vec4 color = isPressed() ? pressedColor : (hover ? hoverColor : this->color);
if (color.a <= 0.001f)
return;