20#include <condition_variable>
21#include <SDL_events.h>
25#include "render/irenderer.h"
28#include "tables/itable_loader.h"
34#include "tables/vpsdb/vpsdb_catalog_table.h"
35#include "sound/isound_manager.h"
39#include "ui/playfield_overlay.h"
40#include "ui/imgui_manager.h"
42#include "iapp_callbacks.h"
44#include "ui/loading_screen.h"
67 App(
const std::string& configPath);
90 void reloadFont(
bool isStandalone =
false)
override;
122 std::string configPath_;
123 bool showConfig_ =
false;
124 std::unique_ptr<TableOverrideEditor> overrideEditor_;
126 bool showEditor_ =
false;
127 std::unique_ptr<vpsdb::VpsdbCatalog> vpsdbCatalog_;
128 std::unique_ptr<vpsdb::VpsdbJsonLoader> vpsdbJsonLoader_;
129 bool showVpsdb_ =
false;
130 size_t currentIndex_ = 0;
131 size_t lastTableIndex_;
132 std::unique_ptr<TTF_Font, void(*)(TTF_Font*)> font_;
133 std::unique_ptr<JoystickManager> joystickManager_;
134 std::unique_ptr<IWindowManager> windowManager_;
135 std::unique_ptr<ImGuiManager> imGuiManager_;
136 std::unique_ptr<ISoundManager> soundManager_;
137 std::unique_ptr<IKeybindProvider> keybindProvider_;
138 std::unique_ptr<IConfigService> configManager_;
139 std::unique_ptr<ConfigUI> configEditor_;
140 std::unique_ptr<IRenderer> renderer_;
141 std::unique_ptr<IAssetManager> assets_;
142 std::unique_ptr<IScreenshotManager> screenshotManager_;
143 std::unique_ptr<ITableLauncher> tableLauncher_;
144 std::unique_ptr<IInputManager> inputManager_;
145 std::unique_ptr<ITableLoader> tableLoader_;
146 std::unique_ptr<ITableCallbacks> tableCallbacks_;
147 std::vector<TableData> tables_;
148 std::unique_ptr<PlayfieldOverlay> playfieldOverlay_;
149 bool prevShowConfig_ =
false;
150 std::atomic<bool> isLoadingTables_{
false};
151 std::mutex tablesMutex_;
152 std::shared_ptr<LoadingProgress> loadingProgress_;
153 std::unique_ptr<LoadingScreen> loadingScreen_;
154 std::thread loadingThread_;
155 std::mutex loadingMutex_;
156 std::condition_variable loadingCV_;
165 std::string getExecutableDir();
174 bool isConfigValid();
223 void initializeDependencies();
230 void loadTablesThreaded(
size_t oldIndex = 0);
Main application controller for ASAPCabinetFE.
Definition app.h:57
void reloadAssetsAndRenderers() override
Reloads assets and renderers.
Definition app.cpp:85
~App()
Destroys the App instance.
Definition app.cpp:29
void reloadOverlaySettings() override
Reloads overlay settings.
Definition app.cpp:111
void reloadWindows() override
Reloads window configurations.
Definition app.cpp:54
void reloadTablesAndTitle() override
Reloads table data and window title.
Definition app.cpp:92
void reloadFont(bool isStandalone=false) override
Reloads the font resource.
Definition app.cpp:60
void run()
Runs the main application loop.
Definition app.cpp:43
Interface for handling various application callbacks.
Definition iapp_callbacks.h:22
Interface for managing sound operations.
Definition isound_manager.h:14
Definition table_override_manager.h:19
Defines the ConfigUI class for managing the ImGui-based configuration UI in ASAPCabinetFE.
Defines the DependencyFactory class for creating component instances in ASAPCabinetFE.
Defines the IAssetManager interface for managing assets in ASAPCabinetFE.
Defines the IConfigService interface for managing configuration in ASAPCabinetFE.
Defines the IScreenshotManager interface for screenshot capture operations in ASAPCabinetFE.
Defines the ITableCallbacks interface for managing ASAP index files in ASAPCabinetFE.
Defines the ITableLauncher interface for launching VPX tables.
Defines the IWindowManager interface for managing SDL windows and renderers in ASAPCabinetFE.
Defines the JoystickManager class for handling SDL joysticks in ASAPCabinetFE.
Defines the LoadingProgress struct for tracking loading state in ASAPCabinetFE.
Defines the TableData struct for storing VPX table metadata and media paths.
Defines the TableOverrideEditor class for editing table overrides in ASAPCabinetFE.
Defines the TableOverrideManager class for handling per-table JSON overrides in ASAPCabinetFE.
Header for VpsdbCatalog class to display VPSDB pinball table metadata.