Core/Color: Switch formal from RGBA8 to RGBA32F

This commit is contained in:
SirLynix
2022-04-23 16:08:15 +02:00
parent de53c88c01
commit e7274b24e9
32 changed files with 331 additions and 196 deletions

View File

@@ -596,7 +596,7 @@ namespace Nz
float endX = (i == m_cursorPositionEnd.y) ? GetGlyphPos({ m_cursorPositionEnd.x, i }) : lineInfo.bounds.width;
float spriteSize = std::max(endX - beginX, 1.f);
cursor.sprite->SetColor((m_cursorPositionBegin == m_cursorPositionEnd) ? Color::Black : Color(0, 0, 0, 50));
cursor.sprite->SetColor((m_cursorPositionBegin == m_cursorPositionEnd) ? Color::Black : Color(0.f, 0.f, 0.f, 0.2f));
cursor.sprite->SetSize(Vector2f(spriteSize, lineInfo.bounds.height));
registry.get<NodeComponent>(cursor.entity).SetPosition(beginX, textHeight - lineInfo.bounds.y - lineInfo.bounds.height);
@@ -604,7 +604,7 @@ namespace Nz
else
{
// Full line selection
cursor.sprite->SetColor(Color(0, 0, 0, 50));
cursor.sprite->SetColor(Color(0.f, 0.f, 0.f, 0.2f));
cursor.sprite->SetSize(Vector2f(lineInfo.bounds.width, lineInfo.bounds.height));
registry.get<NodeComponent>(cursor.entity).SetPosition(0.f, textHeight - lineInfo.bounds.y - lineInfo.bounds.height);

View File

@@ -18,15 +18,15 @@ namespace Nz
{
switch (character)
{
case '\f':
case '\n':
case '\r':
case '\t':
case '\v':
return true;
case '\f':
case '\n':
case '\r':
case '\t':
case '\v':
return true;
default:
return Unicode::GetCategory(character) & Unicode::Category_Separator;
default:
return Unicode::GetCategory(character) & Unicode::Category_Separator;
}
}
}