ellypse / ellyb Goto Github PK
View Code? Open in Web Editor NEWVarious Lua tools bundled in a convenient library for my various projects of add-ons for World of Warcraft.
License: Apache License 2.0
Various Lua tools bundled in a convenient library for my various projects of add-ons for World of Warcraft.
License: Apache License 2.0
Total RP 3 and Extended uses table serialization to export some data that the user can then copy and paste, and in Storyline we will also have an export in the future so people can send us their 3D model scaling values.
The serialization code from Total RP 3 should be moved into Ellyb and improved. We will use base64 format when outputting a string to avoid issues with special characters (quotes, brackets, etc.) being modified when the text is pasted into some programs, resulting in a corruption of the data. Base64 will only output letters and numbers, which will remain intact.
For backward compatibility, the un-serialization should be able to handle both base64 and non-base64 encoded serializations.
We might want to secure the library to prevent from overriding functions from within add-ons using the library (especially since two add-ons can use the same instance of the library).
I will probably want to add a way to extend the library somehow though, and not just lock it down entirely.
I'm putting this here, but I am not a 100% sure if this live inside Ellyb or in a separated project.
The idea here is to have an in-game bug reporting tool (like a lib, usable by multiple add-ons) that will use the game's Twitter integration to send errors as screenshots to a specified Twitter account. The user can add a message of his own (not limited by Twitter's characters limitation), include one or more screenshots and one or more errors stack trace. The whole thing would be pieced together in one or more tweets to be sent with screenshots as attachments.
The library will register itself as an error handler and will allow other add-ons to register themselves, providing a Twitter account that will receive the reports. When an error happens, a message appears in the chat frame to suggest sending a bug report.
To make stack trace sendable, screenshots would be generated using a fullscreen frame that will show the stack trace and every information needed. Basically, to circumvent Twitter's limitation, every text that needs to be sent will be screenshotted first and then sent.
The add-ons could also provide data that should be attached to every bug report (version numbers, usage statistics, etc.).
We could imagine then having automation and OCR tools that would automatically read the screenshots and create tickets on GitHub ๐ค
It would be really interesting to have some kind of /framestack feature for the localizations. Type a command to enter a mode where having the cursor over a UI element will look for the localization keys in the localization table and display that key in the tooltip. It would make it easier for translators to know where to find a text in the localization tools (CurseForge).
1x totalRP3\libs\Ellyb\Assertions.lua:49: bad argument #2 to 'format' (string expected, got nil)
[C]: ?
totalRP3\libs\Ellyb\Assertions.lua:49: in function 'isType'
totalRP3\libs\Ellyb\GameEvents.lua:55: in function 'unregisterHandler'
totalRP3_Extended\quest\campaign.lua:62: in function <totalRP3_Extended\quest\campaign.lua:58>
totalRP3_Extended\quest\campaign.lua:220: in function 'handler'
totalRP3\core\impl\events.lua:110: in function 'fireEvent'
totalRP3_Extended\main.lua:205: in function 'removeObject'
totalRP3_Extended_Tools\list/list.lua:712: in function <totalRP3_Extended_Tools\list/list.lua:710>
totalRP3_Extended_Tools\list/list.lua:741: in function 'checkVersion'
totalRP3_Extended_Tools\list/list.lua:750: in function <totalRP3_Extended_Tools\list/list.lua:703>
totalRP3_Extended_Tools\list/list.lua:774: in function <totalRP3_Extended_Tools\list/list.lua:773>Locals:
(*temporary) = "Invalid variable type "%2$s" for variable "%1$s", expected "%3$s"."
(*temporary) = nil
(*temporary) = "string"
(*temporary) = "handlerID"
(*temporary) = "string expected, got nil"
No issue with TRP3 1.2.11.3.
(Same issue happened when I tried to start a campaign, seems like a lot of Extended events aren't working with the dev version)
Idea: Ellyb should hold its own settings, shared across all add-ons using Ellyb. The kind of settings that could be saved would be general, always true stuff, like language, date format and probably more.
Since SavedVariables are stored in each individual add-ons that kind of system would need to: reconcile the settings to use the latest up to date ones, and also propagate them to every add-on SaveVar (as we might disable one of them at any time, they all need to have the settings).
We will probably need a custom events module (like the game events one) to fire updates to all instances of Ellyb, but also make sure we only use one main instance (:GetMostUpToDateVersion) while keeping all instances as listeners.
I would like an abstraction layer to handle textures (especially icons, but not limited to them), to make it easy to use a texture using an ID or a path. This module would be especially useful in Total RP 3, see https://github.com/Ellypse/Total-RP-3/issues/76
A TexturesManager would have a mapping table of path <-> ID, but since the list would have to be maintained manually the system should handle the cases when this mapping is incomplete.
Textures will have :
A texture should only exist one (to limit the impact on memory). The textures manage would be pre-populated with known icons, which would offer IDE completion, and keep track of new textures. Textures should be accessed via the manager so it can check if it already has it in its database.
9x ...terface\Storyline\lib\Ellyb\Tools\Promise.lua:81: Trying to resolve a Promise that has already been resolved.
[C]:: in function 'error'
...terface\Storyline\lib\Ellyb\Tools\Promise.lua:81: in function 'Resolve'
...erface\Storyline\lib\Ellyb\Tools\Promises.lua:40: in function 'callback'
...terface\Storyline\lib\Ellyb\Tools\Promise.lua:53: in function 'Success'
...erface\Storyline\lib\Ellyb\Tools\Promises.lua:29: in function 'all'
Storyline\logic.lua:233: in function <Storyline\logic.lua:192>
Storyline\events.lua:827: in function <Storyline\events.lua:825>
I want to have an animations module in Ellyb. Animating stuff in WoW's UI is hard and a huge pain in the butt. The idea here is to have easy to use functions to make elements animable, with basic default animations, some neat built-in principles like cascading.
Example of what I see the usage be
-- Animate myFrame right away
Ellyb.Animations.animate(myFrame, Ellyb.Animations.SLIDE_IN, Ellyb.Animations.ORIGINS.TOP)
-- Fade in overlayTexture when the cursor is over myMouseOveredButton
Ellyb.Animations.animateOnMouseOver(myMouseOveredButton, Ellyb.Animations.FADE_IN, overlayTexture)
-- Pop in each line in listLines, calling the given callback when the animation is done (for each individual one)
Ellyb.Animations.animateCascade(listLines, Ellyb.Animations.POP_IN, function(listLine)
mapMarker:DoSomething()
)
-- Slide out myFrame from the left to right during 1.5 seconds using an elastic timing
Ellyb.Animations.slideOut(myFrame, Ellyb.Animations.DIRECTIONS.RIGHT, 1500, Ellyb.Animations.EASINGS.ELASTIC)
There's no issue tracker present on the middleclass submodule so I'll stick it here.
The recent changes to the middleclass code to overcomplicate things have a rather fundamental bug whereby assignments to fields on instances are actually clobbering the fields on every instance of a class.
The issue in particular is that class instances have their metatable set to class.__instancedict
(dict
in the linked function) which has a __newindex
function that, after the check for protectedness, assign the key/value to a proxy
table that is shared among all instances of the class.
The following example will trigger the fault.
local MyClass = AddOn_Lib_Middleclass("MyClass");
local instance_a = MyClass();
local instance_b = MyClass();
instance_a.my_field = "My String";
instance_b.my_field = "My Other String";
assert(instance_a.my_field ~= instance_b.my_field, "Both fields have the same value!!?!?!?");
The classic client is missing the API functions called by Unit:IsMountable()
as there were no mountable unit back then.
Expected result:
Unit:IsMountable()
should not error but instead return false
on Classic clients.
We would want a Mixin to use for search input that would automatically hook key presses and if Ctrl-F is pressed then focus the search input.
We probably need to account for multiple search fields being displayed and test if the parent is the topmost frame.
One issue with the design of the Color class is the constructor attempts to be too clever with the given values, accepting 0-1, 1-255, and hex inputs.
This isn't too bad, it's great for 99.9% of scenarios, but it does lead to subtle bugs where for example if the user has a custom color picker addon and they select an RGB value of (1, 1, 1) it'll get parsed as being fully white rather than mostly-black.
One such case where you'd run into this is actually the custom psycho trait colors in TRP3 - I've got ColorPickerPlus installed so if I use the default picker I can use the R/G/B input fields it provides. Setting them all to 1 would make the bar white, not black.
I think it'd be better to have some static constructors on the class (Color:fromRGBA
, Color:fromRGBAAsBytes
) to explicitly control what type of data range you're passing in when constructing the object. Thoughts?
Unset onUpdate script when table is empty, add to table when running instead of using a bool. Should remove empty onUpdates calls.
Known issue but just so it isn't forgotten, using Total RP 3 & Storyline together brings multiple errors from Ellyb on load : Deferred XML Node object named ... already exists
List of XML objects : Ellyb_LogsFrame, Ellyb_CursorFrameTemplate, Ellyb_ChatInputTextures, Ellyb_PopupButton, Ellyb_PopupButton_Okay, Ellyb_StaticPopTemplate
I want Ellyb to have a date/time module to easily format and do operations on dates and hours. The main goal is to format the time correctly according to the user localization.
It would probably be a good thing to look for a library that already does something similar and integrate it.
Dropdowns are a pain in the butt to handle in WoW. Using Blizzard's dropdown functions creates taint, and third party libraries are either not updated (PlaySound() issue in 7.3) or buggy (doesn't close dropdown when parent gets hidden).
I want Ellyb to have its own full featured Dropdown component.
Some of the key aspect:
While working on the color picker, I saw the Purple color in the ColorManager is magenta which is closer to pink. Purple should probably be (0.5, 0, 1).
very urgent pls fix
I want to make a UI Widget for warnings and alerts that shows a text in a red-ish frame that is animated and catch the eye. This would be used in places where some text has to catch the user's eye, but in a tasteful way, using glowing effects, maybe sound, animations when coming into view.
Provide an Editbox function to make a specific editbox keep track of its edits and allow the user to navigate through the edits using Ctrl-Z to go backward and Ctrl-Shift-Z to go forward.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.