Advertisement
Ewgeniy

AIGuilib (maybe not work)

Jan 3rd, 2023
780
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. local GUI = {}
  2.  
  3. function GUI.createWindow(x, y, width, height, title)
  4.   local window = {}
  5.   window.x = x
  6.   window.y = y
  7.   window.width = width
  8.   window.height = height
  9.   window.title = title
  10.   window.buttons = {}
  11.  
  12.   function window:addButton(x, y, width, height, label, callback)
  13.     local button = {}
  14.     button.x = x
  15.     button.y = y
  16.     button.width = width
  17.     button.height = height
  18.     button.label = label
  19.     button.callback = callback
  20.     table.insert(self.buttons, button)
  21.   end
  22.  
  23.   function window:render()
  24.     -- Render the window and its buttons here
  25.   end
  26.  
  27.   return window
  28. end
  29.  
  30. return GUI
  31.  
Tags: ai
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement