Advertisement
KrabPlotva

Функция квадрата

Mar 22nd, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. local com = require('component')
  2. local gpu = com.gpu
  3.  
  4. gpu.setResolution(14,7)
  5. width, height = gpu.getResolution()
  6.  
  7. function square(color)
  8.   gpu.fill(1, 1, width, height, ' ')
  9.   gpu.setBackground(color)
  10. -- Для примера
  11.   gpu.fill(3, 2, width-4, height-2, ' ')
  12.   gpu.setBackground(0x000000)
  13.   gpu.set(6,4, "Name")
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement