Skip to content

Commit

Permalink
feat: list of games played as a popup
Browse files Browse the repository at this point in the history
  • Loading branch information
AmanMenda committed May 6, 2024
1 parent 0bb9227 commit ec56603
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 204 deletions.
4 changes: 2 additions & 2 deletions include/App/Stuckfish.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ namespace Stuckfish
struct WindowSpecs
{
std::string name = "Stuckfish";
uint32_t width = 1500;
uint32_t height = 800;
float width = 1500;
float height = 800;
};

class Core
Expand Down
36 changes: 0 additions & 36 deletions include/UI/GamesPlayedPage.hpp

This file was deleted.

11 changes: 9 additions & 2 deletions include/UI/HomePage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ namespace Stuckfish
enum HomePageEvent
{
NONE = 0,
ON_USERNAME_SUBMITTED
ON_USERNAME_SUBMITTED,
ON_GAME_SELECTION,
};

class HomePage
Expand All @@ -28,15 +29,21 @@ namespace Stuckfish
HomePage(Core& app) : _app(app), _userData(std::make_shared<UserData>())
{
_event = HomePageEvent::NONE;
_selectedGameData = nullptr;
}

void Render(void);
void Update(void);

void RenderPopup(void);
private:
Core& _app;
std::shared_ptr<UserData> _userData;
HomePageEvent _event;
std::shared_ptr<GamesData> _selectedGameData;
std::vector<GamesData> _gamesData;
std::shared_ptr<UserData> _userData;

bool _hasRetrievedGames = false;
};
}

153 changes: 0 additions & 153 deletions src/UI/GamesPlayedPage.cpp

This file was deleted.

Loading

0 comments on commit ec56603

Please sign in to comment.