GLCtrl: cosmetics improvemenet in GLCtrl.usc

This commit is contained in:
Zbigniew Rębacz 2025-07-06 00:49:18 +02:00
parent 764629e849
commit d25acd595d

View file

@ -11,16 +11,17 @@ ctrl GLCtrl {
r = GetRect();
w.DrawRect(r, :SBlack);
font = Arial(12);
tn = GetTextSize("3D");
font = Arial(12).Bold();
right_text = "2D | 3D";
tn = GetTextSize(right_text, font);
if (r.right >= 130 && r.bottom >= 130) {
w.DrawText(r.left + 10, r.top + 10, "OpenGL", font, :SWhite);
w.DrawText(r.right - 10 - tn.cx, r.top + 10, "3D", font, :SWhite);
w.DrawText(r.right - 10 - tn.cx, r.top + 10, right_text, font, :SWhite);
}
poffset = 20;
w.DrawLine(r.left + poffset, r.bottom - poffset, r.right / 2, r.top + tn.cy, 3, :SWhite);
w.DrawLine(r.right - poffset, r.bottom - poffset, r.right / 2, r.top + tn.cy, 3, :SWhite);
w.DrawLine(r.left + poffset, r.bottom - poffset, r.right - poffset, r.bottom - poffset, 3, :SWhite);
w.DrawLine(r.left + poffset, r.bottom - poffset, r.right / 2, r.top + tn.cy, 7, :SGreen);
w.DrawLine(r.right - poffset, r.bottom - poffset, r.right / 2, r.top + tn.cy, 7, :SGreen);
w.DrawLine(r.left + poffset, r.bottom - poffset, r.right - poffset, r.bottom - poffset, 7, :SGreen);
}
}