mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Added Dark Highlight on f3 menu for better visibility
f3 menu now has dark highlight over text (simmilar to java) that makes it significantly easier to read text on white background.
This commit is contained in:
parent
ecb3f00bd6
commit
72c14ccbfd
|
|
@ -1175,13 +1175,13 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
|
|||
}
|
||||
#endif
|
||||
|
||||
int yPos = debugTop;
|
||||
for (const auto &line : lines)
|
||||
{
|
||||
drawString(font, line, debugLeft, yPos, 0xffffff);
|
||||
yPos += 10;
|
||||
}
|
||||
|
||||
int yPos = debugTop;
|
||||
for (const auto& line : lines)
|
||||
{
|
||||
fill(debugLeft - 1, yPos - 1, debugLeft + font->width(line) + 1, yPos + 8 + 1, 0x80303030, true);
|
||||
drawString(font, line, debugLeft, yPos, 0xffffff);
|
||||
yPos += 10;
|
||||
}
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPopMatrix();
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ void GuiComponent::vLine(int x, int y0, int y1, int col)
|
|||
fill(x, y0 + 1, x + 1, y1, col);
|
||||
}
|
||||
|
||||
void GuiComponent::fill(int x0, int y0, int x1, int y1, int col)
|
||||
void GuiComponent::fill(int x0, int y0, int x1, int y1, int col, bool blend)
|
||||
{
|
||||
if (x0 < x1)
|
||||
{
|
||||
|
|
@ -54,7 +54,9 @@ void GuiComponent::fill(int x0, int y0, int x1, int y1, int col)
|
|||
t->vertex(static_cast<float>(x0), static_cast<float>(y0), static_cast<float>(0));
|
||||
t->end();
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glDisable(GL_BLEND);
|
||||
if (blend == false) {
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
}
|
||||
|
||||
void GuiComponent::fillGradient(int x0, int y0, int x1, int y1, int col1, int col2)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ protected:
|
|||
protected:
|
||||
void hLine(int x0, int x1, int y, int col);
|
||||
void vLine(int x, int y0, int y1, int col);
|
||||
void fill(int x0, int y0, int x1, int y1, int col);
|
||||
void fill(int x0, int y0, int x1, int y1, int col, bool blend = false);
|
||||
void fillGradient(int x0, int y0, int x1, int y1, int col1, int col2);
|
||||
public:
|
||||
GuiComponent(); // 4J added
|
||||
|
|
|
|||
Loading…
Reference in a new issue