updates for scene2d GUIs and ImmediateModeRenderer

We’ve been working on a few things lately. There are many small improvements and a few larger ones that impact existing code somewhat:

  • Mario used TableLayout in libgdx for the scene2d GUI stuff, which is cool… except that he forked it, checked all the source into libgdx, and put a thin veneer of poo over it in the form of the Container class. 😉 Actually, TableLayout had thus far been focused on the DSL and his Container class provided a much better Java API, but I didn’t like having an additional layer on top of TableLayout. I’ve integrated his ideas from Container into TableLayout, which means Container is now gone. In it’s place you just use the TableLayout API directly, ie create a Table instead of a Container. Table has similar methods, and you can call Table#getTableLayout() for more advanced methods.

  • ImmediateModeRenderer has been renamed to ImmediateModeRenderer10, to better match with ImmediateModeRenderer20. There is now an interface named ImmediateModeRenderer which both 10 and 20 implement, so the same drawing code can work with both GL1.x and GL2.0.

  • New methods on the Xml class, our super lightweight (single method!) XML parser. There is also a new class: XmlWriter. This is a builder style XML emitter.

One thought on “updates for scene2d GUIs and ImmediateModeRenderer

  1. Pingback: URL

Leave a Reply

Your email address will not be published.