From 7e0caa0922c3ec94ddbe8201b60b16048cb0a458 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Mon, 11 Dec 2017 19:03:24 +0000 Subject: [PATCH] Gui Base added --- locale/ExpCore/GuiParts/inputs.lua | 12 ++++++++++++ locale/ExpCore/gui.lua | 29 +++++++++++++++++++++++++++++ locale/ExpCore/load.lua | 15 ++++++++------- 3 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 locale/ExpCore/GuiParts/inputs.lua create mode 100644 locale/ExpCore/gui.lua diff --git a/locale/ExpCore/GuiParts/inputs.lua b/locale/ExpCore/GuiParts/inputs.lua new file mode 100644 index 00000000..97e56848 --- /dev/null +++ b/locale/ExpCore/GuiParts/inputs.lua @@ -0,0 +1,12 @@ +--[[ +Explosive Gaming + +This file can be used with permission but this and the credit below must remain in the file. +Contact a member of management on our discord to seek permission to use our code. +Any changes that you may make to the code are yours but that does not make the script yours. +Discord: https://discord.gg/r6dC2uK +]] + +local inputs = {} + +return inputs \ No newline at end of file diff --git a/locale/ExpCore/gui.lua b/locale/ExpCore/gui.lua new file mode 100644 index 00000000..94a362a8 --- /dev/null +++ b/locale/ExpCore/gui.lua @@ -0,0 +1,29 @@ +--[[ +Explosive Gaming + +This file can be used with permission but this and the credit below must remain in the file. +Contact a member of management on our discord to seek permission to use our code. +Any changes that you may make to the code are yours but that does not make the script yours. +Discord: https://discord.gg/r6dC2uK +]] + +local Gui = {} +local Gui_data = {} + +-- this is to enforce the read only propetry of the gui +function Gui._add_data(key,value) + if game then return end + if not Gui_data[key] then Gui_data[key] = {value} + else table.insert(Gui_data[key],value) + end +end + +function Gui._get_data(key) return Gui_data[key] end + +function Gui:_load_parts(parts) + for _,part in pairs(parts) do + self[part] = require('/GuiParts/'..part) + end +end + +return Gui \ No newline at end of file diff --git a/locale/ExpCore/load.lua b/locale/ExpCore/load.lua index c7e87a2e..3a8e0644 100644 --- a/locale/ExpCore/load.lua +++ b/locale/ExpCore/load.lua @@ -19,14 +19,15 @@ local StdExpCoreLib = {} require '/commands' StdExpCoreLib.Server = require '/server' -StdExpCoreLib.Gui = {} StdExpCoreLib.Ranking = require '/ranking' ---[[StdExpCoreLib.Gui = require '/gui' -require '/GuiParts/inputs' -require '/GuiParts/toolbar' -require '/GuiParts/center' -require '/GuiParts/left' -require '/GuiParts/popup']] +StdExpCoreLib.Gui = require '/gui' +Gui:_load_parts{ + 'inputs', + --'toolbar', + --'center', + --'left', + --'popup' +} return function(rtn) local _return = {}