Note: The recommended way to use Haxegon is to install it via haxelib:
haxelib install haxegon
- The library is now fully documented at http://www.haxegon.com.
- Added three new examples to the haxegon-samples repo: Moving Hexagon, Simple Mouse Game, and Unlicensed Ball and Paddle game.
Text.changesize()are deprecated. To replace them, there are two new variables in Text.hx.
Text.font = "pixel"; // Set the font to "pixel" Text.size = 5; // Set the font's size to 5
Added support for changing framerate at runtime:
Core.fps = 30; // Set the framerate to 30fps
Core.time, a variable that gives you a counter in seconds since the start of the game:
Text.display(0, 0, Core.time + " seconds since game started");
Added some new functions to
//These functions now match the ones in Input.hx Mouse.leftheldpresstime(); //Returns the number of frames the left mouse button is held Mouse.rightheldpresstime(); //Returns the number of frames the right mouse button is held Mouse.middleheldpresstime(); //Returns the number of frames the middle mouse button is held //This function was missing Mouse.middledelaypressed(delay:Int); //Returns true every N frames when middle mouse button is held
Added a new string function,
subtractfromleft(currentstring:String, length:Int = 1), because I always end up writing one:
var example:String = "img:doge.png"; var imgfile:String = S.substractfromleft(example, 4); //imgfile is now "doge.png";
Gfx.clearcolor:Int, which replaces the older
Gfx.clearscreeneachframe:Bool. You can now set the background colour to change to at the start of each frame, or set it to
Col.TRANSPARENTto have a persistent background.
- Added volume level support to
Music.playsound(soundname:String, volume:Float, offset:Float);
- Fixed a crash when drawing primitives in Main.new().
- General library cleanup, internal functions set to private so they don’t appear in autocomplete.
- Renamed some functions in Music.hx. This is in advance of a general cleanup I’m planning for the next update.
- Renamed some variables in Mouse.hx.
- In Mouse.hx,
Mouse.cursormoved()are functions instead of Booleans. (Since you can’t meaningfully set thier values.)
Scene.getcurrentsceneclass()set to private.
- New default font is Verdana, size 24.
- Removed Mouse.visitsite() - it’s a weird flash specific thing, and flash is a legacy target.
- Fixed a bug where
Gfx.screenheightreturned 0 in Main.new().
- Fixed a crash bug if you called
Text.width()without setting a font first.