35 lines
765 B
C++
35 lines
765 B
C++
#ifndef CONTROLPANEL_H
|
|
#define CONTROLPANEL_H
|
|
#include <memory>
|
|
|
|
#include "CallbackManager.h"
|
|
#include "../Graphics/Graphics.h"
|
|
#include "../Interpreter/MachineState.h"
|
|
|
|
|
|
class ControlPanel
|
|
{
|
|
std::shared_ptr<Graphics> graphics;
|
|
std::shared_ptr<MachineState> machine_state;
|
|
std::shared_ptr<CallbackManager> callback_manager;
|
|
|
|
bool run = false;
|
|
int steps = 1;
|
|
int ips = 700;
|
|
|
|
static SDLCALL void on_callback_load_rom(void* self, const char* const* filelist, int filter);
|
|
|
|
public:
|
|
ControlPanel(
|
|
std::shared_ptr<Graphics> graphics,
|
|
std::shared_ptr<MachineState> machine_state,
|
|
std::shared_ptr<CallbackManager> callback_manager
|
|
);
|
|
|
|
void render();
|
|
void on_click_load_rom();
|
|
};
|
|
|
|
|
|
#endif //CONTROLPANEL_H
|