mirror of
https://github.com/S4mpsa/InfOS.git
synced 2025-08-03 09:56:01 -04:00
Fixing encapsulation errors
This commit is contained in:
parent
4c11905281
commit
e194231476
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@ -1,3 +1,6 @@
|
||||
{
|
||||
"lua.targetVersion": "5.3"
|
||||
"lua.targetVersion": "5.3",
|
||||
"Lua.diagnostics.globals": [
|
||||
"checkArg"
|
||||
]
|
||||
}
|
@ -18,9 +18,8 @@ local colors = {
|
||||
black = 0x000000
|
||||
}
|
||||
|
||||
table.concat(
|
||||
colors,
|
||||
{
|
||||
---[[
|
||||
local newColors = {
|
||||
machineBackground = colors.darkGray,
|
||||
progressBackground = colors.lightGray,
|
||||
labelColor = colors.chocolate,
|
||||
@ -38,7 +37,12 @@ table.concat(
|
||||
accentB = colors.magenta,
|
||||
barColor = colors.blue
|
||||
}
|
||||
)
|
||||
|
||||
for name, color in pairs(newColors) do
|
||||
colors[name] = color
|
||||
end
|
||||
|
||||
--[[
|
||||
|
||||
local RGB = {}
|
||||
|
||||
@ -62,5 +66,5 @@ setmetatable(
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
--]]
|
||||
return colors
|
||||
|
@ -87,7 +87,7 @@ function graphics.createWindow(GPU, width, height, name)
|
||||
return pageNumber
|
||||
end
|
||||
|
||||
local function copyWindow(GPU, x, y, page, destination)
|
||||
function graphics.copyWindow(GPU, x, y, page, destination)
|
||||
destination = 0 or destination
|
||||
GPU.bitblt(destination, x, y, 160, 50, page, 1, 1)
|
||||
end
|
||||
@ -95,7 +95,7 @@ end
|
||||
function graphics.refresh(GPU)
|
||||
for window, params in pairs(graphics.currentWindows) do
|
||||
if params.w > 0 then
|
||||
copyWindow(GPU, params.x, params.y, params.page)
|
||||
graphics.copyWindow(GPU, params.x, params.y, params.page)
|
||||
end
|
||||
end
|
||||
GPU.setActiveBuffer(0)
|
||||
@ -105,7 +105,7 @@ graphics.windows = {}
|
||||
function graphics.update()
|
||||
local function redraw()
|
||||
for window, params in pairs(graphics.windows) do
|
||||
copyWindow(params.GPU, params.x, params.y, params.page)
|
||||
graphics.copyWindow(params.GPU, params.x, params.y, params.page)
|
||||
end
|
||||
end
|
||||
for name, params in pairs(graphics.windows) do
|
||||
|
@ -6,7 +6,7 @@ GPU = Component.gpu
|
||||
Colors = require("colors")
|
||||
|
||||
local gui, quit, editing = {}, false, false
|
||||
local currentWindows = {}
|
||||
local currentWindows = Graphics.currentWindows
|
||||
local activeWindow
|
||||
local keyInput, mouseInput, drag, inContextMenu
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user