Adds layer on layer test.
@@ -164,6 +164,17 @@ public class SampleGUI {
buttonBuilder.setText("Button On A Layer");
buttonBuilder.setPosition(0, 0);
+ buttonBuilder.setOnClickFunction(() -> {
+ final Layer tmp = new Layer(new Dimension(5, 5), new Point(0, 1));
+
+ final ButtonBuilder bb = new ButtonBuilder();
+ bb.setText("Click");
+ bb.setPosition(0, 0);
+ bb.setOnClickFunction(() -> System.out.println("Yee"));
+
+ tmp.addComponent(bb.build());
+ buttonLayer.addComponent(tmp);
+ });
buttonLayer.addComponent(buttonBuilder.build());
layer.addComponent(buttonLayer);
