Adding main characteristics

This commit is contained in:
Pcornat 2022-01-10 21:16:05 +01:00
parent 029acbbbb3
commit 4b5ec33d74
Signed by: Pcornat
GPG key ID: 2F3932FF46D9ECA0
14 changed files with 124 additions and 8 deletions

1
src/billy_sheet.cpp Normal file
View file

@ -0,0 +1 @@
#include "billy_sheet.hpp"

View file

@ -0,0 +1,5 @@
//
// Created by postaron on 10/01/2022.
//
#include "characteristic/adresse.hpp"

View file

@ -0,0 +1,5 @@
//
// Created by postaron on 10/01/2022.
//
#include "characteristic/chance.hpp"

View file

@ -0,0 +1 @@
#include "characteristic/endurance.hpp"

View file

@ -7,11 +7,13 @@
#include "window.hpp"
gui::Gui::Gui(gui::GuiData &data) : data(data), font("font/DejaVuSans.ttf") {
SPDLOG_DEBUG("Creating GUI");
ImGui::CreateContext();
ImGui::StyleColorsDark();
ImGui::GetIO().Fonts->AddFontFromFileTTF(font.c_str(), 18.0f);
ImGui_ImplGlfw_InitForOpenGL(data.get_window().get_window().get(), true);
initialized = ImGui_ImplOpenGL3_Init();
SPDLOG_DEBUG("Initialized: {}", initialized);
}
gui::Gui::~Gui() noexcept {

View file

@ -7,12 +7,10 @@
int main() {
std::ios::sync_with_stdio(false);
spdlog::set_default_logger(spdlog::stdout_color_st("console"));
SPDLOG_DEBUG("Creating Window");
gui::Window window;
gui::GuiData gui_data(window);
try {
gui::Window window;
gui::GuiData gui_data(window);
gui::Gui gui(gui_data);
while (!window.should_close()) {

View file

@ -11,6 +11,7 @@ static void framebufferCallback([[maybe_unused]] GLFWwindow *glfWwindow, int wid
}
gui::Window::Window() {
SPDLOG_DEBUG("Creating Window");
glfwSetErrorCallback(glfwErrorCallback);
if (glfwInit() == GLFW_FALSE) {
SPDLOG_CRITICAL("GLFW init failed.");