SHARE
TWEET

Untitled

a guest Mar 25th, 2019 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Red []
  2. context [
  3.     env: self
  4.     canvas: none
  5.     tab-pan: drawing-panel-tab: animations: none
  6.     info-panel: edit-options-panel: options-panel: drawing-panel: figs-panel: anim-panel: none
  7.     layer: layer1: drawing: selection-layer: grid-layer: drawing-layer: edit-layer: none
  8.     win: layout/options compose/deep [;
  9.         title "Drawing pad"
  10.         size 540x465
  11.         tab-pan: tab-panel 520x445 [
  12.             "Drawing" [backdrop rebolor
  13.                 across
  14.                 info-panel: panel 500x25 gold [origin 0x0 space 4x0]
  15.                 return
  16.                 edit-options-panel: panel 500x25 brick [origin 0x0 space 4x0]
  17.                 return
  18.                 options-panel: panel 80x335 water [origin 0x0 space 0x0]
  19.                 drawing-panel: panel 300x300 snow [
  20.                     origin 0x0 space 0x0
  21.                     style layer: box glass ;draw []
  22.                     style drawing: base glass 300x300
  23.                     layer1: layer ;255.255.255.0
  24.                     do [env/canvas: layer1]
  25.                     at 0x0 selection-layer: box hidden
  26.                     at 0x0 grid-layer: box hidden
  27.                     at 0x0 drawing-layer: drawing ;transparent
  28.                     at 0x0 edit-layer: base 300x300 transparent hidden
  29.                 ]
  30.                 figs-panel: panel 100x335 beige []
  31.                 return
  32.                 at 100x390 anim-panel: panel 300x25 crimson [origin 0x0 space 4x0]
  33.             ]
  34.             "Animation" [origin 0x0 space 0x0
  35.                 animations: area 517x421 ;!!!
  36.             ]
  37.         ]
  38.         do [
  39.             drawing-panel-tab: pane/1/pane/1
  40.             animations-panel-tab: pane/1/pane/2
  41.             ;drawing-panel-tab/size: animations-panel-tab/size:
  42.         ]
  43.     ][
  44.         actors: object [
  45.             on-resizing: func [face event][
  46.                 tab-pan/size: win/size - 20
  47.                 foreach tab tab-pan/pane [
  48.                     tab/offset: tab/parent/offset + 2x24
  49.                     tab/size: tab/parent/size - 5x27
  50.                 ]
  51.                 info-panel/size/x: info-panel/parent/size/x - info-panel/offset/x - 10
  52.                 edit-options-panel/size/x: edit-options-panel/parent/size/x - edit-options-panel/offset/x - 10
  53.                 options-panel/size/y: options-panel/parent/size/y - options-panel/offset/y - 10
  54.                 drawing-panel/size: drawing-panel/parent/size - drawing-panel/offset - 120x45
  55.                 foreach-face drawing-panel [face/size: drawing-panel/size]
  56.                 canvas/size: drawing-panel/size ; grid-layer/size: selection-layer/size: drawing-layer/size:
  57.                 figs-panel/offset/x: figs-panel/parent/size/x - 110
  58.                 figs-panel/size/y: figs-panel/parent/size/y - figs-panel/offset/y - 10
  59.                 anim-panel/offset/x: drawing-panel/offset/x
  60.                 anim-panel/offset/y: anim-panel/parent/size/y - 35
  61.                 anim-panel/size/x: drawing-panel/size/x
  62.                 animations/size: animations/parent/size - 1x0
  63.                 ;show win
  64.             ]
  65.         ]
  66.     ]
  67.     view/flags win [resize]
  68. ]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top