mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Merge pull request #994 from Azaezel/alpha41/fontcachegen
revise populateallfonts()
This commit is contained in:
commit
d887c27d95
1 changed files with 25 additions and 6 deletions
|
|
@ -641,13 +641,32 @@ function switchControlObject(%client, %newControlEntity)
|
||||||
%control.setConnectionControlObject(%client);
|
%control.setConnectionControlObject(%client);
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateAllFonts(%font)
|
function populateAllFonts()
|
||||||
{
|
{
|
||||||
populateFontCacheRange(%font,14,0,65535);
|
%fontarray = new ArrayObject();
|
||||||
populateFontCacheRange(%font,18,0,65535);
|
foreach( %obj in GuiDataGroup )
|
||||||
populateFontCacheRange(%font,24,0,65535);
|
{
|
||||||
populateFontCacheRange(%font,32,0,65535);
|
if( !%obj.isMemberOfClass( "GuiControlProfile" ) )
|
||||||
populateFontCacheRange(%font,36,0,65535);
|
continue;
|
||||||
|
%fontarray.push_back(%obj.fontType,%obj.fontSize);
|
||||||
|
}
|
||||||
|
%fontarray.uniqueKey();
|
||||||
|
|
||||||
|
%fontarrayCount = %fontarray.count();
|
||||||
|
|
||||||
|
echo("Generating "@ %fontarrayCount @" fonts");
|
||||||
|
for (%i=0;%i<%fontarrayCount;%i++)
|
||||||
|
{
|
||||||
|
%font = %fontarray.getKey(%i);
|
||||||
|
%hieght = %fontarray.getValue(%i);
|
||||||
|
schedule(1000*%i,0,"delayedFontsPopulation",%font, %hieght, %i+1);
|
||||||
|
}
|
||||||
|
%fontarray.delete();
|
||||||
|
}
|
||||||
|
function delayedFontsPopulation(%font, %hieght, %fontNum)
|
||||||
|
{
|
||||||
|
echo("Font ["@ %fontNum @"] Generating "@ %font SPC %hieght);
|
||||||
|
populateFontCacheRange(%font,%hieght,1,65535);
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue