Giter VIP home page Giter VIP logo

sushi-3.1's Introduction

Preview News Donate Community

Sushi-3.2 ๐Ÿฃ

Sushi is a GUI framework for the game World of Warcraft, designed to be:

  • Completely object oriented.
  • Versatile and easily extendable.
  • A taint-free alternative to frequently used objects (for example, dropdowns)
  • Similar to Blizzard's API and hence, easy to learn.

Requires LibStub and Poncho-2.0.

How to Use

For instance, imagine you wish to create a dropdown choice menu. To do so, you can simply call the Sushi.Choice class:

local myMenu = LibStub('Sushi-3.2').Choice(MyParent)
myMenu:SetPoint('CENTER')

myMenu:SetLabel('My Awesome Dropdown')
myMenu:AddChoice('Salmon')
myMenu:AddChoice('Grouper')
myMenu:AddChoice('None')

myMenu:SetCall('OnInput', function(self, value)
	if value == 'None' then
		print('Not hungry?')
	else
		print('You cannot have it.')
	end
end)

๐Ÿ’ก Three things of note in this snippet:

  • Functionality is available as methods, never as attributes.
  • SetCall work much alike the native SetScript, except it is a method defined by the library. Multiple functions can be assigned to a single event.
  • If you release the frame myMenu, all attributes assigned to it and properties modified trough class methods will be cleared.

Available Classes

Each class is defined in it's own .lua file under the \classes directory. The library contains classes to display buttons, checkbuttons, dropdowns, editboxes, sliders, static popups, automatic layouts and more. Read the Class Reference for further details.

No class makes use of native code that can generate taint. For example, the Dropdown frame implementation does not make use of the UIDropDownMenu API.

โš ๏ธ Reminder!

If you use this library, please list it as one of your dependencies in the CurseForge admin system. It's a big help! ๐Ÿ‘

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.