MovingBlocks/Terasology — Issue #190: Event-driven 2D GUI components
Author: rapodaca
Created: 2012-03-03 18:08:22+00:00
State: open

After evaluating at various levels of detail available options for 2D on 3D GUI frameworks (e.g., Swing, TWL, nifty-gui, and Thingie), and based on feedback from belga, it seems that our approach of creating a home-grown 2D gui toolkit is the best option.

The base functionality currently does exist, with org.terasology.rendering.gui.framework.UIDisplayElement as its top-level component.

The problem is that this widget system is neither even-driven nor especially modular. This has led to tight coupling between model-level behavior (e.g., Inventory) and display behavior (e.g., UIInventory). I've done some work with MVC approaches and think the same treatment here, in a lightweight way, could offer the project big advantages as we begin to build out the complexity of the 2D UI.

This system should support loose coupling between model-level objects (such as Inventory) and GUI elements (such as InventoryView), such that overall behavior can be directed through a controller.