private void init() { foreground.addWidget(loaded.getWidget("background").copy()); transitor.addWidget(loaded.getWidget("background").copy()); // Build the pages for (int i = 0; i < 4; ++i) { Widget normal = createCopy(); TextBox.get(normal.getWidget("title")).setContent(local("tag") + (i + 1)); for (int j = 0; j < 4; ++j) { normal.getWidget("" + j).addComponent(new HintHandler(j)); } normal.addComponent(new ForegroundPage(i)); add(i, foreground, normal); } for (int i = 0; i < 4; ++i) { Widget back = createCopy(); TextBox.get(back.getWidget("title")).setContent(local("tag") + (i + 1)); back.addComponent(new TransitPage(i)); add(i, transitor, back); } resetAll(); }
private void add(int i, LIGui gui, Widget w) { gui.addWidget("" + i, w); }