Built on Starling for Adobe AIR and Flash Player, Foxhole consists of various UI controls designed for mobile, developed by Josh Tynjala. Foxhole's name comes from the fact that the author develops these components "under fire" for real projects, mostly games. Documentation is sparse. APIs may change completely and on a whim. The components aren't necessarily fully-featured. Use at your own risk.
Foxhole includes The following UI controls:
A single-line, non-interactive text control. Uses bitmap fonts. A simple replacement for starling.text.TextField
built on FoxholeControl
.
A typical button control, with optional toggle support. Includes a label and an icon, both optional.
A sliding on/off switch. A common alternative to a checkbox in mobile environments.
A typical horizontal or vertical slider control.
A touch-based, vertical list control. Has elastic edges and you can "fling" it.
A control similar to a combo box. Appears as a button when closed. The list is displayed as a fullscreen overlay on top of the stage.
A state machine for menu systems. Uses events or signals to trigger navigation between screens or to call functions. Includes very simple dependency injection.
An abstract class for implementing a single screen within a menu developed with ScreenNavigator
. Includes common helper functionality, including back/menu/search key handling, calculating scale from original resolution to current stage size, and template functions for initialize, layout and destroy.
The following external libraries are required. Other versions of the same library may work, but the version displayed below is the one currently used by the author.
- Starling v1.0
- GTween v2.01
- as3-signals v0.9 BETA
-
At this time, the components do not have default skins. All skins need to be set manually, and you're likely to see runtime errors if certain skins are omitted.
-
In most cases any Starling display object is acceptable as a skin. However, the
ToggleSwitch
control requires the use ofscrollRect
, which isn't currently available in Starling. Subclasses ofSprite
andImage
are included with working (but probably somewhat incomplete) implementations ofscrollRect
. -
Bitmap fonts are required for all text displayed in these UI controls. Use
BitmapFontTextFormat
to customize the text styles.BitmapFont
from Starling has been subclassed to add the missingbase
property defined in*.fnt
files. -
An Ant build script is included. Add files
sdk.local.properties
to override the location of the Flex SDK andbuild.local.properties
to override the locations of the required third-party libraries.