-
Notifications
You must be signed in to change notification settings - Fork 44
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 the ability to change light settings. #217
Conversation
src/light.rs
Outdated
@@ -44,6 +50,24 @@ impl Ambient { | |||
pub(crate) fn new(object: Base) -> Self { | |||
Ambient { object } | |||
} | |||
|
|||
/// Change light color. | |||
pub fn set_color( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds like we could have a Light
trait with those methods? Maybe even have the implementation shared somehow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some concerns.
We can use the trait and implement methods in it, then every time we want to use these methods, we should import the trait, it's annoying.
On the other hand, the implemntation with a macro is unfriendly for IDEs.
Do you prefer the case with a trait?
Agreed, there is a bit of an annoyance with a trait. Let's proceed.
Bors r+
… On Jan 1, 2019, at 20:49, Alexander Irbis ***@***.***> wrote:
@alexander-irbis commented on this pull request.
In src/light.rs:
> @@ -44,6 +50,24 @@ impl Ambient {
pub(crate) fn new(object: Base) -> Self {
Ambient { object }
}
+
+ /// Change light color.
+ pub fn set_color(
I have some concerns.
We can use the trait and implement methods in it, then every time we want to use these methods, we should import the trait, it's annoying.
On the other hand, the implemntation with a macro is unfriendly for IDEs.
Do you prefer the case with a trait?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
217: Add the ability to change light settings. r=kvark a=alexander-irbis Co-authored-by: Alexander Irbis <[email protected]>
bors r+ |
217: Add the ability to change light settings. r=kvark a=alexander-irbis Co-authored-by: Alexander Irbis <[email protected]>
Build succeeded |
No description provided.