Advertisement
i6_quadcore

execute

Feb 22nd, 2025 (edited)
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.02 KB | None | 0 0
  1. local utils = require("utils")
  2.  
  3. return function(basalt, parentFrame, cookbook)
  4.     local frame = parentFrame:addFrame()
  5.  
  6.     local itemInput = frame
  7.         :addInput()
  8.         :setPosition(3, 3)
  9.         :setSize(36, 1)
  10.         :setDefaultText("minecraft: ...")
  11.  
  12.     local button = label(frame, "   Plan   ", 3, 17)
  13.         :setPosition(40, 3)
  14.         :setBackground(colors.gray)
  15.         :setForeground(colors.white)
  16.         :onClick(clearGrid)
  17.  
  18.     local display = frame
  19.         :addMovableFrame()
  20.         :setPosition(3, 5)
  21.         :setSize(46, 10)
  22.         :setBackground(colors.black)
  23.    
  24.     local scrollbar = frame:addScrollbar():setPosition(49, 5):setSize(1, 10):setScrollAmount(10)
  25.  
  26.     scrollbar:onChange(function(self, _, value)
  27.         display:setOffset(0, value-1)
  28.     end)
  29.  
  30.     local months = {"january", "february", "march", "april", "may"}
  31.  
  32.     for i=1, 20 do
  33.         display:addLabel():setText(months[(i - 1) % 5 + 1]):setForeground(colors.white):setPosition(1, i)
  34.     end
  35.  
  36.     return frame
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement