Text-Renderer/src/Config.h

43 lines
885 B
C++

//
// Created by my on 2019/11/13.
//
#ifndef TRE_CONFIG_H
#define TRE_CONFIG_H
#include <fstream>
#include <sstream>
#include <iostream>
#include "Color.hpp"
#define CONFIG_FILE_PATH "../res/font4.config"
#define BORDER_COLOR_STARTPOSITION 13
#define BACKGROUND_COLOR_STARTPOSITION 16
#define FONT_COLOR_STARTPOSITION 11
#define BORDER_WIDTH_STARTPOSITION 13
#define ROW_STARTPOSITION 4
#define COLUMN_STARTPOSITION 7
#define COLUMN_OF_FINAL_ROW_STARTPOSITION 17
class Config {
public:
vkvm::Color border_color = vkvm::Color(0, 0, 0);
vkvm::Color background_color = vkvm::Color(0, 0, 0);
vkvm::Color font_color = vkvm::Color(0, 0, 0);
int border_width;
int row;
int column;
int column_of_finalRow;
Config();
private:
void init();
vkvm::Color readColor(std::string line);
int readInteger(std::string line);
};
#endif //TRE_CONFIG_H