mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
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:
parent
c093122764
commit
016e062fef
12 changed files with 8 additions and 74 deletions
|
@ -172,7 +172,6 @@ void UIBindButton::DrawUnpressed(void)
|
|||
if (str::cmp(s, m_last_keyname)) {
|
||||
m_mat = uWinMan.RegisterShader("textures/bind/" + s);
|
||||
if (m_mat) {
|
||||
m_mat->ReregisterMaterial();
|
||||
if (m_mat->GetMaterial()) {
|
||||
m_material = m_mat;
|
||||
} else {
|
||||
|
@ -186,8 +185,6 @@ void UIBindButton::DrawUnpressed(void)
|
|||
}
|
||||
|
||||
if (m_mat) {
|
||||
m_mat->ReregisterMaterial();
|
||||
|
||||
if (m_mat->GetMaterial()) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue