From 9602603135f456d906192112288dcd84429c8fee Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 30 Sep 2020 22:05:41 +0200 Subject: Matrix: implement message editing --- src/Body.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Body.cpp') diff --git a/src/Body.cpp b/src/Body.cpp index 5927831..13e3d7d 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -550,11 +550,11 @@ namespace QuickMedia { } void Body::draw_item(sf::RenderWindow &window, BodyItem *item, sf::Vector2f pos, sf::Vector2f size) { - //sf::Vector2u window_size = window.getSize(); - // glEnable(GL_SCISSOR_TEST); - //glScissor(pos.x, (int)window_size.y - (int)pos.y - (int)pos.y, size.x, size.y); + sf::Vector2u window_size = window.getSize(); + glEnable(GL_SCISSOR_TEST); + glScissor(pos.x, (int)window_size.y - (int)pos.y - (int)size.y, size.x, size.y); draw_item(window, item, pos, size, get_item_height(item) + spacing_y, -1, Json::nullValue); - //glDisable(GL_SCISSOR_TEST); + glDisable(GL_SCISSOR_TEST); } void Body::draw_item(sf::RenderWindow &window, BodyItem *item, const sf::Vector2f &pos, const sf::Vector2f &size, const float item_height, const int item_index, const Json::Value &content_progress) { -- cgit v1.2.3