g_gui

Options to communicate with the default gui.

g_lua.register();

myBoolean = false;
myLongLong = 1337;

g_gui.add_toggle("misc_lua", "Test Toggle", "test tooltip", function(on) myBoolean = on; end);
g_gui.add_input_int("misc_lua", "INPUT", myLongLong, 50, 20000, 5, 100, function(val) myLongLong = val; end);
g_gui.add_input_string("misc_lua", "text", "default", function(val) g_logger.log_info("in callback " .. val); end);

while g_isRunning do

	g_logger.log_info("myLongLong is: " .. myLongLong);
	g_util.yield(1000)
end

g_lua.unregister();

Last updated