Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var current = Titanium.UI.currentWindow;
- // create our buttons var assistedLivingBTN = Titanium.UI.createButton({ title: 'Assisted Living', height: 40, width: 200, top: 100, backgroundColor: '#f1e3bf', borderRadius: 10, backgroundImage: 'images/buttons/button-bg.png', backgroundSelectedImage: 'images/buttons/button-selected-bg.png', shadowColor:'#b9ac8c', shadowOffset:{x:1,y:1} });
- var skilledNursingBTN = Titanium.UI.createButton({ title: 'Skilled Nursing', height: 40, width: 200, top: 150, backgroundColor: '#f1e3bf', borderRadius: 10, backgroundImage: 'images/buttons/button-bg.png', backgroundSelectedImage: 'images/buttons/button-selected-bg.png', shadowColor:'#b9ac8c', shadowOffset:{x:1,y:1}
- });
- // create our information labels var FP1Text = Titanium.UI.createLabel({ text:'The Studio at The Ruston Residence is ideal for the person who desires the ultimate in privacy and convenience. Includes bright and airy bedroom/sitting area, large closet with built-in shelving, full private bath and kitchenette.', width: 200, font:{fontSize:10}, bottom: 5 });
- var FP2Text = Titanium.UI.createLabel({ text:'The Studio at The Ruston Residence is ideal for the person who desires the ultimate in privacy and convenience. Includes bright and airy bedroom/sitting area, large closet with built-in shelving, full private bath and kitchenette.', width: 200, font:{fontSize:10}, bottom: 5 });
- // create our close buttons var closeLBL = Titanium.UI.createButton({ height: 40, width: 200, top: 400, backgroundColor: '#f1e3bf', borderRadius: 10, backgroundImage: 'images/buttons/button-bg.png', backgroundSelectedImage: 'images/buttons/button-selected-bg.png', title: 'Close', textAlign: 'center', color: '#fff', zIndex: 900, shadowColor:'#b9ac8c', shadowOffset:{x:1,y:1} });
- var closeLBL2 = Titanium.UI.createButton({ height: 40, width: 200, top: 400, backgroundColor: '#f1e3bf', borderRadius: 10, backgroundImage: 'images/buttons/button-bg.png', backgroundSelectedImage: 'images/buttons/button-selected-bg.png', title: 'Close', textAlign: 'center', color: '#fff', zIndex: 900, shadowColor:'#b9ac8c', shadowOffset:{x:1,y:1} });
- // add buttons to our current window current.add(assistedLivingBTN); current.add(skilledNursingBTN);
- // create our floorplan windows, necessary elements and tie them all together var assistedLivingWIN = Titanium.UI.createWindow({ backgroundColor: '#fff', orientationModes : [ Titanium.UI.PORTRAIT, Titanium.UI.UPSIDE_PORTRAIT, Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT ] }); var skilledNursingWIN = Titanium.UI.createWindow({ backgroundColor: '#fff', orientationModes : [ Titanium.UI.PORTRAIT, Titanium.UI.UPSIDE_PORTRAIT, Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT ] });
- var FP1 = Titanium.UI.createImageView({ image: 'images/floorplans/1.gif', top: 5, width: 120, height: 240 }); var FP2 = Titanium.UI.createImageView({ image: 'images/floorplans/2.gif', top: 5, width: 277, height: 172 });
- assistedLivingWIN.add(closeLBL); assistedLivingWIN.add(FP1Text); skilledNursingWIN.add(closeLBL2);
- // open buttons assistedLivingBTN.addEventListener('click', function(e) { assistedLivingWIN.open(); }); skilledNursingBTN.addEventListener('click', function(e) { skilledNursingWIN.open(); });
- // close buttons closeLBL.addEventListener('click', function(e) { assistedLivingWIN.close({opacity:0}); }); closeLBL2.addEventListener('click', function(e) { skilledNursingWIN.close({opacity:0}); });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement