{
if(block.type == FONT || block.type == ANCHOR)
{
- surface.TextFont(block.prevFont.font.font);
+ surface.TextFont(block.parent.font.font);
if(flags.render)
- surface.SetForeground(block.prevFont.textColor);
+ surface.SetForeground(block.parent.textColor);
}
block = block.next;
break;
}
+ //if(block)
+ {
+ if(block.type == FONT || block.type == ANCHOR)
+ {
+ surface.TextFont(block.parent.font.font);
+ if(flags.render)
+ surface.SetForeground(block.parent.textColor);
+ }
+ }
block = block.parent;
// Getting out of a block
if(block)
{
- if(block.type == FONT || block.type == ANCHOR)
+ /*if(block.type == FONT || block.type == ANCHOR)
{
surface.TextFont(block.prevFont.font.font);
if(flags.render)
surface.SetForeground(block.prevFont.textColor);
}
- else if(block.type == CENTER)
+ else */if(block.type == CENTER)
{
if(centered)
(*centered)--;
if(block.window)
{
width += block.window.size.w;
- height = Max(height, block.window.size.h);
+ height = Max(height, Max(26, block.window.size.h));
}
break;
}
surface.TextExtent(" ", 1, null, &th);
height = Max(height, th);
-
for(; textPos<block.textLen && !lineComplete;)
{
int w;
}
else if(block.halign == left || block.halign == right)
{
+ Font font = surface.font;
ComputeTable(surface, block, textPos, &width, &height, maxW, maxH, flags, y + sy, x + sx);
+ surface.font = font;
x += width;
*nextBlock = NextBlockUp(surface, block, centered, flags);
}
else
{
+ Font font = surface.font;
ComputeTable(surface, block, textPos, &width, &height, maxW, maxH, flags, y + sy, x + sx);
+ surface.font = font;
lineComplete = true;
*nextBlock = NextBlockUp(surface, block, centered, flags);
*nextTextPos = 0;