use of com.watabou.pixeldungeon.ui.BadgesList in project pixel-dungeon-remix by NYRDS.
the class BadgesScene method create.
@Override
public void create() {
super.create();
Music.INSTANCE.play(Assets.THEME, true);
Music.INSTANCE.volume(1f);
uiCamera.setVisible(false);
int w = Camera.main.width;
int h = Camera.main.height;
Archs archs = new Archs();
archs.setSize(w, h);
add(archs);
int pw = Math.min(160, w - 6);
int ph = h - 30;
NinePatch panel = Chrome.get(Chrome.Type.WINDOW);
panel.size(pw, ph);
panel.x = (w - pw) / 2;
panel.y = (h - ph) / 2;
add(panel);
Text title = PixelScene.createText(TXT_TITLE, GuiProperties.titleFontSize());
title.hardlight(Window.TITLE_COLOR);
title.measure();
title.x = align((w - title.width()) / 2);
title.y = align((panel.y - title.baseLine()) / 2);
add(title);
Badges.loadGlobal();
ScrollPane list = new BadgesList(true);
add(list);
list.setRect(panel.x + panel.marginLeft(), panel.y + panel.marginTop(), panel.innerWidth(), panel.innerHeight());
ExitButton btnExit = new ExitButton();
btnExit.setPos(Camera.main.width - btnExit.width(), 0);
add(btnExit);
fadeIn();
}
Aggregations