public static int getLongestStringNPCName() { AppEngine canvas = AppEngine.getCanvas(); UIInfoScreen infoScreen = canvas.getSceneGame().getInfoScreen(); SimData simData = canvas.getSimData(); if (infoScreen.m_longestStringNPCName == 0) { int num = 0; int simCount = simData.getSimCount(); for (int sim = 1; sim < simCount; ++sim) { int simName = simData.getSimName(sim); int stringWidth = canvas.getTextManager().getStringWidth(simName, 3); if (stringWidth > num) { num = stringWidth; } } infoScreen.m_longestStringNPCName = num; } return(infoScreen.m_longestStringNPCName); }