Fix otya.smilebasic.dialog.Text
This commit is contained in:
@@ -103,8 +103,11 @@ struct Text
|
|||||||
this(PetitComputer petitcom, wchar* text, SDL_Color color, uint width)
|
this(PetitComputer petitcom, wchar* text, SDL_Color color, uint width)
|
||||||
{
|
{
|
||||||
auto surface = petitcom.dialogResource.font.TTF_RenderUNICODE_Blended_Wrapped((cast(ushort*)text), color, width);
|
auto surface = petitcom.dialogResource.font.TTF_RenderUNICODE_Blended_Wrapped((cast(ushort*)text), color, width);
|
||||||
texture = new GraphicPage(surface);
|
if (surface)
|
||||||
texture.createTexture(petitcom.renderer, petitcom.textureScaleMode);
|
{
|
||||||
|
texture = new GraphicPage(surface);
|
||||||
|
texture.createTexture(petitcom.renderer, petitcom.textureScaleMode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
~this()
|
~this()
|
||||||
{
|
{
|
||||||
@@ -192,6 +195,8 @@ class Dialog : DialogBase
|
|||||||
}
|
}
|
||||||
void renderContent()
|
void renderContent()
|
||||||
{
|
{
|
||||||
|
if (!message)
|
||||||
|
return;
|
||||||
glDepthMask(GL_FALSE);
|
glDepthMask(GL_FALSE);
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
|
|||||||
Reference in New Issue
Block a user