Minor code update.

This commit is contained in:
Leon Styhre 2021-01-16 23:01:13 +01:00
parent ef25c675f7
commit 632d11e46f
2 changed files with 5 additions and 5 deletions

View file

@ -371,7 +371,7 @@ void ComponentGrid::render(const Transform4x4f& parentTrans)
renderChildren(trans);
// Draw cell separators.
for (unsigned int i = 0; i < mSeparators.size(); i++) {
for (size_t i = 0; i < mSeparators.size(); i++) {
Renderer::setMatrix(trans);
Renderer::drawRect(mSeparators[i][0], mSeparators[i][1], mSeparators[i][2],
mSeparators[i][3], 0xC6C7C6FF, 0xC6C7C6FF);

View file

@ -369,10 +369,10 @@ namespace Renderer
// If the width or height was scaled down to less than 1 pixel, then set it to
// 1 pixel so that it will still render on lower resolutions.
if (_wL > 0 && _wL < 1)
_wL = 1;
if (_hL > 0 && _hL < 1)
_hL = 1;
if (_wL > 0.0f && _wL < 1.0f)
_wL = 1.0f;
if (_hL > 0.0f && _hL < 1.0f)
_hL = 1.0f;
vertices[0] = { { _x , _y }, { 0.0f, 0.0f }, color };
vertices[1] = { { _x , _y + _hL }, { 0.0f, 0.0f }, horizontalGradient ? colorEnd : color };