mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-10 10:24:07 +02:00
Show placeholder text in text fields even when focused
This is fine, there's no particular benefit to hiding it when they are focused. I did find it annoying that the cursor got a bit tangled up with the placeholder text though, so I moved the text a bit to the right.
This commit is contained in:
@@ -625,12 +625,9 @@ void Textbox::Draw(const Point& screenPos)
|
|||||||
screenPos + tp + Vec2{ cursorPositionX, cursorPositionY+9 },
|
screenPos + tp + Vec2{ cursorPositionX, cursorPositionY+9 },
|
||||||
0xFFFFFF_rgb);
|
0xFFFFFF_rgb);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if(!text.length())
|
if(!text.length())
|
||||||
{
|
{
|
||||||
g->BlendText(screenPos + tp, placeHolder, textColour.NoAlpha().WithAlpha(170));
|
g->BlendText(screenPos + tp + Vec2{ 3, 0 }, placeHolder, textColour.NoAlpha().WithAlpha(170));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(Appearance.icon)
|
if(Appearance.icon)
|
||||||
g->draw_icon(screenPos.X+iconPosition.X, screenPos.Y+iconPosition.Y, Appearance.icon);
|
g->draw_icon(screenPos.X+iconPosition.X, screenPos.Y+iconPosition.Y, Appearance.icon);
|
||||||
|
Reference in New Issue
Block a user