Some writing/reading fixes, module declaration
- "Apply" button doesn't automatically close settings
- Increases the name length to 1024 characters (#6)
- Fixes some reading/writing issues (#7)
- Filenames display correctly in log
- Adds
ModSettingsModule
declaration for conditional compilation (#6)
Mods can now declare their own functions to make calling ModSettings.RegisterListenerToClass
easier (replace LTBF_
with your own name):
@if(ModuleExists("ModSettingsModule"))
public func LTBF_RegisterListener(listener: ref<IScriptable>) {
ModSettings.RegisterListenerToClass(listener);
}
@if(!ModuleExists("ModSettingsModule"))
public func LTBF_RegisterListener(listener: ref<IScriptable>) { }
@if(ModuleExists("ModSettingsModule"))
public func LTBF_UnregisterListener(listener: ref<IScriptable>) {
ModSettings.UnregisterListenerToClass(listener);
}
@if(!ModuleExists("ModSettingsModule"))
public func LTBF_UnregisterListener(listener: ref<IScriptable>) { }