Galton box animation: Difference between revisions
m
→{{header|Phix}}
m (→{{header|REXX}}: elided text from the REXX section that is no longer true (concerning the name of the program to clear the terminal screen).) |
|||
Line 2,476:
=={{header|Phix}}==
=== console ===
First, a console version:
<lang Phix>constant balls = 80
Line 2,547 ⟶ 2,548:
.......................
</pre>
=== gui ===
Also, here is a slightly nicer and resize-able gui version:
{{libheader|Phix/pGUI}}
<lang Phix>-- demo\rosetta\GaltonBox.exw
constant TITLE = "Galton Box"
Line 2,629:
cdCanvasSetBackground(cddbuffer, CD_GREY)
return IUP_DEFAULT
end function
Line 2,648 ⟶ 2,643:
dlg = IupDialog(canvas)
IupSetAttribute(dlg, "TITLE", TITLE)
IupCloseOnEscape(dlg)
IupShow(dlg)
IupSetAttribute(canvas, "RASTERSIZE", NULL)
|