some documentation and some bad icons

This commit is contained in:
kepler155c@gmail.com
2020-05-07 17:15:30 -06:00
parent 94b743bfc0
commit 1fc2d08c18
7 changed files with 69 additions and 51 deletions

View File

@@ -1,7 +1,10 @@
local device = _G.device
local kernel = _G.kernel
local opus = {
'fffff00',
'ffff07000',
'ff00770b00 4444',
'ff00770b00f4444',
'ff077777444444444',
'f07777744444444444',
'f0000777444444444',
@@ -12,29 +15,14 @@ local opus = {
'077000000000',
}
local hex = {
['0'] = 0xF0F0F04F,
['1'] = 0xF2B2334F,
['2'] = 0xE57FD84F,
['3'] = 0x99B2F24F,
['4'] = 0xDEDE6C4F,
['5'] = 0x7FCC194F,
['6'] = 0xF2B2CC4F,
['7'] = 0x4C4C4C4F,
['8'] = 0x9999994F,
['9'] = 0x4C99B24F,
['a'] = 0xB266E54F,
['b'] = 0x3366CC4F,
['c'] = 0x7F664C4F,
['d'] = 0x57A64E4F,
['e'] = 0xCC4C4C4F,
-- ['f'] = 0x191919FF, -- transparent
}
local function update()
local canvas = device['plethora:glasses'] and device['plethora:glasses'].canvas()
local canvas = device['plethora:glasses'] and device['plethora:glasses'].canvas()
if canvas then
local Tween = require('opus.ui.tween')
local Tween = require('opus.ui.tween')
local Glasses = require('neural.glasses')
local pal = Glasses.getPalette(0x4f)
pal['f'] = nil -- transparent
canvas.clear()
local w, h = canvas.getSize()
@@ -42,7 +30,7 @@ local function update()
local group = canvas.addGroup(pos)
local function drawLine(k, line)
for i = 1, #line do
local pix = hex[line:sub(i, i)]
local pix = pal[line:sub(i, i)]
if pix then
group.addRectangle(i*1.5, k*2.25, 1.5, 2.25, pix)
end
@@ -63,8 +51,6 @@ local function update()
end
kernel.run({
title = 'opus',
env = _ENV,
hidden = true,
fn = update,
})