New Widget: StaticLabel

I’ve just finished the creation of the new Widget “StaticLabel”. It utilizes the also new method in TextureCreator createTexture( String, Color3f, Font, int ), which creates a new Texture with a String drawn on it (’\n’ again wraps a line).

This way a Label isn’t assembled of many, many small rectagles, but only one Quad. This is much faster except when you change the text content very often.

StaticLabel extends Label and therefore supports everything Label supports. So you can switch to StaticLabel in place where needed.

Enjoy :slight_smile:

Marvin

Do you agree to my idea, that it would be best to replace the current Label class with the StaticLabel class (renaming StaticLabel to Label) and renaming Label to DynamicLabel? I think, in very most cases, this will be faster and nobody needs to change his code except for highly dynamic Labels.

Marvin

Yup…loie names that identify behavior…+1

+1

done.