Skip to content

v0.0.1

Choose a tag to compare

@Lyzev Lyzev released this 24 Jul 18:19
· 31 commits to master since this release
97dc251

Settings - v0.0.1

A flexible Kotlin library for seamless management and tracking of customizable application settings. Simplify the process of integrating user-configurable options into your projects.

Key Features

  • Effortless Setting Management: Create and manage settings effortlessly with a straightforward API.
  • Customizable Callbacks: Define custom logic for handling setting changes with ease.
  • Hidden Settings: Easily hide specific settings based on your application's requirements.
  • Intuitive Syntax: Use a concise and expressive syntax for checking setting conditions.
  • Lightweight and Efficient: The library has been designed to be lightweight, ensuring minimal overhead on your application.

Getting Started

To start using Settings in your Kotlin project, follow these simple steps:

  1. Add Settings as a dependency in your project.
  2. Define your custom settings by extending the Setting class with the desired data types and logic.
  3. Initialize and track your settings using the SettingManager.

Example

// Define a custom boolean setting
class TestSetting(
    container: KClass<*>,
    name: String,
    value: Boolean,
    hide: () -> Boolean = { false },
    change: (Boolean) -> Unit = {}
) : Setting<Boolean>(container, name, value, hide, change)

fun main() {
    // Create an instance of TestSetting with an initial value.
    val setting = TestSetting(TestSetting::class, "test", true)

    // Print the initial value of the setting.
    println(setting.value)

    // Change the value of the setting to 'false'.
    setting.value = false

    // Print the updated value of the setting.
    println(setting.value)
}

Version 0.0.1- Release Notes

  • Initial release of Settings.
  • Basic setting creation and management.
  • Customizable callbacks for setting changes.
  • Support for hiding settings based on custom conditions.
  • Simple and expressive syntax for checking setting conditions.

Contribution and Support

We welcome contributions from the community to improve and expand the capabilities of Settings. If you encounter any issues or have suggestions, please feel free to create an issue or submit a pull request.

For assistance with minor concerns, feel free to join our supportive community on the Discord server. Our friendly members and staff are ready to help you.

Happy coding with Settings!