O'Reilly logo

Cinder – Begin Creative Coding by Krisjanis Rijnieks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. Talk to the User – Adding Interactivity and UI Events

In this chapter we will learn the following topics:

  • Detecting a key press on the keyboard
  • Detecting mouse movement and clicks
  • Creating an application that will use basic input for real-time control

We have used some of these functionality in the previous chapters, but here we will try to gain a more systematic overview of what kind of basic interactivity is possible with Cinder.

Handling events

Throughout this book we are writing a code that basically extends the functionality of the cinder::app::AppBasic class and base class App that it inherits. The methods that we are declaring and implementing are basically overrides of virtual functions that are built in the AppBasic and App classes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required