mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Don't set the label shader if the specified material name is considered empty (#364)
For labels linking to a variable for the shader, this prevents the label from still being rendered, drawing the tiled square grid (notexture)
This commit is contained in:
parent
51afcd7b96
commit
facabc09f5
1 changed files with 7 additions and 1 deletions
|
@ -166,7 +166,13 @@ void UILabel::LabelLayoutShader(Event *ev)
|
|||
void UILabel::LabelLayoutTileShader(Event *ev)
|
||||
{
|
||||
m_sCurrentShaderName = ev->GetString(1);
|
||||
setMaterial(uWinMan.RegisterShader(m_sCurrentShaderName));
|
||||
if (m_sCurrentShaderName.length() > 1) {
|
||||
setMaterial(uWinMan.RegisterShader(m_sCurrentShaderName));
|
||||
} else {
|
||||
// Added in 2.0
|
||||
// Don't set the material if the shader name is considered empty
|
||||
m_sCurrentShaderName = "";
|
||||
}
|
||||
|
||||
m_flags |= WF_TILESHADER;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue