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
9
.vscode/settings.json
vendored
9
.vscode/settings.json
vendored
@ -1,3 +1,6 @@
|
|||||||
{
|
{
|
||||||
"lua.targetVersion": "5.3"
|
"lua.targetVersion": "5.3",
|
||||||
}
|
"Lua.diagnostics.globals": [
|
||||||
|
"checkArg"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
@ -18,27 +18,31 @@ local colors = {
|
|||||||
black = 0x000000
|
black = 0x000000
|
||||||
}
|
}
|
||||||
|
|
||||||
table.concat(
|
---[[
|
||||||
colors,
|
local newColors = {
|
||||||
{
|
machineBackground = colors.darkGray,
|
||||||
machineBackground = colors.darkGray,
|
progressBackground = colors.lightGray,
|
||||||
progressBackground = colors.lightGray,
|
labelColor = colors.chocolate,
|
||||||
labelColor = colors.chocolate,
|
errorColor = colors.red,
|
||||||
errorColor = colors.red,
|
idleColor = colors.purple,
|
||||||
idleColor = colors.purple,
|
workingColor = colors.steelBlue,
|
||||||
workingColor = colors.steelBlue,
|
positiveEUColor = colors.lime,
|
||||||
positiveEUColor = colors.lime,
|
negativeEUColor = colors.brown,
|
||||||
negativeEUColor = colors.brown,
|
timeColor = colors.purple,
|
||||||
timeColor = colors.purple,
|
textColor = colors.black,
|
||||||
textColor = colors.black,
|
hudColor = colors.darkSlateGrey,
|
||||||
hudColor = colors.darkSlateGrey,
|
mainColor = colors.rosyBrown,
|
||||||
mainColor = colors.rosyBrown,
|
background = colors.black,
|
||||||
background = colors.black,
|
accentA = colors.cyan,
|
||||||
accentA = colors.cyan,
|
accentB = colors.magenta,
|
||||||
accentB = colors.magenta,
|
barColor = colors.blue
|
||||||
barColor = colors.blue
|
}
|
||||||
}
|
|
||||||
)
|
for name, color in pairs(newColors) do
|
||||||
|
colors[name] = color
|
||||||
|
end
|
||||||
|
|
||||||
|
--[[
|
||||||
|
|
||||||
local RGB = {}
|
local RGB = {}
|
||||||
|
|
||||||
@ -62,5 +66,5 @@ setmetatable(
|
|||||||
end
|
end
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
--]]
|
||||||
return colors
|
return colors
|
||||||
|
@ -87,7 +87,7 @@ function graphics.createWindow(GPU, width, height, name)
|
|||||||
return pageNumber
|
return pageNumber
|
||||||
end
|
end
|
||||||
|
|
||||||
local function copyWindow(GPU, x, y, page, destination)
|
function graphics.copyWindow(GPU, x, y, page, destination)
|
||||||
destination = 0 or destination
|
destination = 0 or destination
|
||||||
GPU.bitblt(destination, x, y, 160, 50, page, 1, 1)
|
GPU.bitblt(destination, x, y, 160, 50, page, 1, 1)
|
||||||
end
|
end
|
||||||
@ -95,7 +95,7 @@ end
|
|||||||
function graphics.refresh(GPU)
|
function graphics.refresh(GPU)
|
||||||
for window, params in pairs(graphics.currentWindows) do
|
for window, params in pairs(graphics.currentWindows) do
|
||||||
if params.w > 0 then
|
if params.w > 0 then
|
||||||
copyWindow(GPU, params.x, params.y, params.page)
|
graphics.copyWindow(GPU, params.x, params.y, params.page)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
GPU.setActiveBuffer(0)
|
GPU.setActiveBuffer(0)
|
||||||
@ -105,7 +105,7 @@ graphics.windows = {}
|
|||||||
function graphics.update()
|
function graphics.update()
|
||||||
local function redraw()
|
local function redraw()
|
||||||
for window, params in pairs(graphics.windows) do
|
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
|
||||||
end
|
end
|
||||||
for name, params in pairs(graphics.windows) do
|
for name, params in pairs(graphics.windows) do
|
||||||
|
@ -6,7 +6,7 @@ GPU = Component.gpu
|
|||||||
Colors = require("colors")
|
Colors = require("colors")
|
||||||
|
|
||||||
local gui, quit, editing = {}, false, false
|
local gui, quit, editing = {}, false, false
|
||||||
local currentWindows = {}
|
local currentWindows = Graphics.currentWindows
|
||||||
local activeWindow
|
local activeWindow
|
||||||
local keyInput, mouseInput, drag, inContextMenu
|
local keyInput, mouseInput, drag, inContextMenu
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user