For example in PHP I'd do
<?php class button { public clickEvent; public posX; public posY; private removeEvent; public function __contruct ( x, y, text, fg, bg ) { /* Code here */ } /* ETC */ public function clicked(...){...} public function removed(...){...} } $btn = []; $btn[] = new button ( 1, 1, 'Hello world', colors.blue, colors.white ); ?>
But how would I do this in LUA without having tons of functions that requires to do functonname (table, btn, parameters
Thanks in advance!