DJFLIXEL is a set of tools and helpers for HaxeFlixel. It needs a minimum initialization of its main static class D.hx
and then you are all set to use all of the components in your projects.
haxelib install git djFlixel https://github.com/johndimi/djFlixel.git
A multi-page menu system. Useful to create main menus and option menus. It's very simple to setup and use. Supports links, checkboxes, list selection, number selection (float, ints). Almost everything is customizable from the cursor image, alignment, colors, animation times and more.
Versatile autotype text object that supports a simple inline tagging system. Meaning that you can insert special tags in the source string and change the behavior on the fly. You can change the speed, add pauses and even trigger callbacks.
djFlixel offers the public static class D.hx
for accessing some minor objects and helpers. It is available in the package djFlixel.D
What is included in D
:
D.snd
: Offers some sound functions, like playing assets with only the short filename or setting predefined volumes for soundsD.ctrl
: Streamlined control polling. Check once and get gamepad/keyboard presses. Also ability to change keymapD.save
: Save functions helper.D.dest
: Helper object offering extra destroying functions, like tweens, or timers (Use it like FlxDestroyUtil)D.assets
: Used in development, tries to load/reload assets from their real path so that you can make changes without having t to recompile the program again. Just do an asset reload, reset the state, and new assets will be fetched (Most useful for.json
and other configuration files)D.text
: Offers quick generation of flxText objects with custom styles. Provides its own text styling struct. The entirety of djFlixel relies on this object to get and style flxTextsD.align
: Tools to align flxSprites. Align then in relation to the screen or to each other on in columns. Offers many options.D.ui
: UI related helpers. Provides generation of the build-in djFlixel icons.D.bmu
: General purpose BitmapData Manipulation tools.D.gfx
: Flixel/djFlixel specific Bitmap Manipulation tools. -- There is a reason this is separate fromD.bmu
--
In the folder/package djflixel/gfx
you can find some tools for creating various effects like static, rainbow loader, starfield, text sine scroller, text bouncer etc. All of the effects offer many customization options.
Some of the effects
djFlixel has some built-in general use icons. Icons come in sized of 8,12,16,24
pixels wide and tall. Icons are accessible from the D.ui
object. Also , you can use the bitmap tools in D.bmu
to colorize the icons.
// Sprite icon of a heart colored red
var ic = new FlxSprite(D.bmu.replaceColor(D.ui.getIcon(16,'heart'),0xFFFFFFFF,0xFFFF0000));
In the tool D.bmu
you can find a useful slice9 scaler, that works by tile-repeating the inner parts, It generates bitmapdata
objects so you can use it however you want.
In the /demo
folder you can find the sources for a demo program that will showcase many components of the library. You can download a binary here (Windows Only)
In the source files you will find two extra namespaces djA
and djfl
.
djA
includes some target agnostic code. Code that can be used in all HAXE targets, like nodejs.djfl
includes code that is specific to OpenFL.
Those are partial personal libraries that I use in some projects, but I'll probably never going to publish. So I did a copy paste of the specific files djflixel uses and put them in a proper namespace folder structure, so djFlixel compiles. And that I don't have to alter anything for my own projects when I include the libraries with <haxelib name="djA"/>
DJFLIXEL version : 0.4 , License : MIT
Requires : Haxe 4.1.3, HaxeFlixel 4.7.0
Author : John Dimi 2016-2020
This library started as a helper for my projects, but later decided to open source and distribute it.
Please note that this is just a side project of mine and I cannot guarantee any support or bugfixes.
I have tried to provide meaningful comments throughout the source files, also make sure to checkout the demo in the /demo
folder for a full working example of using the library.
This library started in 2015-2016, but recently I reseted the commit history to a fresh start. The older versions are available in the TAG releases here on GitHub.
Thanks for checking this out 😸,
John.