From ca5728cbafba197ae9cbf7bacd40a78dc8c6ee56 Mon Sep 17 00:00:00 2001 From: Argus74 <57573870+Argus74@users.noreply.github.com> Date: Sun, 12 Feb 2023 23:53:09 -0500 Subject: [PATCH] Fixed Event Handler Code example --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e6b4949..b62d7b6 100644 --- a/README.md +++ b/README.md @@ -310,7 +310,7 @@ To change the order of controllers, use Controller.bringToFront() which will pos To render controllers into separate windows please see example [ControlP5frames](examples/use/ControlP5frames/ControlP5frames.pde), this example demonstrates how to open multiple frames each running its own instance of ControlP5. With previous version of ControlP5 the ControlWindow class would allow you to add and open new windows with 1 command, this comand though has been removed when all references to java.awt.* had been removed to make ControlP5 work with Android. ## Event Handling -` import controlP5.*; +```java import controlP5.*; boolean on = false; @@ -360,7 +360,8 @@ public void ButtonA(boolean flag) { { on = false; } -}` +} +``` #### Linking a Variable or Function to a Controller #### ControlEvent