Chaos_Cash

gui_elements.lua

Sep 18th, 2025 (edited)
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. local gui_elements = {}
  2. local gui_metatable = {}
  3.  
  4. function gui_metatable
  5.  
  6.  
  7. function gui_elements.new_gui()
  8.     local gui_table = {}
  9.     setmetatable(gui_table, gui_metatable)
  10. end
  11.  
  12.  
  13.  
  14. function gui_metatable.add_button(self, x_1, y_1, x_2, y_2, click_function)
  15.     self.buttons = self.buttons or {}
  16.    
  17.     local cur_button = {
  18.         x_1 = x_1,
  19.         y_1 = y_1,
  20.         x_2 = x_2,
  21.         y_2 = y_2,
  22.         click_function = click_function
  23.     }
  24.    
  25.    
  26.     table.insert(self.buttons, cur_button)
  27. end
  28.  
  29.  
  30. function gui_metatable.on_event(self, event, info_1, info_2, info_3)
  31.    
  32.    
  33.  
  34. end
  35.  
  36. return gui_elements
Advertisement
Add Comment
Please, Sign In to add comment