All error message fixed

This commit is contained in:
Cooldude2606
2017-10-16 19:14:13 +01:00
parent 8fbcd66b6c
commit 6473e15dea
15 changed files with 68 additions and 56 deletions

View File

@@ -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