massacring

example

Jul 14th, 2025 (edited)
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. local Cherry = require("Cherry")
  2. local CHERRY = Cherry.CHERRY
  3. local FIXED = Cherry.FIXED
  4. local GROW = Cherry.GROW
  5. local FIT = Cherry.FIT
  6.  
  7. local monitor = peripheral.find("monitor")
  8. monitor.setBackgroundColor(32768)
  9. monitor.setTextScale(1)
  10. monitor.clear()
  11.  
  12. local width, height = monitor.getSize()
  13.  
  14. local container = CHERRY{
  15.     direction = "TOP_TO_BOTTOM",
  16.     size = { FIXED(width), FIXED(height) },
  17.     padding = { top = 1, left = 1, right = 1, bottom = 1 },
  18.     position = { 1, 1 },
  19.     childGap = 1,
  20.     children = {
  21.         {
  22.             size = { FIT(), FIT() },
  23.             backgroundColor = 8,
  24.             children = {
  25.                 {
  26.                     size = { FIXED(3), FIXED(1) },
  27.                     backgroundColor = 4
  28.                 }
  29.             }
  30.         },
  31.         {
  32.             size = { FIXED(3), GROW() },
  33.             backgroundColor = 2
  34.         }
  35.     }
  36. }
  37.  
  38. container:draw(monitor)
Advertisement
Add Comment
Please, Sign In to add comment