Skip to content

Commit

Permalink
naming changes
Browse files Browse the repository at this point in the history
  • Loading branch information
9551-Dev committed Jul 28, 2022
1 parent 3258646 commit 8b740f6
Show file tree
Hide file tree
Showing 34 changed files with 45 additions and 45 deletions.
4 changes: 2 additions & 2 deletions apis/pixelbox.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
]]

local graphic = require("graphic_handle")
local api = require("api")
local api = require("util")
local EXPECT = require("cc.expect").expect
local ALGO = require("a-tools.algo")
local ALGO = require("core.algo")

local PIXELBOX = {}
local OBJECT = {}
Expand Down
2 changes: 1 addition & 1 deletion a-tools/algo.lua → core/algo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
! sorry for that
]]

local api = require("api")
local api = require("util")

local function get_elipse_points(radius_x,radius_y,xc,yc,filled)
local rx,ry = math.ceil(math.floor(radius_x-0.5)/2),math.ceil(math.floor(radius_y-0.5)/2)
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions a-tools/gui_object.lua → core/gui_object.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
--* loads the required modules
local objects = require("object_loader")
local graphic = require("graphic_handle")
local update = require("a-tools.update")
local api = require("api")
local update = require("core.update")
local api = require("util")

local function create_gui_object(term_object,orig,log,event_offset_x,event_offset_y)
local gui_objects = {}
Expand Down Expand Up @@ -510,7 +510,7 @@ local function create_gui_object(term_object,orig,log,event_offset_x,event_offse
if err then gui.last_err = err end
--* makes sure the window is visible when execution ends
execution_window.setVisible(true)
if err then log("a Fatal error occured: "..err..debug.traceback(),log.fatal)
if err then log("a Fatal error occured: "..err.." "..debug.traceback(),log.fatal)
else log("finished execution",log.success) end
log:dump()
err = nil
Expand Down
2 changes: 1 addition & 1 deletion a-tools/logger.lua → core/logger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function index:dump()
for k,v in ipairs(outputInternal) do
str = str .. v .. "\n"
end
local file = fs.open(path.."/log.log","w")
local file = fs.open(path.."/GuiH.log","w")
file.write(str)
file.close()
return str
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion a-tools/object-base.lua → core/object-base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* for your own custom elements
]]

local api = require("api")
local api = require("util")
return function(object,data)
data = data or {}
if type(data.visible) ~= "boolean" then data.visible = true end
Expand Down
2 changes: 1 addition & 1 deletion a-tools/update.lua → core/update.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* also used for event proccessing
]]

local api = require("api")
local api = require("util")

--* definitions for events and what they are
local events = {
Expand Down
6 changes: 3 additions & 3 deletions graphic_handle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* and draws them
]]

local decode_ppm = require "a-tools.luappm"
local decode_blbfor = require "a-tools.blbfor".open
local api = require "api"
local decode_ppm = require "core.luappm"
local decode_blbfor = require "core.blbfor".open
local api = require "util"
local expect = require "cc.expect"

local chars = "0123456789abcdef"
Expand Down
12 changes: 6 additions & 6 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* and load all the nessesary presets and modules, also sets up log
]]

local logger = require("a-tools.logger")
local logger = require("core.logger")

--* gets this files path so it can be later used in package.path
local path = fs.getDir(select(2,...))
Expand All @@ -12,11 +12,11 @@ local log = logger.create_log()

--* puts the internal apis into the apis table cause they may be useful
local apis = {
algo=require("a-tools.algo"),
luappm=require("a-tools.luappm"),
blbfor=require("a-tools.blbfor"),
algo=require("core.algo"),
luappm=require("core.luappm"),
blbfor=require("core.blbfor"),
graphic=require("graphic_handle").code,
general=require("api")
general=require("util")
}
local presets={}

Expand Down Expand Up @@ -53,7 +53,7 @@ local function generate_ui(m,event_offset_x,event_offset_y)
"%s;/%s/?.lua;/%s/?/init.lua",
package.path, path,path
)
local create = require("a-tools.gui_object")
local create = require("core.gui_object")
local win = window.create(m,1,1,m.getSize())
log("creating gui object..",log.update)
local gui = create(win,m,log,event_offset_x,event_offset_y)
Expand Down
2 changes: 1 addition & 1 deletion object_loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* gui.create table
]]

local api = require("api")
local api = require("util")
local path = fs.getDir(select(2,...))

