diff --git a/sdcard/3ds/ctruLua/editor/color.lua b/sdcard/3ds/ctruLua/editor/color.lua index e29506a..5f6ef58 100644 --- a/sdcard/3ds/ctruLua/editor/color.lua +++ b/sdcard/3ds/ctruLua/editor/color.lua @@ -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) } \ No newline at end of file diff --git a/sdcard/3ds/ctruLua/libs/keyboard.lua b/sdcard/3ds/ctruLua/libs/keyboard.lua index d77b611..af34714 100644 --- a/sdcard/3ds/ctruLua/libs/keyboard.lua +++ b/sdcard/3ds/ctruLua/libs/keyboard.lua @@ -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 diff --git a/source/main.c b/source/main.c index 21750ed..c9e7473 100644 --- a/source/main.c +++ b/source/main.c @@ -52,6 +52,6 @@ int main() { // Unload Lua lua_close(L); - + return 0; }