Skip to content

Commit

Permalink
Revert "Merge branch 'development' into GPLoop-amanXSimon-CGPA"
Browse files Browse the repository at this point in the history
This reverts commit 68d05b3, reversing
changes made to 6ea5d5a.
  • Loading branch information
amantham20 committed Nov 28, 2023
1 parent 68d05b3 commit 39f33cb
Show file tree
Hide file tree
Showing 31 changed files with 176 additions and 2,766 deletions.
Binary file modified assets/Ground_tiles/dirt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/walls/gray_wall.png
Binary file not shown.
1,964 changes: 0 additions & 1,964 deletions blogposts/Kanagaraj/Blog_Final.html

This file was deleted.

1 change: 0 additions & 1 deletion blogposts/Kanagaraj/DRAFT.html

This file was deleted.

Binary file removed blogposts/Kanagaraj/images/image1.png
Binary file not shown.
Binary file removed blogposts/Kanagaraj/images/image2.png
Binary file not shown.
Binary file removed blogposts/Kanagaraj/images/image3.png
Binary file not shown.
Binary file removed blogposts/Kanagaraj/images/image4.png
Binary file not shown.
Binary file removed blogposts/Kanagaraj/images/image5.png
Binary file not shown.
Binary file removed blogposts/Kanagaraj/images/image6.png
Binary file not shown.
Binary file removed blogposts/Kanagaraj/images/image7.png
Binary file not shown.
Binary file removed blogposts/Kanagaraj/images/image8.png
Binary file not shown.
Binary file removed blogposts/Kanagaraj/images/image9.png
Binary file not shown.
15 changes: 10 additions & 5 deletions source/Interfaces/Button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
#include "Button.hpp"

/// Constructor
i_2D::Button::Button(const std::string &t, sf::Vector2f size, sf::Color bgColor,
sf::Color textColor, const sf::Font &font) {
text = std::make_unique<sf::Text>(font);
i_2D::Button::Button(std::string t, sf::Vector2f size, sf::Color bgColor, sf::Color textColor) {
if(!mfont.loadFromFile("../../assets/font/ArialNarrow7.ttf")){
std::cout << "Error loading font file" << std::endl;
}
text = std::make_unique<sf::Text>(mfont);

text->setString(t);
text->setFillColor(textColor);
Expand All @@ -20,8 +22,11 @@ i_2D::Button::Button(const std::string &t, sf::Vector2f size, sf::Color bgColor,
/**
* @brief set the font of the button
*/
void i_2D::Button::setMFont(const sf::Font &font) {
text = std::make_unique<sf::Text>(font);
void i_2D::Button::setMFont() {
if(!mfont.loadFromFile("../../assets/font/ArialNarrow7.ttf")){
std::cout << "Error loading font file" << std::endl;
}
text = std::make_unique<sf::Text>(mfont);
}

/**
Expand Down
17 changes: 9 additions & 8 deletions source/Interfaces/Button.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* @author : Team - 3
* @date: 11/02/2023
* Button class creates a SF::Rectangle and SF::Text on top
* @file Button.h
* @author
*
*
*/

#ifndef CSE_491_BUTTON_HPP
Expand All @@ -15,30 +16,30 @@ namespace i_2D {
class Button {
private:
sf::RectangleShape button;
sf::Font mfont;
std::unique_ptr<sf::Text> text;


public:
Button(const std::string &t, sf::Vector2f size, sf::Color bgColor,
sf::Color textColor, const sf::Font &font);
Button(std::string t, sf::Vector2f size, sf::Color bgColor, sf::Color textColor);

/**
* @brief set the string of the button
*
* @param s label of the button
*/
void setString(const std::string &s){
void setString(std::string s){
text->setString(s);
}

void setMFont(const sf::Font &font);
void setMFont();

/**
* @brief set the font of the button
*
* @param font
*/
void setFont(const sf::Font &font) {
void setFont(sf::Font &font) {
text->setFont(font);
}

Expand Down
65 changes: 0 additions & 65 deletions source/Interfaces/Inventory.cpp

This file was deleted.

43 changes: 0 additions & 43 deletions source/Interfaces/Inventory.hpp

This file was deleted.

Loading

0 comments on commit 39f33cb

Please sign in to comment.