While I was
documenting NGUI in spanish I toyed with the UIGrid and UITable components, as well as the TweenWidth/TweenHeight components. Then I realized that it would be really cool to have a component that implements a grid-based responsive design in the way that the Bootstrap CSS template does:
Bootstrap 2 doc (easier to understand)Bootstrap 3 doc (latest version, harder to see if you're not familiarized with CSSWith NGUI, it would be cool to have a widget "UIResponsive" (similar to UITable/UIGrid) that divides the widget's area in a number of horizontal cells. Each children widget specifies how many grids spans/offsets horizontally. Each children receives its size automatically depending on the parent's size, allowing them to be located side by side.
For instance, imagine a parent UIResponsive component configured to spawn 12 cells (Bootstrap default). Two children widgets configured to take 6 cells each would be placed side by side each one taking the 50% of the width of the parent.
When the parent's width is smaller than a configured limit, then all children are given a full "row" as width (100% of width of the parent), and stacked vertically.
Such "UIResponsive" component wouldn't be difficult to implement and would provide a new world of possibilities for NGUI and dynamic layouts, for instance between portrait/landscape in mobile.
Edy