Optimized for ShiVa 1.9.2 New function to create actionsheets targeting a specific location:
--jpActionSheet API jpActionSheet.activate ( sUserToken, sActivationKey ) jpActionSheet.create ( hOptObject, sAIModel, sHandler, sTitle, sCancelButton, sOptDestructiveButton, sOptOtherButton0, sOptOtherButton1, sOptOtherButton2, sOptOtherButton3, sOptOtherButton4, sOptOtherButton5, sOptOtherButton6, sOptOtherButton7 ) jpActionSheet.createAtPosition ( hOptObject, sAIModel, sHandler, nPositionX, nPositionY, sTitle, sCancelButton, sOptDestructiveButton, sOptOtherButton0, sOptOtherButton1, sOptOtherButton2, sOptOtherButton3, sOptOtherButton4, sOptOtherButton5, sOptOtherButton6, sOptOtherButton7 ) jpActionSheet.createFromArray ( hOptObject, sAIModel, sHandler, sTitle, tButtons, nOptCancelButtonIndex, nOptDestructiveButtonIndex ) jpActionSheet.createAtPositionFromArray ( hOptObject, sAIModel, sHandler, nPositionX, nPositionY, sTitle, tButtons, nOptCancelButtonIndex, nOptDestructiveButtonIndex ) jpActionSheet.setPreferredArrowOrientation ( kArrowOrientation ) --Callback format onMyHandler ( nButtonIndex ) --Constants jpActionSheet.kArrowOrientationAll jpActionSheet.kArrowOrientationHorizontal jpActionSheet.kArrowOrientationVertical
Use the jpActionSheet plugin to present the user with a set of alternatives for how to proceed with a given task. You can also use it to prompt the user to confirm a potentially dangerous action. It contains an optional title and one or more buttons, each of which corresponds to an action to take.