Fix UIReggedMaterial::ReregisterMaterial and UIReggedMaterial::GetMaterial

ReregisterMaterial() must register the material if it was registered before, and GetMaterial() must register the material if it hasn't been registered and return it
This commit is contained in:
smallmodel 2024-07-24 21:10:46 +02:00
parent c093122764
commit 016e062fef
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512
12 changed files with 8 additions and 74 deletions

View file

@ -102,7 +102,6 @@ void UICheckBox::Draw()
float y = (m_frame.size.height - height) * 0.5f;
if (material)
{
material->ReregisterMaterial();
uii.Rend_DrawPicStretched(x, y, width, height, 0.0f, 0.0f, 1.0f, 1.0f, material->GetMaterial());
}
else