Skip to content

Commit

Permalink
#5632: Some tweaking to Texture Tile borders and colours
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Jun 11, 2021
1 parent 29c5fb3 commit 538922f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions radiant/ui/texturebrowser/TextureBrowser.cpp
Expand Up @@ -51,7 +51,7 @@ namespace
}

const int VIEWPORT_BORDER = 12;
const int TILE_BORDER = 6;
const int TILE_BORDER = 2;
}

class TextureBrowser::TextureTile
Expand Down Expand Up @@ -102,8 +102,8 @@ class TextureBrowser::TextureTile
// draw an additional square around with 0.5 1 0.5 color
if (shader_equal(_owner.getSelectedShader(), material->getName()))
{
glLineWidth(3);
glColor3f(1, 0, 0);
glLineWidth(2);
glColor3f(0.8f, 0, 0);
glDisable(GL_TEXTURE_2D);

glBegin(GL_LINE_LOOP);
Expand All @@ -125,9 +125,9 @@ class TextureBrowser::TextureTile
glLineWidth(1);

// material border:
if (!material->IsDefault())
if (true && !material->IsDefault())
{
glColor3f(1, 1, 1);
glColor3f(0.5f, 0.5f, 0.5f);
glDisable(GL_TEXTURE_2D);

glBegin(GL_LINE_LOOP);
Expand All @@ -143,6 +143,7 @@ class TextureBrowser::TextureTile
glEnable(GL_TEXTURE_2D);
}

#if false
// highlight in-use textures
if (!_owner._hideUnused && material->IsInUse())
{
Expand All @@ -160,6 +161,7 @@ class TextureBrowser::TextureTile
glEnd();
glEnable(GL_TEXTURE_2D);
}
#endif
}
}

Expand All @@ -184,7 +186,7 @@ class TextureBrowser::TextureTile
void drawTextureName()
{
glDisable(GL_TEXTURE_2D);
glColor3f(1, 1, 1);
glColor3f(0.7f, 0.7f, 0.7f);

const static int FONT_OFFSET = 6;
glRasterPos2i(position.x(), position.y() - FONT_HEIGHT() + FONT_OFFSET);
Expand Down

0 comments on commit 538922f

Please sign in to comment.