mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-07-31 21:50:18 +02:00
Remove gaps between lines of selected text
This commit is contained in:
@@ -247,37 +247,37 @@ void Label::Draw(const Point& screenPos)
|
|||||||
if (selectionLineH == selectionLineL)
|
if (selectionLineH == selectionLineL)
|
||||||
{
|
{
|
||||||
g->fillrect(
|
g->fillrect(
|
||||||
screenPos.X + textPosition.X + selectionXL,
|
screenPos.X + textPosition.X + selectionXL - 1,
|
||||||
screenPos.Y + textPosition.Y + selectionYL - 1,
|
screenPos.Y + textPosition.Y + selectionYL - 2,
|
||||||
selectionXH - selectionXL,
|
selectionXH - selectionXL + 1,
|
||||||
FONT_H - 2,
|
FONT_H,
|
||||||
255, 255, 255, 255
|
255, 255, 255, 255
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g->fillrect(
|
g->fillrect(
|
||||||
screenPos.X + textPosition.X + selectionXL,
|
screenPos.X + textPosition.X + selectionXL - 1,
|
||||||
screenPos.Y + textPosition.Y + selectionYL - 1,
|
screenPos.Y + textPosition.Y + selectionYL - 2,
|
||||||
textSize.X - selectionXL,
|
textSize.X - selectionXL + 1,
|
||||||
FONT_H - 2,
|
FONT_H,
|
||||||
255, 255, 255, 255
|
255, 255, 255, 255
|
||||||
);
|
);
|
||||||
for (int i = 1; i < selectionLineH - selectionLineL; ++i)
|
for (int i = 1; i < selectionLineH - selectionLineL; ++i)
|
||||||
{
|
{
|
||||||
g->fillrect(
|
g->fillrect(
|
||||||
screenPos.X + textPosition.X,
|
screenPos.X + textPosition.X - 1,
|
||||||
screenPos.Y + textPosition.Y + selectionYL - 1 + i * FONT_H,
|
screenPos.Y + textPosition.Y + selectionYL - 2 + i * FONT_H,
|
||||||
textSize.X,
|
textSize.X + 1,
|
||||||
FONT_H - 2,
|
FONT_H,
|
||||||
255, 255, 255, 255
|
255, 255, 255, 255
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
g->fillrect(
|
g->fillrect(
|
||||||
screenPos.X + textPosition.X,
|
screenPos.X + textPosition.X - 1,
|
||||||
screenPos.Y + textPosition.Y + selectionYH - 1,
|
screenPos.Y + textPosition.Y + selectionYH - 2,
|
||||||
selectionXH,
|
selectionXH + 1,
|
||||||
FONT_H - 2,
|
FONT_H,
|
||||||
255, 255, 255, 255
|
255, 255, 255, 255
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user