GameConfig

Holds configuration data.

Summary
GameConfigHolds configuration data.
Functions
NKResetAllKeybindsClears all active keybinds and re-parses the keybinds data file.
NKSetKeybindSet a key combination to bind a function.
NKGetKeybindFromFunctionGet a key combination that is bound to a specified function.
NKGetCategoriesReturns a table that lists all of the keybind category names.
NKGetResolutionsReturns a table that lists all of the resolutions.
NKGetKeybindsReturns a table listing all of the keys bound in a specific category.
NKGetFunctionsReturns a table listing all of the functions bound in a specific category.
NKGetBoolConfigSearches for a config setting with a bool value by the given name.
NKGetIntConfigSearches for a config setting with an int value by the given name.
NKGetFloatConfigSearches for a config setting with a float value by the given name.
NKGetDoubleConfigSearches for a config setting with a double value by the given name.
NKGetStringConfigSearches for a config setting with a string value by the given name.
NKGetShadowQualityReturns the current shadow quality setting.
NKGetTextureFilteringReturns the current texture filtering setting.
NKSetBoolConfigSets a bool config setting.
NKSetIntConfigSets a int config setting.
NKSetFloatConfigSets a float config setting.
NKSetDoubleConfigSets a double config setting.
NKSetStringConfigSets a string config setting.
NKResetConfigResets a config option to its hardcoded default.
NKSaveConfigWrites the current config settings out to file.

Functions

NKResetAllKeybinds

Clears all active keybinds and re-parses the keybinds data file.

NKSetKeybind

Set a key combination to bind a function.

Parameters

stringThe key combination to be bound.
stringThe function name to bind them to.

Returns

stringThe name of the function the key combination was previously bound to, or NONE if it was not bound.

NKGetKeybindFromFunction

Get a key combination that is bound to a specified function.

Parameters

stringThe function name to find the keybind for.

Returns

stringThe keybind that is currently bound to the function.

NKGetCategories

Returns a table that lists all of the keybind category names.

Returns

TableList of all keybind category names.

NKGetResolutions

Returns a table that lists all of the resolutions.

Returns

TableList of all resolutions.

NKGetKeybinds

Returns a table listing all of the keys bound in a specific category.

Parameters

stringThe category to fetch keybinds from.

Returns

TableList of all keys bound within the specified category.

NKGetFunctions

Returns a table listing all of the functions bound in a specific category.

Parameters

stringThe category to fetch functions from.

Returns

TableList of all functions bound within the specified category.

NKGetBoolConfig

Searches for a config setting with a bool value by the given name.

Parameters

stringThe name of the config setting.

Returns

boolThe value of the setting.

NKGetIntConfig

Searches for a config setting with an int value by the given name.

Parameters

stringThe name of the config setting.

Returns

intThe value of the setting.

NKGetFloatConfig

Searches for a config setting with a float value by the given name.

Parameters

stringThe name of the config setting.

Returns

floatThe value of the setting.

NKGetDoubleConfig

Searches for a config setting with a double value by the given name.

Parameters

stringThe name of the config setting.

Returns

doubleThe value of the setting.

NKGetStringConfig

Searches for a config setting with a string value by the given name.

Parameters

stringThe name of the config setting.

Returns

stringThe value of the setting.

NKGetShadowQuality

Returns the current shadow quality setting.

Returns

intThe current shadow quality setting.

NKGetTextureFiltering

Returns the current texture filtering setting.

Returns

intThe current texture filtering setting.

NKSetBoolConfig

Sets a bool config setting.

Parameters

stringThe setting name.
boolThe setting value.

Returns

boolTrue if the setting was successfully set, false otherwise.

NKSetIntConfig

Sets a int config setting.

Parameters

stringThe setting name.
intThe setting value.

Returns

boolTrue if the setting was successfully set, false otherwise.

NKSetFloatConfig

Sets a float config setting.

Parameters

stringThe setting name.
floatThe setting value.

Returns

boolTrue if the setting was successfully set, false otherwise.

NKSetDoubleConfig

Sets a double config setting.

Parameters

stringThe setting name.
doubleThe setting value.

Returns

boolTrue if the setting was successfully set, false otherwise.

NKSetStringConfig

Sets a string config setting.

Parameters

stringThe setting name.
stringThe setting value.

Returns

boolTrue if the setting was successfully set, false otherwise.

NKResetConfig

Resets a config option to its hardcoded default.

Parameters

stringThe setting name.

Returns

boolTrue if the setting was successfully reset, false otherwise.

NKSaveConfig

Writes the current config settings out to file.

Close