@DannyD
I've amended your example to include the top bar and navigation menu now that the shadow images are available. I've also positioned/resized things so that I can get the new pagination component showing too
You may notice that I've changed your dialog functions. I recommend updating the existing dialog rather than creating new ones if you're going to use the same variable because otherwise the old ones aren't being destroyed. What I do is create an empty dialog: dialog = OryUICreateDialog("") outside of the main loop, and whenever I need to show it I use that one and add the buttons to it. You'll see I've removed the insert buttons and used OryUISetDialogButtonCount(dialog, 3) which will insert buttons if the last dialog shown had less then 3 and remove any extras if the last dialog shown had more than 3.
// show all errors
SetErrorMode(2)
//setwindowSize( 1280, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set window properties
SetWindowTitle( "OryUI Testing" )
//SetVirtualResolution( 1280, 720 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
//SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 0, 0, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
global dialog as integer
#insert "OryUI Framework\OryUI.agc"
#insert "OryUI Framework\OryUIButton.agc"
#insert "OryUI Framework\OryUIButtonGroup.agc"
#insert "OryUI Framework\OryUIDialog.agc"
#insert "OryUI Framework\OryUIEditAvatarScreen.agc"
#insert "OryUI Framework\OryUIFloatingActionButton.agc"
#insert "OryUI Framework\OryUIInputSpinner.agc"
#insert "OryUI Framework\OryUIList.agc"
#insert "OryUI Framework\OryUIMedia.agc"
#insert "OryUI Framework\OryUIMenu.agc"
#insert "OryUI Framework\OryUINavigationDrawer.agc"
#insert "OryUI Framework\OryUIPagination.agc"
#insert "OryUI Framework\OryUIProgressIndicator.agc"
#insert "OryUI Framework\OryUISprite.agc"
#insert "OryUI Framework\OryUITabs.agc"
#insert "OryUI Framework\OryUIText.agc"
#insert "OryUI Framework\OryUITextCard.agc"
#insert "OryUI Framework\OryUITextfield.agc"
#insert "OryUI Framework\OryUITooltip.agc"
#insert "OryUI Framework\OryUITopBar.agc"
#insert "OryUI Framework\OryUITouch.agc"
#insert "OryUI Framework\OryUIDefaultSettings.agc"
grpStatus = OryUICreateButtonGroup("width:90;offset:center;position:50,17;selectedColor:22,160,133,255;unselectedColor:149,165,166,255;depth:18")
OryUIInsertButtonGroupItem(grpStatus, -1, "text:Available")
OryUIInsertButtonGroupItem(grpStatus, -1, "text:Busy")
OryUIInsertButtonGroupItem(grpStatus, -1, "text:Sleeping")
OryUIInsertButtonGroupItem(grpStatus, -1, "text:Invisible")
OryUISetButtonGroupItemSelectedByIndex(grpStatus, 1)
btnNext = OryUICreateButton("size:30,8;text:Click for Dialog 1;textColor:255,255,255,255;textSize:5;color:41,128,185;offset:center;position:17,25")
btnPopup2 = OryUICreateButton("size:30,8;text:Click for Dialog 2;textColor:255,255,255,255;textSize:5;color:41,128,185;offset:center;position:50,25")
fabAdd = OryUICreateFloatingActionButton("icon:Add;color:26,188,156,255;iconColor:255,255,255,255;shadow:true;placement:bottomLeft;")
inputSpinner = OryUICreateInputSpinner("position:5,32;min:0;max:399;step:1;maxLength:3;autoCorrectIfOutOfRange:true")
inputSpinner2 = OryUICreateInputSpinner("backgroundColor:41,128,185,255;activeButtonColor:44,62,80,255;textColor:255,255,255,255;size:20,5.8;position:40,32;min:0;max:99999;step:5;maxLength:5")
inputSpinner3 = OryUICreateInputSpinner("backgroundColor:255,255,255,255;activeButtonColor:255,255,255,255;activeIconColor:0,0,0,255;size:30,5.8;position:65,32;decimals:2;step:0.01")
listLog = OryUICreateList("noOfLeftLines:2;showLeftThumbnail:true;noOfRightLines:1;itemSize:40,8;position:2,40")
OryUISetListItemCount(listLog, 3)
menu = OryUICreateMenu("width:60;showRightIcon:true")
OryUIInsertMenuItem(menu, -1, "name:One;text:Option One")
OryUIInsertMenuItem(menu, -1, "name:Two;text:Option Two")
OryUIInsertMenuItem(menu, -1, "name:Three;text:Option Three")
OryUIInsertMenuItem(menu, -1, "name:Four;text:Option Four")
menubutton = OryUICreateButton("size:30,5;text:Show Menu;position:68,22")
topBar = OryUICreateTopBar("navigationIcon:menu;text:OryUI Framework Demo;title:OryUI;depth:10")
navigationDrawer = OryUICreateNavigationDrawer("drawerLocation:left;showIcon:true;showRightText:true")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:option;iconID:" + str(oryUIIconCameraImage) + ";text:All inboxes;rightText:43")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:divider")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:option;iconID:" + str(oryUIIconCameraImage) + ";text:Inbox;rightText:26")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:subtitle;subtitleText:RECENT LABELS")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:option;iconID:" + str(oryUIIconCameraImage) + ";text:Notes")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:subtitle;subtitleText:ALL LABELS")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:option;iconID:" + str(oryUIIconCameraImage) + ";text:Starred;rightText:23")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:option;iconID:" + str(oryUIIconCameraImage) + ";text:Unread;rightText:99+")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:option;iconID:" + str(oryUIIconCameraImage) + ";text:Drafts")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:option;iconID:" + str(oryUIIconCameraImage) + ";text:Outbox")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:option;iconID:" + str(oryUIIconCameraImage) + ";text:Sent")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:option;iconID:" + str(oryUIIconCameraImage) + ";text:Bin;rightText:99+")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:option;iconID:" + str(oryUIIconCameraImage) + ";text:Spam;rightText:99+")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:option;iconID:" + str(oryUIIconCameraImage) + ";text:Archive")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:option;iconID:" + str(oryUIIconCameraImage) + ";text:Notes")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:subtitle;subtitleText:OTHER APPS")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:option;iconID:" + str(oryUIIconCameraImage) + ";text:Calendar")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:option;iconID:" + str(oryUIIconCameraImage) + ";text:Contacts")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:divider")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:option;iconID:" + str(oryUIIconCameraImage) + ";text:Settings")
OryUIInsertNavigationDrawerItem(navigationDrawer, -1, "itemType:option;iconID:" + str(oryUIIconCameraImage) + ";text:Help")
progressBar1 = OryUICreateProgressIndicator("color:255,0,0;size:50,2;offset:center;position:70,42")
progressBar2 = OryUICreateProgressIndicator("progressType:indeterminate;color:0,0,255;size:50,1;offset:center;position:70,47")
progress# = 0
global txtname as integer
txtSeconds = OryUICreateText("string:Seconds Running[colon];size:6;color:241,196,15;position:50,0")
crdExample = OryUICreateTextCard("width:40;headerText:Lorem Ipsum;headerTextColor:41,128,185;headerTextSize:4;headerTextAlignment:center;supportingText:" + OryUIWrapText("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tortor arcu, interdum ac interdum eget, feugiat sed odio. Proin eu risus ", 3, 86) + ";supportingTextSize:3;position:2,65;authoHeight:true")
textfield1 = OryUICreateTextfield("width:50;position:45,50")
textfield2 = OryUICreateTextfield("width:50;position:45,60;backgroundColor:255,255,255,255;strokeColor:58,128,113,255;labelText:Username")
textfield3 = OryUICreateTextfield("width:50;position:45,70;backgroundColor:236,240,241,255;strokeColor:231,76,60,255;labelText:Location")
pagination1 = OryUICreatePagination("width:50;position:45,80;noOfPages:49;maxButtonsToDisplay:9")
dialog = OryUICreateDialog("")
do
OryUIStartTrackingTouch()
OryUIUpdateText(txtSeconds, "string:Seconds Running[colon] " + str(GetSeconds()))
// print("Swiping Horizontally:" + str(OryUIGetSwipingHorizontally()))
//print("Swiping Vertically:" + str(OryUIGetSwipingVertically()))
progress# = progress# + 0.5
if (progress# > 100) then progress# = 0
OryUISetProgressIndicatorPercentage(progressBar1, progress#)
OryUIAnimateProgressIndicator(progressBar2)
OryUIInsertTextFieldListener(textfield1)
OryUIInsertTextFieldListener(textfield2)
OryUIInsertTextFieldListener(textfield3)
OryUIInsertMenuListener(menu)
if (OryUIGetMenuItemReleasedByIndex(menu, 1))
Message("Option One Released")
endif
if (OryUIGetMenuItemReleasedByName(menu, "Three"))
Message("Option Three Released")
endif
OryUIInsertButtonGroupListener(grpStatus)
if (OryUIGetButtonGroupItemSelectedIndex(grpStatus) = 1) then print("Available Selected")
if (OryUIGetButtonGroupItemSelectedIndex(grpStatus) = 2) then print("Busy Selected")
if (OryUIGetButtonGroupItemSelectedIndex(grpStatus) = 3) then print("Sleeping Selected")
if (OryUIGetButtonGroupItemSelectedIndex(grpStatus) = 4) then print("Invisible Selected")
if (OryUIGetButtonReleased(btnNext))
DialogPopup()
elseif (OryUIGetButtonReleased(btnPopup2))
DialogPopup2()
elseif (OryUIGetButtonReleased(menubutton))
OryUIShowMenu(menu, OryUIGetButtonX(menubutton), OryUIGetButtonY(menubutton) + OryUIGetButtonHeight(menubutton))
endif
// OryUIStartTrackingTouch()
OryUIInsertDialogListener(dialog)
// OryUIEndTrackingTouch()
OryUIShowFloatingActionButton(fabAdd)
if (OryUIGetFloatingActionButtonReleased(fabAdd))
Message("Floating Action Button Released")
endif
OryUIInsertInputSpinnerListener(inputSpinner)
OryUIInsertInputSpinnerListener(inputSpinner2)
OryUIInsertInputSpinnerListener(inputSpinner3)
OryUIInsertTopBarListener(topBar)
OryUIInsertNavigationDrawerListener(navigationDrawer)
if (OryUIGetTopBarNavigationReleased(topBar))
OryUIShowNavigationDrawer(navigationDrawer)
endif
OryUIInsertPaginationListener(pagination1)
OryUIEndTrackingTouch()
Sync()
loop
function dialogpopup()
OryUIUpdateDialog(dialog, "titleText:Reset device?;supportingText:This will reset your device to its default factory settings;autoHeight:true")
OryUISetDialogButtonCount(dialog, 2)
OryUIUpdateDialogButton(dialog, 1, "text:CANCEL")
OryUIUpdateDialogButton(dialog, 2, "text:ACCEPT")
OryUIShowDialog(dialog)
endfunction
function dialogpopup2()
OryUIUpdateDialog(dialog, "color:255,234,167,255;titleText:Use Lorem Ipsum?;titleTextColor:232,67,147,255;supportingText:Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas viverra tellus in mi mollis egestas. Suspendisse blandit, est ut varius tincidunt, justo lectus placerat leo, eu laoreet odio felis dignissim quam. Aliquam ultrices varius eros, ultricies accumsan massa mollis quis. Proin sit amet egestas lacus, ac aliquet orci. Pellentesque venenatis justo ullamcorper arcu rutrum, nec vestibulum eros egestas. Proin viverra eu felis sit amet consectetur. Nunc eu enim eu mauris congue ultricies nec eget lacus.;supportingTextColor:225,112,85,255;autoHeight:true")
OryUISetDialogButtonCount(dialog, 3)
OryUIUpdateDialogButton(dialog, 1, "textColor:214,48,49;color:253,203,110,255;text:No")
OryUIUpdateDialogButton(dialog, 2, "textColor:214,48,49;color:253,203,110,255;text:Not Sure")
OryUIUpdateDialogButton(dialog, 3, "textColor:214,48,49;color:253,203,110,255;text:Yes")
OryUIShowDialog(dialog)
endfunction
OryUI - A WIP AGK2 UI Framework