Skip to content

Commit

Permalink
Adds layer on layer test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Valkryst committed May 15, 2018
1 parent 6a75016 commit ab7f274
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions samples/component/SampleGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,17 @@ public static void main(final String[] args) throws IOException {

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);
Expand Down

0 comments on commit ab7f274

Please sign in to comment.