Skip to content

Letterbox color vs BorderColor vs Background Color #16

@jakebesworth

Description

@jakebesworth

Hey Ulydev, thanks for the useful library!

One thing I noticed with https://github.com/tomlum/simpleScale library is the option to set the letterbox color.

With your library, setting the background (borderColor?) color sets the background color of the virtual screen as well as the letterbox.

This is strange because the letterbox color almost always should be black, and the background color of the actual window should be the "background color" of the game in question. While ideally a game wouldn't use the native background color vs images / sprites, sometimes it matters.

One simple fix is to add:

    backgroundR, backgroundG, backgroundB = 0.33, 0.33, 0.33
    local oc = {}
    oc.r, oc.g, oc.b, oc.a = love.graphics.getColor()
    love.graphics.setColor(backgroundR, backgroundG, backgroundB)
    love.graphics.rectangle("fill", 0, 0, self._WWIDTH, self._WHEIGHT)
    love.graphics.setColor(oc.r,oc.g,oc.b,oc.a)

Just before Push:start(), which gives us a grey background color and black letterboxes.

Does adding a configurable option to add this make sense?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions