mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 23:15:38 +00:00
Minor code update.
This commit is contained in:
parent
ef25c675f7
commit
632d11e46f
|
@ -371,7 +371,7 @@ void ComponentGrid::render(const Transform4x4f& parentTrans)
|
||||||
renderChildren(trans);
|
renderChildren(trans);
|
||||||
|
|
||||||
// Draw cell separators.
|
// 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::setMatrix(trans);
|
||||||
Renderer::drawRect(mSeparators[i][0], mSeparators[i][1], mSeparators[i][2],
|
Renderer::drawRect(mSeparators[i][0], mSeparators[i][1], mSeparators[i][2],
|
||||||
mSeparators[i][3], 0xC6C7C6FF, 0xC6C7C6FF);
|
mSeparators[i][3], 0xC6C7C6FF, 0xC6C7C6FF);
|
||||||
|
|
|
@ -369,10 +369,10 @@ namespace Renderer
|
||||||
|
|
||||||
// If the width or height was scaled down to less than 1 pixel, then set it to
|
// 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.
|
// 1 pixel so that it will still render on lower resolutions.
|
||||||
if (_wL > 0 && _wL < 1)
|
if (_wL > 0.0f && _wL < 1.0f)
|
||||||
_wL = 1;
|
_wL = 1.0f;
|
||||||
if (_hL > 0 && _hL < 1)
|
if (_hL > 0.0f && _hL < 1.0f)
|
||||||
_hL = 1;
|
_hL = 1.0f;
|
||||||
|
|
||||||
vertices[0] = { { _x , _y }, { 0.0f, 0.0f }, color };
|
vertices[0] = { { _x , _y }, { 0.0f, 0.0f }, color };
|
||||||
vertices[1] = { { _x , _y + _hL }, { 0.0f, 0.0f }, horizontalGradient ? colorEnd : color };
|
vertices[1] = { { _x , _y + _hL }, { 0.0f, 0.0f }, horizontalGradient ? colorEnd : color };
|
||||||
|
|
Loading…
Reference in a new issue