Hedy is a gradual programming language to teach children programming. Gradual languages use different language levels, where each level adds new concepts and syntactic complexity. At the end of the Hedy level sequence, kids master a subset of syntactically valid Python.
Adding button in interface(linked with #3678)
The idea is to add a new keyword and syntax to enable the Hedy users to dynamically add buttons to the screen. The functionality of these buttons can then be programmed by the Hedy users themselves using the if a is pressed syntax that is already available for normal keypresses on the keyboard from level 5 onwards.
The new syntax will look like this:
foo is button
if foo is pressed print "Hello"
This will create an onscreen button and a variable in Hedy in which it is stored. Upon pressing it, the program will print "Hello" to the screen. Only one new keyword is necessary, namely 'button' and the syntax for variables and if statement will be reused to keep it intuitive.
This issue is for adding a button in the interface of Hedy, if a user runs a program with this syntax.
Adding button in interface (linked with #3678) The idea is to add a new keyword and syntax to enable the Hedy users to dynamically add buttons to the screen. The functionality of these buttons can then be programmed by the Hedy users themselves using the
if a is pressed
syntax that is already available for normal keypresses on the keyboard from level 5 onwards.The new syntax will look like this:
This will create an onscreen button and a variable in Hedy in which it is stored. Upon pressing it, the program will print "Hello" to the screen. Only one new keyword is necessary, namely 'button' and the syntax for variables and if statement will be reused to keep it intuitive.
This issue is for adding a button in the interface of Hedy, if a user runs a program with this syntax.