Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Latest commit

 

History

History
55 lines (44 loc) · 1.41 KB

README.md

File metadata and controls

55 lines (44 loc) · 1.41 KB

StablexUI Build Status

TBD

StablexUI Core

This library provides backend-independent part of StablexUI.

Installation

haxelib git stablexui-core https://github.com/StablexUI/Core.git master

Normally you don't need to explicitly include this library in your project, because it will be automatically included by StablexUI backend you choose.

Getting started

Install StablexUI Core and a backend (e.g. StablexUI Flash), then plug backend library into your project. You can also install a theme (e.g. FlatUI Theme). If you use a theme, you need to instantiate it before initializing StablexUI. Here is an initialization code required to get started:

import sx.Sx;
import sx.flatui.FlatUITheme;

class Main
{
    /**
     * Entry point to an app
     */
    static public function main ()
    {
        Sx.theme = new FlatUITheme();
        Sx.init(run);
    }


    /**
     * Entry point to your own code
     */
    static public function run ()
    {
        //Now you can create some widgets
        var button = new Button();
        button.text = 'Hello, world!';

        //add to `global` GUI root
        Sx.root.addChild(button);
    }
}