3 ms·
If you have an object-oriented language (or near enough) with usable function types you can still emulate "traditional" GUI things if you really want to. Behold
by repsilat 14y ago
If you have an object-oriented language (or near enough) with usable function types you can still emulate "traditional" GUI things if you really want to. Behold:
class ButtonObj
method call():
if(button(label, loc) callback()
member Rect loc
member String label
member Func callback
list displayList = [];
displayList.add(ButtonObj("label", 100, 100, buttonAction))
Func eventLoop():
for i in displayList:
i.call()