-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Abstracts In Hscript #3777
base: develop
Are you sure you want to change the base?
Conversation
9338b19
to
5b33886
Compare
Does this work for abstract classes like |
For now it probably won't work, but i want to add support for it Currently atleast all the funkin abstracts and FlxColor work |
The error |
i already removed it |
can you give me your source code? |
oh btw i got this now
|
|
I found the issue: for (abstractCls in abstractClasses)
{
for (abstractCls in sortedAbstractClasses)
{ this should only loop through sortedAbstractClass, so you need to remove |
44d9f61
to
a1176e8
Compare
i just need to make it work for all abstracts
1ebf2ed
to
e9a1ee4
Compare
DESCRIPTION
This pr aims to make it possible to import abstract classes or enums.
The macro creates "wrappers" around the actual abstract.
NOTE
Currently these packages/classes are not supported:
thx.Set
(Template issue, specifically not being able to cast Dynamic to some other type)cpp.*
(some issue with cpp.Function.fromStaticFunction)lime.*
(Somehow duplicate fields, could not determinte type for parameter T)openfl.*
(Somehow duplicate fields, could not determinte type for parameter T)EXPLANATION
For example
flixel.util.FlxColor
:We create a class
polymod.abstracts.flixel.util.FlxColor
.This class has all static fields of
flixel.util.FlxColor
, and just calls the respective fields from the actualflixel.util.FlxColor
class. We then create an alias forflixel.util.FlxColor
and make it point topolymod.abstracts.flixel.util.FlxColor
.We also create a public static function called
create
, which will just call the constructor of theflixel.util.FlxColor
.EXAMPLES
TODO