diff --git a/Toolset/libraries/revidelibrary.8.livecodescript b/Toolset/libraries/revidelibrary.8.livecodescript index 6423176ca9..6d73c93c19 100644 --- a/Toolset/libraries/revidelibrary.8.livecodescript +++ b/Toolset/libraries/revidelibrary.8.livecodescript @@ -8590,6 +8590,59 @@ on revIDESetTextAlign pAlign ideActionStyleText "align", pAlign end revIDESetTextAlign +on revIDESetLayerMode pObject, pProperty, pValue + set the layerMode of pObject to pValue + + if the layerMode of pObject is not the effective layerMode of pObject then + local tMessage + put revIDELocalise("The effective layerMode of this " & \ + word 1 of pObject & " is " & \ + the effective layerMode of pObject & " instead of " & \ + the layerMode of pObject & " because of the following incompatible properties:" & return) into tMessage + + local tStack + put ideStackOfObject(pObject) into tStack + + if the effective layerMode of pObject is "static" and \ + the compositorType of tStack is empty then + put return & revIDELocalise(" - the compositorType of this stack is not set") after tMessage + end if + + if the effective layerMode of pObject is "dynamic" and \ + the layerMode of pObject is "static" and \ + the ink of pObject is not among the items of "srcCopy,blendSrcOver" then + put return & revIDELocalise(" - the ink is not srcCopy or blendSrcOver") after tMessage + end if + + if the layerMode of pObject is "scrolling" then + if word 1 of pObject is not among the items of "group,bkgnd" then + put return & revIDELocalise(" - only groups can have scrolling layerModes") after tMessage + else + if the hScrollbar of pObject or the vScrollbar of pObject then + put return & revIDELocalise(" - the group scrollbars are shown") after tMessage + end if + if the showName of pObject then + put return & revIDELocalise(" - the group name is shown") after tMessage + end if + if the showBorder of pObject then + put return & revIDELocalise(" - the group has a border") after tMessage + end if + if the opaque of pObject and \ + the effective backPattern of pObject is not empty then + put return & revIDELocalise(" - the group has a background pattern") after tMessage + end if + if the opaque of pObject and \ + (the unboundedHScroll of pObject or the unboundedVScroll of pObject) then + put return & revIDELocalise(" - the group as unbounded scrolling") after tMessage + end if + end if + end if + + answer warning tMessage with revIDELocalise("OK") + + end if +end revIDESetLayerMode + on revIDEActionClearAllBreakpoints answer warning "Really clear all breakpoints from all open stacks? This operation cannot be undone." with "Don't Clear" or "Clear" if it is "Clear" then diff --git a/Toolset/resources/supporting_files/property_definitions/propertyInfo.txt b/Toolset/resources/supporting_files/property_definitions/propertyInfo.txt index 49c29a14f5..c02a204f24 100644 --- a/Toolset/resources/supporting_files/property_definitions/propertyInfo.txt +++ b/Toolset/resources/supporting_files/property_definitions/propertyInfo.txt @@ -94,7 +94,7 @@ innerShadow Inner shadow Effects com.livecode.pi.graphicEffect true false popu kind Kind Basic com.livecode.pi.string true true no_default label Label Basic com.livecode.pi.text true false layer Layer Position com.livecode.pi.integer true false no_default 1 1 -layerMode Layer mode Advanced com.livecode.pi.enum true false Static Static,Dynamic,Scrolling +layerMode::revIDESetLayerMode Layer mode Advanced com.livecode.pi.enum true false Static Static,Dynamic,Scrolling left::revIDESetRectProperty Left Position com.livecode.pi.integer true false no_default 1 lineInc Scroll distance on arrow click Basic com.livecode.pi.number true false 512 lineSize Line thickness Basic com.livecode.pi.number true false 1