mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 04:21:41 +09:00
All error message fixed
This commit is contained in:
@@ -7,17 +7,18 @@ Any changes that you may make to the code are yours but that does not make the s
|
||||
Discord: https://discord.gg/XSsBV6b
|
||||
]]
|
||||
--Please Only Edit Below This Line-----------------------------------------------------------
|
||||
local ExpGui = require("ExpGaming - Module Setup")
|
||||
local add_input = ExpGui.add_input
|
||||
local inputs = ExpGui.inputs
|
||||
--allows defining of new buttons;;name how to call button;;default_display what is shown on the button;;default_tooltip the tooltip display;;event function(player,element) that runs on click
|
||||
function add_input.button(name,default_display,default_tooltip,event)
|
||||
if not name then error('Button requires a name') end
|
||||
inputs.buttons[name] = {name=name,display=default_display,tooltip=default_tooltip,event=event})
|
||||
inputs.buttons[name] = {name=name,display=default_display,tooltip=default_tooltip,event=event}
|
||||
end
|
||||
--allows defining of text box inputs;;name how to call button;;default_display what is shown on the button;;event function(player,element) that runs on text change
|
||||
function add_input.text(name,default_display,event)
|
||||
if not name then error('Text Filed requires a name') end
|
||||
inputs.text[name] = {name=name,display=default_display,event=event})
|
||||
inputs.text[name] = {name=name,display=default_display,event=event}
|
||||
end
|
||||
--draws the button into a gui;;frame the frame to draw to;;name name of button to draw;;display(opptinal) overrides the default;;tooltip(opptinal) overrides the default
|
||||
function add_input.draw_button(frame,name,display,tooltip)
|
||||
@@ -68,4 +69,6 @@ Event.register(defines.events.on_gui_text_changed, function(event)
|
||||
local text = inputs.text[event.element.name]
|
||||
if text.event then text.event(player,event.element) end
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
return ExpGui
|
||||
Reference in New Issue
Block a user