1
Можно ли изменить размер панели в NiftyGui во время работы приложения? Я попробовал этот код: //init
NiftyGui - как изменить размер панели
mainScreen = new ScreenBuilder("main") {{
controller(sc);
layer(new LayerBuilder("foreground"){{
childLayoutCenter();
panel(new PanelBuilder("p1"){{
childLayoutAbsoluteInside();
backgroundColor("#00ff00");
width("100%");
height("100%");
padding("10px");
panel(new PanelBuilder("p4"){{
x("100%");y("100%");
height("20%");
width("20%");
backgroundColor("#0000ff");
}});
}});
}});
}}.build(nifty);
//update()
Element f = nifty.getCurrentScreen().findElementById("p4");
f.getParent().layoutElements();
f.setHeight(f.getHeight() + 300);
и ничего не меняется.
Вы пробовали это? – d3dave
Конечно, и я потерпел неудачу. – gusili