segatools-configurator/configurator.h

57 lines
1.3 KiB
C++

//
// Created by beerpsi on 4/14/2024.
//
#ifndef SEGATOOLS_CONFIGURATOR_CONFIGURATOR_H
#define SEGATOOLS_CONFIGURATOR_CONFIGURATOR_H
#include <condition_variable>
#include <filesystem>
#include <string>
#include <thread>
#include <vector>
#include <windows.h>
#include "button.h"
#include "option.h"
class Configurator {
private:
int game_selected = -1;
std::string game_selected_name;
std::vector<const char*> game_names;
std::thread *card_select_thread = nullptr;
bool card_select_done = false;
bool aime_gen;
char aime_card_id[21];
char aime_card_path[MAX_PATH];
bool felica_gen;
char felica_card_id[17];
char felica_card_path[MAX_PATH];
int previous_vk;
int vk;
void read_card();
void write_card();
void open_card_file_selector(const std::filesystem::path& pwd, const wchar_t* key);
public:
Configurator();
void set_key_code(int vKey) {
vk = vKey;
}
void build_content();
void build_cards();
void build_options(std::vector<Option> *options, const std::string &category);
void build_buttons(const std::string &name, std::vector<Button>* buttons);
void build_about();
};
#endif //SEGATOOLS_CONFIGURATOR_CONFIGURATOR_H