Giter Club home page Giter Club logo

libsettings's Introduction

LibSettings

LibSettings is an API wrapper designed to simplify the process of creating settings layouts in World of Warcraft. It leverages the native Settings API provided by the game, but is considerably less verbose when defining and managing settings.

Functions

Create(props, owner, layout)

Creates a new settings object with the given properties, owner, and layout. It registers the created object in the add-on category and stores it in the registry.

Parameters:

  • props: The properties of the settings object.
  • owner: The owner of the settings object.
  • layout: The layout of the settings object.

Returns:

  • The created settings object.

Add(props, owner, layout)

Creates a new settings object with the given properties, owner, and layout.

Parameters:

  • props: The properties of the settings object.
  • owner: The owner of the settings object.
  • layout: The layout of the settings object.

Returns:

  • The created settings object.

LoadAddOnCategory(name, generator, callback)

Loads a category from an add-on. It waits until the add-on is loaded before creating the category, allowing saved variables to be loaded first.

Parameters:

  • name: The name of the add-on to load settings for.
  • generator: A function to generate a props tree.
  • callback: An optional function to call when the category is created.

AppendAddOnCategory(name, generator, callback)

Appends more settings to an add-on category. It waits until the add-on is loaded before creating the category, allowing saved variables to be loaded first.

Parameters:

  • name: The name of the add-on to observe.
  • generator: A function to generate an appendage props tree.
  • callback: An optional function to call when the appendage is created.

Get(id)

Retrieves a widget tree from the registry by its unique identifier.

Parameters:

  • id: The unique identifier of the widget tree.

Returns:

  • The widget tree from the registry.

Open(category)

Open a category in the settings panel, by the result object from creating the category.

Parameters:

  • category: The category object to display in the settings panel.

Returns:

  • Successfully opened the category.

OpenByID(id)

Open a category in the settings panel, by the ID from creating the category.

Parameters:

  • id: The category ID where the category is stored in the registry.

Returns:

  • Successfully opened the category.

Properties

Registry

This property is a table that stores all the created settings objects.

Types

This property is an enumeration of available widget and category types, mapped to factories.

libsettings's People

Contributors

seblindfors avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

libsettings's Issues

Stand alone UI windows

From the Wiki, it's unclear if config windows can be made to be stand alone, similar to AceGUI. Having a stand alone configuration screen as optional would be great.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.