Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backgroundColor to IEngineOptions #846

Closed
kamranayub opened this issue Jun 20, 2017 · 2 comments
Closed

Add backgroundColor to IEngineOptions #846

kamranayub opened this issue Jun 20, 2017 · 2 comments
Labels
enhancement Label applied to enhancements or improvements to existing features good first issue good for people new to open source and Excalibur

Comments

@kamranayub
Copy link
Member

kamranayub commented Jun 20, 2017

Context

You can set the backgroundColor property on an instance of engine but cannot pass it in via the constructor options.

var game = new ex.Engine({
    width: 1280,
    height: 720    
});
game.backgroundColor = ex.Color.White;

Proposal

Add backgroundColor to IEngineOptions and allow setting it that way. It should be as easy as adding a new property and then setting it in the Engine constructor.

var game = new ex.Engine({
    width: 1280,
    height: 720,
    backgroundColor: ex.Color.White
});
@kamranayub kamranayub added enhancement Label applied to enhancements or improvements to existing features good first issue good for people new to open source and Excalibur labels Jun 20, 2017
@htalat
Copy link
Contributor

htalat commented Jun 26, 2017

Hi,
I'd like to work on this.

@kamranayub
Copy link
Member Author

kamranayub commented Jun 27, 2017

Thanks @htalat! Make sure to review the contributing guidelines for what we expect and we look forward to seeing your PR!

kamranayub pushed a commit that referenced this issue Jun 28, 2017
Closes #846 

## Changes:

- Add `backgroundColor` to `IEngineOptions` as an optional field.
- Use `ex.Color.Blue` as the default `backgroundColor`.
- Set the `backgroundColor` in the constructor `from IEngineOptions`.
- Add a test in the Engine Specs.
@jedeen jedeen added this to the 0.12.0 Release milestone Jun 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Label applied to enhancements or improvements to existing features good first issue good for people new to open source and Excalibur
Projects
None yet
Development

No branches or pull requests

3 participants