mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-27 16:39:29 +00:00
Merge branch 'master' of https://github.com/Firew0lf/ctruLua
This commit is contained in:
commit
bebfa8b72d
3 changed files with 17 additions and 14 deletions
|
|
@ -1,16 +1,18 @@
|
|||
local hex = require("ctr.gfx.color").hex
|
||||
|
||||
-- Colors based on the Monokai theme
|
||||
return {
|
||||
-- General
|
||||
["background"] = 0x272822FF,
|
||||
["cursor"] = 0xF8F8F0FF,
|
||||
["default"] = 0xF8F8F2FF,
|
||||
["background"] = hex(0x272822FF),
|
||||
["cursor"] = hex(0xF8F8F0FF),
|
||||
["default"] = hex(0xF8F8F2FF),
|
||||
|
||||
-- Syntax
|
||||
["comment"] = 0x75715EFF,
|
||||
["string"] = 0xE6DB74FF,
|
||||
["constant.numeric"] = 0xAE81FFFF,
|
||||
["constant.language"] = 0xAE81FFFF,
|
||||
["keyword.control"] = 0xF92672FF,
|
||||
["keyword.operator"] = 0xF92672FF,
|
||||
["support.function"] = 0x66D9EFFF
|
||||
["comment"] = hex(0x75715EFF),
|
||||
["string"] = hex(0xE6DB74FF),
|
||||
["constant.numeric"] = hex(0xAE81FFFF),
|
||||
["constant.language"] = hex(0xAE81FFFF),
|
||||
["keyword.control"] = hex(0xF92672FF),
|
||||
["keyword.operator"] = hex(0xF92672FF),
|
||||
["support.function"] = hex(0x66D9EFFF)
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
local hid = require("ctr.hid")
|
||||
local gfx = require("ctr.gfx")
|
||||
local hex = gfx.color.hex
|
||||
|
||||
-- Options
|
||||
local keyWidth, keyHeight = 25, 25
|
||||
|
|
@ -62,14 +63,14 @@ return {
|
|||
for column, key in pairs(rowKeys) do
|
||||
local xKey, yKey = x + (column-1)*(keyWidth-1), y + (row-1)*(keyHeight-1)
|
||||
|
||||
gfx.rectangle(xKey, yKey, keyWidth, keyHeight, 0, 0xFFFFFFFF)
|
||||
gfx.rectangle(xKey + 1, yKey + 1, keyWidth - 2, keyHeight - 2, 0, 0x000000FF)
|
||||
gfx.rectangle(xKey, yKey, keyWidth, keyHeight, 0, hex(0xFFFFFFFF))
|
||||
gfx.rectangle(xKey + 1, yKey + 1, keyWidth - 2, keyHeight - 2, 0, hex(0x000000FF))
|
||||
gfx.text(xKey + 2, yKey + 2, key)
|
||||
|
||||
if xTouch then
|
||||
if xTouch > xKey and xTouch < xKey + keyWidth then
|
||||
if yTouch > yKey and yTouch < yKey + keyHeight then
|
||||
gfx.rectangle(xKey, yKey, keyWidth, keyHeight, 0, 0xDDFFFFFF)
|
||||
gfx.rectangle(xKey, yKey, keyWidth, keyHeight, 0, hex(0xDDFFFFFF))
|
||||
|
||||
local k = alias[key] or key
|
||||
if sticky[k] and layout[sticky[k]] then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue