From ab7f274dab3708f79209f7a50d8b950aa85bcc09 Mon Sep 17 00:00:00 2001 From: Valkryst Date: Tue, 15 May 2018 19:40:49 -0300 Subject: [PATCH] Adds layer on layer test. --- samples/component/SampleGUI.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/samples/component/SampleGUI.java b/samples/component/SampleGUI.java index 80ad49d98f..5ad6dd4f8f 100644 --- a/samples/component/SampleGUI.java +++ b/samples/component/SampleGUI.java @@ -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);