Skip to content

Commit

Permalink
#342 added element focusing feature to graphics library
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaylaFischler committed Sep 17, 2023
1 parent 1cb240b commit 29e910b
Show file tree
Hide file tree
Showing 10 changed files with 505 additions and 187 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"colors",
"fs",
"http",
"keys",
"parallel",
"periphemu",
"peripheral",
Expand Down
18 changes: 4 additions & 14 deletions graphics/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,15 @@ local flasher = require("graphics.flasher")

local core = {}

core.version = "1.1.3"
core.version = "2.0.0"

core.flasher = flasher
core.events = events

-- Core Types

---@enum TEXT_ALIGN
core.TEXT_ALIGN = {
LEFT = 1,
CENTER = 2,
RIGHT = 3
}
core.TEXT_ALIGN = { LEFT = 1, CENTER = 2, RIGHT = 3 }

---@class graphics_border
---@field width integer
Expand Down Expand Up @@ -73,15 +69,9 @@ end
function core.cpair(a, b)
return {
-- color pairs
color_a = a,
color_b = b,
blit_a = colors.toBlit(a),
blit_b = colors.toBlit(b),
color_a = a, color_b = b, blit_a = colors.toBlit(a), blit_b = colors.toBlit(b),
-- aliases
fgd = a,
bkg = b,
blit_fgd = colors.toBlit(a),
blit_bkg = colors.toBlit(b)
fgd = a, bkg = b, blit_fgd = colors.toBlit(a), blit_bkg = colors.toBlit(b)
}
end

Expand Down
Loading

0 comments on commit 29e910b

Please sign in to comment.