-
Notifications
You must be signed in to change notification settings - Fork 1
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
Added menu, changed button #28
base: master
Are you sure you want to change the base?
Conversation
text.setString(textString); | ||
text.setCharacterSize(characterSize); | ||
|
||
Button::Button(sf::RenderWindow &win) : window(win){ |
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.
){
pain
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.
} | ||
void Button::draw() { | ||
window.draw(background); | ||
window.draw(text); | ||
|
||
} | ||
void Button::setPosition (float x, float y, float width, float height){ | ||
void Button::setPosition (float x, float y){ |
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.
agony
void Button::setFont(sf::Font &font){ | ||
text.setFont(font); | ||
} | ||
void Button::setColors(sf::Color backgroundColor, sf::Color textColor){ |
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.
We dont know what is background color and what is text color. I think we should make two separate functions: setBackgoundColor()
and setTextColor
void draw(); | ||
void setPosition(float x, float y, float width, float height); | ||
void setPosition(sf::Vector2f vector); | ||
void setPosition(float x, float y); |
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.
Why isn't it indented?
sf::RectangleShape background; | ||
sf::Event event; | ||
sf::Color backgroundColor; | ||
sf::Color textColor; | ||
int width, height; |
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.
Do we ever use these variables in actual code? If I checked it correctly, we neither use nor update them. Also, why are these ints, while rectangle size is a float?
No description provided.