How to assign button event

in documentation nothing is said about the buttons and how to assign the button1 events without the CGE editor
There is something written on this site about buttons, but nothing is clear:
How to add this to TCastleWindow.The controls?
Where is TCastleWindow located.The controls?
Why does the debugger indicate that button1 is not a function?

  1. define the button in the “published” part (you need the unit CastleControls in the uses section)
  2. define the click procedure in the “private” part

  1. in the procedure start you have to define the click event

  1. write the click procedure (what should happen when you click the button)


1 Like