fix console position
This commit is contained in:
@@ -148,7 +148,7 @@ void DrawContext::setBlendMode(BlendMode mode) {
|
||||
set_blend_mode(mode);
|
||||
}
|
||||
|
||||
void DrawContext::setScissors(glm::vec4 area) {
|
||||
void DrawContext::setScissors(const glm::vec4& area) {
|
||||
Window::pushScissor(area);
|
||||
scissorsCount++;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,6 @@ public:
|
||||
void setDepthTest(bool flag);
|
||||
void setCullFace(bool flag);
|
||||
void setBlendMode(BlendMode mode);
|
||||
void setScissors(glm::vec4 area);
|
||||
void setScissors(const glm::vec4& area);
|
||||
void setLineWidth(float width);
|
||||
};
|
||||
|
||||
@@ -90,7 +90,7 @@ void Container::draw(const DrawContext* pctx, Assets* assets) {
|
||||
if (!nodes.empty()) {
|
||||
batch->flush();
|
||||
DrawContext ctx = pctx->sub();
|
||||
ctx.setScissors(glm::vec4(pos.x, pos.y, size.x, size.y));
|
||||
ctx.setScissors(glm::vec4(pos.x, pos.y, glm::ceil(size.x), glm::ceil(size.y)));
|
||||
for (const auto& node : nodes) {
|
||||
if (node->isVisible())
|
||||
node->draw(pctx, assets);
|
||||
@@ -108,7 +108,7 @@ void Container::drawBackground(const DrawContext* pctx, Assets*) {
|
||||
auto batch = pctx->getBatch2D();
|
||||
batch->texture(nullptr);
|
||||
batch->setColor(color);
|
||||
batch->rect(pos.x, pos.y, size.x, size.y);
|
||||
batch->rect(pos.x, pos.y, glm::ceil(size.x), glm::ceil(size.y));
|
||||
}
|
||||
|
||||
void Container::add(const std::shared_ptr<UINode> &node) {
|
||||
|
||||
Reference in New Issue
Block a user