segatools-configurator/configurator.h
2024-04-14 17:37:36 +07:00

55 lines
1.2 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;
char aime_card_id[21];
char aime_card_path[MAX_PATH];
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