@SuppressWarnings("unchecked")
protected void initDebugTextListbox()
{
//((ListBox<DebugEntry>)nifty.getScreen("debugGUI").findNiftyControl("listbox", ListBox.class)).setListBoxViewConverter(new DebugEntryViewConverter());
ControlDefinitionBuilder rowControlBuilder = new ControlDefinitionBuilder("row") {
{
panel(new PanelBuilder() {
{
childLayoutHorizontal();
width("100%");
alignLeft();
text(new TextBuilder("#lbTextElem") {
{
width("100%");
style("base-font");
alignLeft();
textHAlignLeft();
}
});
}
});
}
};
rowControlBuilder.registerControlDefintion(nifty);
new ListBoxBuilder("debugEntries") {{ viewConverterClass(DebugEntryViewConverter.class); displayItems(12); selectionModeDisabled(); hideHorizontalScrollbar(); width("100%"); height("100%"); childLayoutVertical(); optionalVerticalScrollbar(); alignLeft(); valignBottom(); control(new ControlBuilder("row")); }}
.build(nifty, nifty.getScreen("debugGUI"), nifty.getScreen("debugGUI").findElementByName("chatpanel"));
debugEntries = nifty.getScreen("debugGUI").findNiftyControl("debugEntries", ListBox.class);