GUI code for running https://github.com/raspberry-pi-camera/raspindi
Make sure the above package is installed properlly (use my setupscript for this for easy installation: https://github.com/TIU11/raspindiGUISetup) then run this python script, that simple!!!
for adding a button, make sure its on pin 3 (board layout)