You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
shadow
Shadowing classes in haxe, means, overwriting an original source file with a local copy without needing to modify the original copy.
This is useful under situations where you want to test out changes to libraries, or change something to fit your projects needs.
Locate the full package of the file you wish to overwrite as an example - flixel/system/frontEnds/SoundFrontEnd.hx
Go to your own project and locate your source directory. Create a file called SoundFrontEnd.hx at the exact same destination. So it looks a little like: your_project_root/src/flixel/system/frontEnds/SoundFrontEnd.hx
Copy the contents of the original file (or a pr) to the file created within your project
You've now overwritten the original source file! Make any changes you wish to this file and it will apply to all SoundFrontEnd references, including inside libraries.
Notes:
it's even possible with a lib, as long as -lib newImplem is later than -lib oldImplem in hxml order
It replaces the entire file, but it is possible to replace specific vars and functions using a macro, if that is actually what you want.
The text was updated successfully, but these errors were encountered:
Explanation from the Haxe Discord:
shadow
Shadowing classes in haxe, means, overwriting an original source file with a local copy without needing to modify the original copy.
This is useful under situations where you want to test out changes to libraries, or change something to fit your projects needs.
Notes:
it's even possible with a lib, as long as -lib newImplem is later than -lib oldImplem in hxml order
It replaces the entire file, but it is possible to replace specific vars and functions using a macro, if that is actually what you want.
The text was updated successfully, but these errors were encountered: