Hi @Anonymous ,
Welcome to PowerApps. I also do this in all my apps.
Here is the simplest way I've found:
- Insert a Label Control (or HTMLtext Control) and stretch it across any Buttons the user could click
- Populate it with your text ("Are you sure?", etc.)
- To get real spiffy, use a Switch or If function to change the text depending on various scenarios in your application!
- Set its Fill Property to RGBA(255,255,255,.90) for that "See through" effect
- Set its Visible Property to varOverlay
- Trigger this variable by someone clicking "Cancel" or the the Back Arrow in your app
- Example: OnSelect of the "Cancel" button; Set(varOverlay, true)
- Add two buttons to the Overlay: "Cancel" (again) and "Yes"
- OnSelect of the "Yes" button, trigger all your dangerous logic
- OnSelect of the "Cancel" (again) button, Set(varOverlay, false)
Here is the harder way (but better for reuse):
- Create a Component so its reusable across apps!
Good luck!!