Git Product home page Git Product logo

kbt_uiassets's Introduction

KBT_UIAssets

A bunch of globally accessible assets for other addons to use that are a mashup of Blizz things.

Hi, this is planned as a way for me (and others who end up using this) to update assets without updating their main addons. The idea behind this is to be able to access a variety of textures by indexing a global variable table. In this case, it would be indexing KBT_UI. Within there are 4 major tables (at this moment), such as BG, LOGO, BORDER, and TILE. BG is for background textures, LOGO is for logos, crests, sigils, sysmbols, etc., BORDER is for textures that match Blizzard's backdrop edgeFile atlas, and TILE is for tile-able background textures. From there, index one of the valid fields, such as the url, width, and height.

An example of some usage could be:

KBT_UI.LOGO.Evoker.url

This variable contains a string directed to "Interface\\AddOns\\KBT_UIAssets\\Assets\\LOGO\\Evoker". Additionally you can do KBT_UI.LOGO.Evoker.width and KBT_UI.LOGO.Evoker.height to get the default intended values of the texture. In the case of this image, it would be numberical values of 1024 for both width and height (a square texture).

When you assign this variable to a texture (after making sure this addon is loaded), it should now assign that texture frame with the one selected in the table.

Even further, you could parse over the table info, as an example:

for k, v in pairs(KBT_UI.LOGO) do
  print("k: " .. k) -- the name
end

In this example, the output would result in:

k: Evoker
k: TextureName2
k: TextureName3

etc.

Using this, you could create a list of variable names for textures. As another example:

for k, v in pairs(KBT_UI.LOGO) do
  print("texture: " .. KBT_UI.LOGO[k]["url"]) -- the path
end

output:

texture: Interface\AddOns\KBT_UIAssets\Assets\LOGO\Evoker
texture: Interface\AddOns\KBT_UIAssets\Assets\LOGO\TextureName2
texture: Interface\AddOns\KBT_UIAssets\Assets\LOGO\TextureName3

etc.

this may be useful if you wanted to, say, bring up a list of textures to be auto-generated in another addon.

kbt_uiassets's People

Contributors

keyboardturner avatar

Watchers

James Cloos avatar  avatar

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.