Skip to content

A library for implementing object-oriented frame classes with inheritance in World of Warcraft.

Notifications You must be signed in to change notification settings

Jaliborc/Poncho-2.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poncho-2.0 🎽

Patreon Paypal Discord

A library for implementing object-oriented frame classes with inheritance in World of Warcraft.

Simulating frame classes in World of Warcraft is not simple: Lua does not support classes by default and frames cannot be deallocated once created. Even further, frames can be assigned to xml templates and global names, which cannot be changed once set. Recently, Blizzard added APIs for handling classes as mixins, but they also come with their own set of limitations.

Overview

Creating frames in World of Warcraft is extremely simple:

frame = CreateFrame('Frame', 'SomeFrame', SomeParent, 'SomeTemplate')

Creating a new frame class using Poncho is very similar:

class = LibStub('Poncho-2.0'):NewClass('Frame', 'FrameNames', 'SomeTemplate')

Frames can then be created by calling the class object itself:

frame = class()

Subclasses then can be recursively inherited:

sublass = class:NewClass()

Classes also behave as frame pools, so frames can be released:

frame = class()
frame:Release()

More Information

For a quick guide on writting classes using Poncho and an API reference check the wiki.
If you use this library, please list it as one of your dependencies in the CurseForge admin system. It's a big help! 👍

About

A library for implementing object-oriented frame classes with inheritance in World of Warcraft.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages