Skip to content

Latest commit

 

History

History
61 lines (46 loc) · 1.99 KB

README.md

File metadata and controls

61 lines (46 loc) · 1.99 KB

Appcelerator Titanium Appcelerator Alloy License Travis

Pretty Menu

This widget can be used to insert fancy menus in an app window. It's possible to define a menu as an icon and a title. All icons are provided by FontAwesome font; Refer to their documentation to find which icon is available.

How to install

  • gittio install ts.prettymenu or simply git clone https://thesmiths-widgets/ts.prettymenu
  • Then, copy the content of the assets folder into yours to install fonts

Previews

screenshot

How to use

Please, refer to the documentation for more details and options.

index.js

function handleClick (id) {
    alert("Menu " + id + "clicked!");
}

$.prettyMenu.init(
    [
        { id: "menu:profile", icon: "fa-eye", title: "Mon profil", onClick: handleClick },
        { id: "menu:question", icon: "fa-question", title: "Questions", onClick: handleClick },
        { id: "menu:help", icon: "fa-help", title: "Aide", onClick: handleClick },
        { id: "menu:logout", icon: "fa-flag-o", title: "Deconnexion", onClick: handleClick }
    ], {
        horizontalMargin: 10,
        perRow: 2,
        verticalMargin: 10,
        width: 100
    }
);

index.xml

<Alloy>
    <Window>
        <Widget src="ts.prettymenu" id="prettyMenu" />
    </Window>
</Alloy>

wearesmiths