> For the complete documentation index, see [llms.txt](https://docs.cherax.vip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cherax.vip/lua-documentation/api-reference/g_gui.md).

# g\_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();
```
