немножко раскидал функции по отдельным файлам && add helloWorld example

This commit is contained in:
2025-04-05 20:29:18 +05:00
parent 5dc9f2ca31
commit 96eb2c55d3
13 changed files with 410 additions and 267 deletions

View File

@@ -4,6 +4,29 @@ local SystemColors = syscalls.GetSystemColors()
print(SystemColors)
for i, v in pairs(SystemColors) do
print(i, v)
function DEC_HEX(IN)
local B, K, OUT, I, D = 16, "0123456789ABCDEF", "", 0
while IN > 0 do
I = I + 1
IN, D = math.floor(IN / B), math.mod(IN, B) + 1
OUT = string.sub(K, D, D) .. OUT
end
return OUT
end
local keys = {
"frameArea",
"workArea",
"grabBar",
"grabBarButton",
"grabButtonText",
"grabText",
"workButton",
"workButtonText",
"workGraph",
"workText"
}
for _, v in pairs(keys) do
print(v .. ':', "#" .. DEC_HEX(SystemColors[v]))
end