mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Merge pull request #7973 from ChillerDragon/pr_ed_igfx
Remove indirect Graphics() access in BrushSelecting()
This commit is contained in:
commit
6c27894a63
|
@ -251,12 +251,12 @@ bool CLayerTiles::IsEmpty(const std::shared_ptr<CLayerTiles> &pLayer)
|
|||
void CLayerTiles::BrushSelecting(CUIRect Rect)
|
||||
{
|
||||
Graphics()->TextureClear();
|
||||
m_pEditor->Graphics()->QuadsBegin();
|
||||
m_pEditor->Graphics()->SetColor(1.0f, 1.0f, 1.0f, 0.4f);
|
||||
Graphics()->QuadsBegin();
|
||||
Graphics()->SetColor(1.0f, 1.0f, 1.0f, 0.4f);
|
||||
Snap(&Rect);
|
||||
IGraphics::CQuadItem QuadItem(Rect.x, Rect.y, Rect.w, Rect.h);
|
||||
m_pEditor->Graphics()->QuadsDrawTL(&QuadItem, 1);
|
||||
m_pEditor->Graphics()->QuadsEnd();
|
||||
Graphics()->QuadsDrawTL(&QuadItem, 1);
|
||||
Graphics()->QuadsEnd();
|
||||
char aBuf[16];
|
||||
str_format(aBuf, sizeof(aBuf), "%d⨯%d", ConvertX(Rect.w), ConvertY(Rect.h));
|
||||
TextRender()->Text(Rect.x + 3.0f, Rect.y + 3.0f, m_pEditor->m_ShowPicker ? 15.0f : m_pEditor->MapView()->ScaleLength(15.0f), aBuf, -1.0f);
|
||||
|
|
Loading…
Reference in a new issue