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

Added menu, changed button #28

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JJendryka
Copy link
Member

No description provided.

text.setString(textString);
text.setCharacterSize(characterSize);

Button::Button(sf::RenderWindow &win) : window(win){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

){

pain

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meme

}
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){
Copy link
Member

@Bravo555 Bravo555 Oct 24, 2016

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){
Copy link
Member

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);
Copy link
Member

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;
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants