Package com.github.dunnololda.scage.support.messages

Examples of com.github.dunnololda.scage.support.messages.ColoredString.text()


    if (displayList != null) GL.glNewList(displayList.id, SGL.GL_COMPILE_AND_EXECUTE);
        if(size != max_size) GL.glScalef(size/max_size, size/max_size, 1);

        ColoredString colored_text = new ColoredString(text, color);
       
    char[] chars = colored_text.text()/*.substring(0, endIndex)*/.toCharArray();
    GlyphVector vector = font.layoutGlyphVector(GlyphPage.renderContext, chars, 0, chars.length, Font.LAYOUT_LEFT_TO_RIGHT);

    int maxWidth = 0, totalHeight = 0, lines = 0;
    int extraX = 0, extraY = ascent;
    boolean startNewLine = false;
View Full Code Here


    boolean startNewLine = false;
    Texture lastBind = null;
    for (int glyphIndex = 0, n = vector.getNumGlyphs(); glyphIndex < n; glyphIndex++) {
      int charIndex = vector.getGlyphCharIndex(glyphIndex);
      /*if (charIndex < startIndex) continue;*/
      if (charIndex > colored_text.text().length()) break;
           
            if(colored_text.colorSwitches().containsKey(charIndex)) {
                Color c = colored_text.colorSwitches().get(charIndex).toSlickColor();
                GL11.glColor3f(c.r, c.g, c.b);
            }
View Full Code Here

            if(colored_text.colorSwitches().containsKey(charIndex)) {
                Color c = colored_text.colorSwitches().get(charIndex).toSlickColor();
                GL11.glColor3f(c.r, c.g, c.b);
            }
           
      int codePoint = colored_text.text().codePointAt(charIndex);

      Rectangle bounds = getGlyphBounds(vector, glyphIndex, codePoint);
      Glyph glyph = getGlyph(vector.getGlyphCode(glyphIndex), codePoint, bounds, vector, glyphIndex);

      if (startNewLine && codePoint != '\n') {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.