default to not even border

This commit is contained in:
Mikayla Fischler 2022-06-16 11:31:52 -04:00
parent ea9e9288f7
commit 6980e73658
3 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ local config = require("coordinator.config")
local coordinator = require("coordinator.coordinator")
local renderer = require("coordinator.renderer")
local COORDINATOR_VERSION = "alpha-v0.2.0"
local COORDINATOR_VERSION = "alpha-v0.2.1"
local print = util.print
local println = util.println

View File

@ -23,7 +23,7 @@ local function make(parent, x, y, unit_id)
TextBox{parent=root,text="Unit #" .. unit_id,alignment=TEXT_ALIGN.CENTER,height=1,fg_bg=style.header}
-- reactor
local reactor = Rectangle{parent=root,border=border(1, colors.gray, false),width=30,height=10,x=1,y=3}
local reactor = Rectangle{parent=root,border=border(1, colors.gray),width=30,height=10,x=1,y=3}
local text_fg_bg = cpair(colors.black, colors.lightGray)
local lu_col = cpair(colors.gray, colors.gray)

View File

@ -43,13 +43,13 @@ graphics.TEXT_ALIGN = {
-- create a new border definition
---@param width integer border width
---@param color color border color
---@param even boolean whether to pad width extra to account for rectangular pixels
---@param even? boolean whether to pad width extra to account for rectangular pixels, defaults to false
---@return graphics_border
function graphics.border(width, color, even)
return {
width = width,
color = color,
even = even
even = even or false -- convert nil to false
}
end