I found interesting thing about ButtonUp/ButtonDown functions. When I declare file and filebuffer in the same class where Button func is declared, and then open file like this:
--------------------------
loop_script_f = fopen(GetPath("resource\\loop_script.txt", path), "rb");
loop_script_size = fread(loop_script, sizeof(char), LUAL_BUFFERSIZE, loop_script_f);
--------------------------
and when I press any button, whole buffer contents becomes totaly destroyed. I wonder if that should be.
--------------------------
loop_script_f = fopen(GetPath("resource\\loop_script.txt", path), "rb");
loop_script_size = fread(loop_script, sizeof(char), LUAL_BUFFERSIZE, loop_script_f);
--------------------------
and when I press any button, whole buffer contents becomes totaly destroyed. I wonder if that should be.