--* function used to dereference
Expand Down
2 changes: 1 addition & 1 deletion objects/button/logic.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = require("api")
local api = require("util")
return function(object,event)
--* if a click happens on the buttons area
--* run on_click function
Expand Down
2 changes: 1 addition & 1 deletion objects/button/object.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = require("api")
local api = require("util")

return function(object,data)
data = data or {}
Expand Down
4 changes: 2 additions & 2 deletions objects/circle/graphic.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local algo = require("a-tools.algo")
local algo = require("core.algo")
local graphic = require("graphic_handle").code
local api = require("api")
local api = require("util")

return function(object)
local term = object.canvas.term_object
Expand Down
2 changes: 1 addition & 1 deletion objects/circle/object.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = require("api")
local api = require("util")

local types = {
["left-right"]=true,
Expand Down
4 changes: 2 additions & 2 deletions objects/ellipse/graphic.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local algo = require("a-tools.algo")
local algo = require("core.algo")
local graphic = require("graphic_handle").code
local api = require("api")
local api = require("util")

return function(object)
local term = object.canvas.term_object
Expand Down
2 changes: 1 addition & 1 deletion objects/ellipse/object.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = require("api")
local api = require("util")

local types = {
["left-right"]=true,
Expand Down
2 changes: 1 addition & 1 deletion objects/frame/logic.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = require("api")
local api = require("util")
return function(object,event)
object.on_any(object,event)
local x,y = object.window.getPosition()
Expand Down
4 changes: 2 additions & 2 deletions objects/frame/object.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local api = require("api")
local main = require("a-tools.gui_object")
local api = require("util")
local main = require("core.gui_object")

return function(object,data)
data = data or {}
Expand Down
4 changes: 2 additions & 2 deletions objects/group/object.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local api = require("api")
local main = require("a-tools.gui_object")
local api = require("util")
local main = require("core.gui_object")

return function(object,data)
data = data or {}
Expand Down
2 changes: 1 addition & 1 deletion objects/inputbox/logic.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = require("api")
local api = require("util")

local function depattern(str)
return str:gsub("[%[%]%(%)%.%+%-%%%$%^%*%?]", "%%%1")
Expand Down
2 changes: 1 addition & 1 deletion objects/inputbox/object.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = require("api")
local api = require("util")

return function(object,data)
if type(data.visible) ~= "boolean" then data.visible = true end
Expand Down
2 changes: 1 addition & 1 deletion objects/progressbar/object.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = require("api")
local api = require("util")

local types = {
["left-right"]=true,
Expand Down
2 changes: 1 addition & 1 deletion objects/rectangle/object.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = require("api")
local api = require("util")

local types = {
["left-right"]=true,
Expand Down
2 changes: 1 addition & 1 deletion objects/script/object.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = require("api")
local api = require("util")
return function(object,data)
data = data or {}
if type(data.visible) ~= "boolean" then data.visible = true end
Expand Down
2 changes: 1 addition & 1 deletion objects/scrollbox/logic.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = require("api")
local api = require("util")

return function(object,event)
if api.is_within_field(
Expand Down
2 changes: 1 addition & 1 deletion objects/scrollbox/object.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = require("api")
local api = require("util")
return function(object,data)
data = data or {}
if type(data.visible) ~= "boolean" then data.visible = true end
Expand Down
2 changes: 1 addition & 1 deletion objects/switch/logic.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = require("api")
local api = require("util")
return function(object,event)
if api.is_within_field(
event.x,
Expand Down
2 changes: 1 addition & 1 deletion objects/switch/object.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = require("api")
local api = require("util")

return function(object,data)
data = data or {}
Expand Down
2 changes: 1 addition & 1 deletion objects/text/object.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = require("api")
local api = require("util")
return function(object,data)
data = data or {}
if type(data.visible) ~= "boolean" then data.visible = true end
Expand Down
2 changes: 1 addition & 1 deletion objects/triangle/graphic.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local algo = require("a-tools.algo")
local algo = require("core.algo")
local graphic = require("graphic_handle").code

return function(object)
Expand Down
2 changes: 1 addition & 1 deletion objects/triangle/object.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = require("api")
local api = require("util")

local types = {
["left-right"]=true,
Expand Down
2 changes: 1 addition & 1 deletion presets/tex/checker.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--* builds a checkerboard texture with any amount of colors

local api = require("api")
local api = require("util")
local graphic = require("graphic_handle")

return function(...)
Expand Down
File renamed without changes.

0 comments on commit 8b740f6

Please sign in to comment.