Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local GUI = {}
- function GUI.createWindow(x, y, width, height, title)
- local window = {}
- window.x = x
- window.y = y
- window.width = width
- window.height = height
- window.title = title
- window.buttons = {}
- function window:addButton(x, y, width, height, label, callback)
- local button = {}
- button.x = x
- button.y = y
- button.width = width
- button.height = height
- button.label = label
- button.callback = callback
- table.insert(self.buttons, button)
- end
- function window:render()
- -- Render the window and its buttons here
- end
- return window
- end
- return GUI
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement