Jumar is working on a WYSIWYG UI editor and a cross platform (HTML based) UI library which will appear in V3 of DS first as a new type of app which we will probably call a 'Hybrid' app.
The UI parts of this new library will work cross-platform and probably be under the ui.* namespace whereas the existing app.* namespace will have to be partially ported to other platforms as we bring them online. Enjine.io will be free for hobby users, so you won't need another subscription.
If you want a sneak preview of the new 'Hybrid' UI ,then paste the following code into the latest beta version of DS.... but don't tell anyone about this yet as it's top secret ;)
cfg.Hybrid
//Called after application is started.
function onStart()
{
mainLay = ui.addLayout(null, "linear")
apb = ui.addAppBar(mainLay, "My App", "menu", 1)
apb.setOnMenu(openDrawer)
apbLay = ui.addLayout(null, "Linear", "Horizontal,Right,NoDom,VCenter")
apbTextField = ui.addTextField(apbLay, "", "outlined,secondary,small", 0.2)
apbTextField.setPlaceholder('Search something...')
apbBadge = ui.addButton(apbLay, "notifications", "icon")
apbBadge.setTextColor('#ffffff')
apbBadge.setBadge(9, 'primary')
apbBtn = ui.addButton(apbLay, "account_circle", "Icon")
apbBtn.setTextColor('#ffffff')
apbBtn = ui.addButton(apbLay, "more_vert", "Icon")
apbBtn.setTextColor('#ffffff')
apb.addLayout(apbLay)
//Dark/light toggle button
btnBright = ui.addButton( mainLay, "brightness_5", "icon,primary" )
btnBright.setOnTouch(btnBright_onTouch)
// buttons lay
btnLay = ui.addLayout(mainLay, "linear")
btnLay.setOptions("Horizontal")
btnLay.setMargins(0, 0.01, 0, 0)
btnLay1 = ui.addLayout(btnLay, "Linear", "VCenter", 0.48)
btn1 = ui.addButton( btnLay1, "Primary", "primary")
btn1.setOnTouch( function() {
this.setText('This is another long text')
} )
btn1.setFontFile('fonts/ExtraBold.ttf')
btn2 = ui.addButton( btnLay1, "Secondary", "secondary" )
btn2.setOnTouch( function() { ui.showPopup( this.margins.top ); Vibrate() })
//Text buttons
layHoriz = ui.addLayout( btnLay1, "Linear", "Horizontal")
btn = ui.addButton( layHoriz, "Default", "text")
btn = ui.addButton( layHoriz, "Primary", "text,primary")
btn = ui.addButton( layHoriz, "Secondary", "text,secondary" )
//Outlined buttons
layHoriz = ui.addLayout( btnLay1, "Linear", "Horizontal")
btn = ui.addButton( layHoriz, "Default", "outlined")
btn = ui.addButton( layHoriz, "Primary", "outlined,primary")
btn = ui.addButton( layHoriz, "Secondary", "outlined,secondary")
layHoriz = ui.addLayout( btnLay1, "Linear", "Horizontal" )
btnSmall = ui.addButton( layHoriz, "Small", "small")
btnMed = ui.addButton( layHoriz, "Medium", "medium" )
btnLarge = ui.addButton( layHoriz, "Large", "large")
btnUpload = ui.addButton( btnLay1, "Upload", "upload,primary")
btnUploadIcon = ui.addButton( btnLay1, "photo_camera", "upload,icon,primary" )
// creates a drawer layout
var drawerWidth = 0.2
drawerLay = ui.addLayout(null, "Linear", "VCenter,NoDom", drawerWidth)
drawer = ui.createDrawer(drawerLay, 'left', "persistent")
drawer.setOnClose( () => {console.log('Close')})
drawer.setOnOpen( () => {console.log('onOpen')} )
lstMenu1 = ui.addList(drawerLay, "Audios::music_note, Videos::movie, Documents::insert_drive_file", "icon", drawerWidth)
lstMenu1.setOnTouch(closeDrawer)
div = ui.addDivider(drawerLay, drawerWidth)
lstMenu2 = ui.addList(drawerLay, "All Mail::mail,Inbox::inbox, Outbox::drafts, Sent::send", "icon", drawerWidth)
lstMenu2.setOnTouch(closeDrawer)
}
function btg4_onTouch(item, index)
{
alert(item)
}
function openDrawer()
{
drawer.open()
}
function closeDrawer(title, body, icon, index)
{
drawer.close()
//ui.showPopup(title)
}
//Toggle light/dark theme.
function btnBright_onTouch()
{
if( btnBright.text=="ui." )
{
//btnBright.SetText( "brightness_5" )
btnBright.text = "brightness_5"
ui.setTheme( "light" )
}
else
{
//btnBright.SetText( "ui." )
btnBright.text = "ui."
ui.setTheme( "dark" )
}
}
function Vibrate()
{
app.Vibrate( "0,100,30,100,50,300" )
}