Skip to content

Commit

Permalink
Use the Color class everywhere.
Browse files Browse the repository at this point in the history
  • Loading branch information
Trey Tomes committed Jan 5, 2024
1 parent 5b4c060 commit 359e20c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tile.ms
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Tile.getDrawInfo = function(dim=false)
fg = self.foregroundColor
bg = self.backgroundColor
if dim then
if fg isa Color then fg = fg.darker.str else fg = "#444444"
if bg isa Color then bg = bg.darker.str else bg = color.black
if fg isa Color then fg = fg.darker.str else fg = Color.white.darker //"#444444"
if bg isa Color then bg = bg.darker.str else bg = Color.black
else
if fg isa Color then fg = fg.str
if bg isa Color then bg = bg.str
Expand All @@ -40,9 +40,9 @@ end function

Tile.drawDim = function(dsp, x, y)
fg = self.foregroundColor
if fg isa Color then fg = fg.darker.str else fg = "#444444"
if fg isa Color then fg = fg.darker.str else fg = Color.white.darker //"#444444"
bg = self.backgroundColor
if bg isa Color then bg = bg.darker.str else bg = color.black
if bg isa Color then bg = bg.darker.str else bg = Color.black
dsp.setCell x, y, self.char, fg, bg
end function

Expand Down

0 comments on commit 359e20c

Please sign in to comment.