From fae31a2b28dbd71d8b1a1a7ae31b05ea12a39464 Mon Sep 17 00:00:00 2001 From: tobid7 Date: Fri, 24 May 2024 18:30:04 +0200 Subject: [PATCH] Small fix --- source/DrawV2.cpp | 4 ++-- source/UI7.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/DrawV2.cpp b/source/DrawV2.cpp index 465d7a3..7356678 100644 --- a/source/DrawV2.cpp +++ b/source/DrawV2.cpp @@ -152,8 +152,8 @@ std::string TextShort(const std::string &in, int max_len) { namespace Draw2 { void Scissor(R7Vec2 pos, R7Vec2 size) { // TODO: Seems not correct yet - C3D_SetScissor(GPU_SCISSOR_NORMAL, pos.y, pos.x, size.y - pos.y, - pos.x + size.x); + C3D_SetScissor(GPU_SCISSOR_NORMAL, GSP_SCREEN_WIDTH - pos.y - size.y, pos.x, + GSP_SCREEN_WIDTH - pos.y, pos.x + size.x); } void ScissorReset() { C3D_SetScissor(GPU_SCISSOR_DISABLE, 0, 0, 0, 0); } void Rect(R7Vec2 pos, R7Vec2 size, unsigned int color, int t) { diff --git a/source/UI7.cpp b/source/UI7.cpp index 9b1cb4f..05ad3d7 100644 --- a/source/UI7.cpp +++ b/source/UI7.cpp @@ -598,6 +598,7 @@ bool BeginMenu(const std::string &title, R7Vec2 size, UI7MenuFlags flags) { RenderD7::Draw2::RFS(R7Vec2(0, 0), size, RenderD7::StyleColor(RD7Color_Background)); if (titlebar) { + RenderD7::Draw2::ScissorReset(); RenderD7::Draw2::RFS(R7Vec2(0, 0), R7Vec2(size.x, tbh), RenderD7::StyleColor(RD7Color_Header)); RenderD7::TextColorByBg(RD7Color_Header);