Getting Started - PXshadow/App GitHub Wiki
Introduction
App is a Library written by me for the General purpose of UI applications for desktop and strong mobile support. App is used daily by me to currently create a mobile application that is comprised of a lot of custom svg's from a Digital product Design platform called Invision which means I need to extremely fast create assets and begin using them with all of there intended use straight out of the box.
Cores
App is comprised of main Cores example: import core.__;
which are called throughout the app to add functionality and keep things neat.
App
Works Similar to openfl.Lib or FlxG where all of the main functionality is comprised from here including easily creating Components, links to all other cores, and main code such as event resizing.
State
A state Class that is essentially a group of Display Objects that gives you public functions to override such as update, mouseDown, mouseUp, keyUp, keyDown, resize. and easy workflow to remove old States with App.state.remove();
and add new states after with App.state = new State();
Keep in mind this does not protect against multiple States being created without remove make sure you clean with Remove which is null safe.
InfoDebug
a simple text field that is created to show debug content such as frame rate, memory, version, scaling, and if mobile. It is not created #if release
but if you don't want it during debug you can use App.infoBool = false;
before create a new App();
Text
pre built openfl TextField that behaves like a static TextField, uses App.textFormat
path to get a font name internally
Button
a Custom Button class that is very fast to create memory safe button functions. Example:
var button = App.createButton(0,0,"assets/to/image/or/svg");
button.Down = function(e:MouseEvent)
{
trace("pressed");
}
button.Up = function(e:MouseEvent)
{
trace("not pressed");
}
addChild(button);
InputText
Custom TextField that can have a placeholder, mobile html5 support for suggested words and better soft keyboard pull up support.
Networking
websocket Client with networking Serialization to turn Dynamic data into Strings and received data of a string back into Data. Also built in not allowed to send same message to server sent last time.
Url State
Used to set certain Url end links to trigger State Changes on startup also grabs data is available. Example:
In main class before new App(); is called.
App.urlArray = [new core.UrlState("init",Init)]);
therefore if you did somthing like localhost:2000/?init it would take you to init. and to in RunTime set Url Example in Init state class New function:
js.Browser.window.history.replaceState('init','init',js.Browser.location.pathname + "?init/" + data);
and to retrieve data as a String from the Url.
UrlState.data