我有引号字符串数组,想在 libgdx 中显示。我正在做如下
public int quoteIndexNo =2;
public String[] quotes = {
"Sometimes the heart sees what is " +
"invisible to the eye. H. Jackson " +
"Brown, Jr.",
"Being deeply loved by someone gives" +
" you strength, while loving someone " +
"deeply gives you courage. Lao Tzu",};
font.draw(batch, quotes[quoteIndexNo], 50, 100);
但问题是,文本很大,它不能正确显示在屏幕上。如何确保单行中只有 15 个字符可见,而字符串的其余部分在另一行中可见。