Added a green debug mode rectangle for CarouselComponent.

Also changed the debug mode rectangle from blue to green for TextListComponent.
This commit is contained in:
Leon Styhre 2022-04-17 11:08:08 +02:00
parent a112fc035f
commit 468d2b3635
2 changed files with 5 additions and 1 deletions

View file

@ -387,6 +387,10 @@ template <typename T> void CarouselComponent<T>::render(const glm::mat4& parentT
mRenderer->setMatrix(carouselTrans); mRenderer->setMatrix(carouselTrans);
// In image debug mode, draw a green rectangle covering the entire carousel area.
if (Settings::getInstance()->getBool("DebugImage"))
mRenderer->drawRect(0.0f, 0.0f, mSize.x, mSize.y, 0x00FF0033, 0x00FF0033);
// Background box behind the items. // Background box behind the items.
mRenderer->drawRect(0.0f, 0.0f, mSize.x, mSize.y, mCarouselColor, mCarouselColorEnd, mRenderer->drawRect(0.0f, 0.0f, mSize.x, mSize.y, mCarouselColor, mCarouselColorEnd,
mColorGradientHorizontal); mColorGradientHorizontal);

View file

@ -376,7 +376,7 @@ template <typename T> void TextListComponent<T>::render(const glm::mat4& parentT
if (Settings::getInstance()->getBool("DebugText")) { if (Settings::getInstance()->getBool("DebugText")) {
mRenderer->drawRect(mHorizontalMargin, 0.0f, mSize.x - mHorizontalMargin * 2.0f, mSize.y, mRenderer->drawRect(mHorizontalMargin, 0.0f, mSize.x - mHorizontalMargin * 2.0f, mSize.y,
0x00000033, 0x00000033); 0x00000033, 0x00000033);
mRenderer->drawRect(0.0f, 0.0f, mSize.x, mSize.y, 0x0000FF33, 0x0000FF33); mRenderer->drawRect(0.0f, 0.0f, mSize.x, mSize.y, 0x00FF0033, 0x00FF0033);
} }
// Clip to inside margins. // Clip to inside margins.