Skip to content

Commit

Permalink
refactored UIStats
Browse files Browse the repository at this point in the history
  • Loading branch information
Ipagaxi committed Apr 26, 2024
1 parent 3ee83d1 commit 4a22318
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 50 deletions.
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ file(GLOB source_files
"src/main/*.cpp"
"src/main/Activities/*.cpp"
"src/main/UIElements/*.cpp"
"src/main/UIComponents/*.cpp"
"src/main/Actors/*.cpp"
"src/main/Animations/*.cpp"
"src/main/UI_Objects/*.cpp"
"src/main/UIObjects/*.cpp"
"src/main/FightStates/*.cpp"
)
set(SOURCES ${source_files})
Expand All @@ -31,8 +30,6 @@ FetchContent_MakeAvailable(SFML)
add_executable (
${PROJECT_NAME}
${SOURCES}
src/include/FightStates/FightState.hpp
src/include/FightEnv.hpp
)

target_include_directories(${PROJECT_NAME} PRIVATE "src/include")
Expand Down
6 changes: 3 additions & 3 deletions src/include/Activities/FightActivity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#include "ActivityEnum.hpp"
#include "Animations/TextFadingManager.hpp"
#include "Animations/IncomingBanner.hpp"
#include "UIComponents/UIStats.hpp"
#include "UI_Objects/UIEnemyOverview.hpp"
#include "UI_Objects/UIPlayerOverview.hpp"
#include "UIElements/UIStats.hpp"
#include "UIObjects/UIEnemyOverview.hpp"
#include "UIObjects/UIPlayerOverview.hpp"
#include "UIElements/UIColorPicker.hpp"
#include "UIElements/UIButton.hpp"
#include "UIElements/UIBox.hpp"
Expand Down
6 changes: 3 additions & 3 deletions src/include/FightEnv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#define FIGHTEVENTS_HPP

#include <SFML/Graphics.hpp>
#include "UIComponents/UIStats.hpp"
#include "UI_Objects/UIEnemyOverview.hpp"
#include "UI_Objects/UIPlayerOverview.hpp"
#include "UIElements/UIStats.hpp"
#include "UIObjects/UIEnemyOverview.hpp"
#include "UIObjects/UIPlayerOverview.hpp"
#include "Animations/TextFadingManager.hpp"
#include "Animations/IncomingBanner.hpp"
#include "Game.hpp"
Expand Down
16 changes: 0 additions & 16 deletions src/include/UIComponents/UIComponent.hpp

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef UIPLAYERSTATS_HPP
#define UIPLAYERSTATS_HPP

#include "UIComponents/UIComponent.hpp"
#include "UIElements/UIBox.hpp"
#include "UIElements/UIElement.hpp"
#include "Actors/Actor.hpp"
#include "Game.hpp"
#include <iostream>

class UIStats: public UIComponent {
class UIStats: public UIElement {
public:
UIStats(Game &game, Actor actor);

Expand Down
2 changes: 1 addition & 1 deletion src/include/UIObjects/UIEnemyOverview.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <string>
#include <SFML/Graphics.hpp>

#include "UIComponents/UIStats.hpp"
#include "UIElements/UIStats.hpp"
#include "UIElements/UIColorPicker.hpp"
#include "UIElements/UIBorderedImage.hpp"
#include "UIElements/UIBox.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/include/UIObjects/UIPlayerOverview.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "Game.hpp"
#include "UIElements/UIBox.hpp"
#include "UIElements/UIBorderedImage.hpp"
#include "UIComponents/UIStats.hpp"
#include "UIElements/UIStats.hpp"


class UIPlayerOverview {
Expand Down
17 changes: 0 additions & 17 deletions src/main/UIComponents/UIComponent.cpp

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "UIComponents/UIStats.hpp"
#include "UIElements/UIStats.hpp"


UIStats::UIStats(Game &game, Actor actor) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "UI_Objects/UIEnemyOverview.hpp"
#include "UIObjects/UIEnemyOverview.hpp"

UIEnemyOverview::UIEnemyOverview(Game &game): UIEnemyOverview(game, Enemy()) {
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "UI_Objects/UIPlayerOverview.hpp"
#include "UIObjects/UIPlayerOverview.hpp"

UIPlayerOverview::UIPlayerOverview(Game &game): statsComponent(game, game.player), player(game.player), playerFrame("monster_landscape_cut/" + game.player.picPath, "actor_borders/fight_border.png") {
sf::Vector2u windowSize = game.renderEngine.gameWindow->getSize();
Expand Down

0 comments on commit 4a22318

Please sign in to comment.