Initial commit

This commit is contained in:
Gericom
2025-11-22 17:21:45 +01:00
commit 5d6f67c612
517 changed files with 63025 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
#pragma once
#include "core/SharedPtr.h"
#include "../RomBrowserController.h"
#include "RomBrowserViewModel.h"
#include "RomBrowserAppBarViewModel.h"
class ICoverRepository;
/// @brief View model for the rom browser bottom screen
class RomBrowserBottomScreenViewModel
{
public:
RomBrowserBottomScreenViewModel(IRomBrowserController* romBrowserController)
: _romBrowserController(romBrowserController)
, _romBrowserAppBarViewModel(romBrowserController) { }
bool IsRomBrowserVisible() const
{
auto state = _romBrowserController->GetStateMachine().GetCurrentState();
return state == RomBrowserState::Browser
|| state == RomBrowserState::GameInfo
|| state == RomBrowserState::DisplaySettings
|| state == RomBrowserState::Launching;
}
const SharedPtr<RomBrowserViewModel>& GetRomBrowserViewModel()
{
return _romBrowserController->GetRomBrowserViewModel();
}
RomBrowserAppBarViewModel* GetRomBrowserAppBarViewModel()
{
return &_romBrowserAppBarViewModel;
}
void NavigateUp()
{
_romBrowserController->NavigateUp();
}
private:
IRomBrowserController* _romBrowserController;
RomBrowserAppBarViewModel _romBrowserAppBarViewModel;
};