Better organization.
This commit is contained in:
parent
c7b6b87005
commit
45c92db758
@ -4,9 +4,9 @@ project(BillySheet LANGUAGES CXX C)
|
|||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
|
|
||||||
set(PRECOMPILE_HEADERS
|
set(PRECOMPILE_HEADERS
|
||||||
include/gui.hpp
|
include/gui/gui.hpp
|
||||||
include/gui_data.hpp
|
include/gui/gui_data.hpp
|
||||||
include/window.hpp
|
include/gui/window.hpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SOURCE_HEADERS
|
set(SOURCE_HEADERS
|
||||||
@ -19,9 +19,9 @@ set(SOURCE_HEADERS
|
|||||||
include/imgui/imstb_rectpack.h
|
include/imgui/imstb_rectpack.h
|
||||||
include/imgui/imstb_textedit.h
|
include/imgui/imstb_textedit.h
|
||||||
include/imgui/imstb_truetype.h
|
include/imgui/imstb_truetype.h
|
||||||
include/gui.hpp
|
include/gui/gui.hpp
|
||||||
include/gui_data.hpp
|
include/gui/gui_data.hpp
|
||||||
include/window.hpp
|
include/gui/window.hpp
|
||||||
include/character_sheet.hpp
|
include/character_sheet.hpp
|
||||||
include/characteristic/habilete.hpp
|
include/characteristic/habilete.hpp
|
||||||
include/characteristic/adresse.hpp
|
include/characteristic/adresse.hpp
|
||||||
@ -37,9 +37,9 @@ set(SOURCE_FILES
|
|||||||
src/imgui/imgui_tables.cpp
|
src/imgui/imgui_tables.cpp
|
||||||
src/imgui/imgui_widgets.cpp
|
src/imgui/imgui_widgets.cpp
|
||||||
src/main.cpp
|
src/main.cpp
|
||||||
src/gui.cpp
|
src/gui/gui.cpp
|
||||||
src/gui_data.cpp
|
src/gui/gui_data.cpp
|
||||||
src/window.cpp
|
src/gui/window.cpp
|
||||||
src/character_sheet.cpp
|
src/character_sheet.cpp
|
||||||
src/characteristic/adresse.cpp
|
src/characteristic/adresse.cpp
|
||||||
src/characteristic/endurance.cpp
|
src/characteristic/endurance.cpp
|
||||||
|
@ -2,8 +2,11 @@
|
|||||||
#define BILLYSHEET_GUI_DATA_HPP
|
#define BILLYSHEET_GUI_DATA_HPP
|
||||||
|
|
||||||
#include "character_sheet.hpp"
|
#include "character_sheet.hpp"
|
||||||
|
#include <filesystem>
|
||||||
#include <spdlog/spdlog.h>
|
#include <spdlog/spdlog.h>
|
||||||
|
|
||||||
|
namespace fs = std::filesystem;
|
||||||
|
|
||||||
namespace gui {
|
namespace gui {
|
||||||
class Window;
|
class Window;
|
||||||
|
|
||||||
@ -13,6 +16,9 @@ namespace gui {
|
|||||||
|
|
||||||
character::CharacterSheet billy;
|
character::CharacterSheet billy;
|
||||||
|
|
||||||
|
fs::path save_path{ "./" };
|
||||||
|
std::string filename{ "character_sheet.json" };
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GuiData() = delete;
|
GuiData() = delete;
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include "imgui_impl_opengl3_loader.h"
|
#include "imgui_impl_opengl3_loader.h"
|
||||||
#include <GLFW/glfw3.h>
|
#include "GLFW/glfw3.h"
|
||||||
|
|
||||||
namespace gui {
|
namespace gui {
|
||||||
class Window final {
|
class Window final {
|
@ -1,10 +1,10 @@
|
|||||||
#include "gui.hpp"
|
#include "gui/gui.hpp"
|
||||||
#include "gui_data.hpp"
|
#include "gui/gui_data.hpp"
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
#include "imgui_impl_glfw.h"
|
#include "imgui_impl_glfw.h"
|
||||||
#include "imgui_impl_opengl3.h"
|
#include "imgui_impl_opengl3.h"
|
||||||
#include "imgui_impl_opengl3_loader.h"
|
#include "imgui_impl_opengl3_loader.h"
|
||||||
#include "window.hpp"
|
#include "gui/window.hpp"
|
||||||
|
|
||||||
gui::Gui::Gui(gui::GuiData &data) : data(data), font("font/DejaVuSans.ttf") {
|
gui::Gui::Gui(gui::GuiData &data) : data(data), font("font/DejaVuSans.ttf") {
|
||||||
SPDLOG_DEBUG("Creating GUI");
|
SPDLOG_DEBUG("Creating GUI");
|
@ -1,4 +1,4 @@
|
|||||||
#include "gui_data.hpp"
|
#include "gui/gui_data.hpp"
|
||||||
#include "window.hpp"
|
#include "gui/window.hpp"
|
||||||
|
|
||||||
gui::Window &gui::GuiData::get_window() const { return window; }
|
gui::Window &gui::GuiData::get_window() const { return window; }
|
@ -1,6 +1,6 @@
|
|||||||
#include "window.hpp"
|
#include "gui/window.hpp"
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <spdlog/spdlog.h>
|
#include "spdlog/spdlog.h"
|
||||||
|
|
||||||
static void glfwErrorCallback(int error, const char *message) {
|
static void glfwErrorCallback(int error, const char *message) {
|
||||||
SPDLOG_CRITICAL("Error code{}: {}", error, message);
|
SPDLOG_CRITICAL("Error code{}: {}", error, message);
|
@ -1,8 +1,8 @@
|
|||||||
#include <spdlog/spdlog.h>
|
#include <spdlog/spdlog.h>
|
||||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||||
#include "window.hpp"
|
#include "gui/window.hpp"
|
||||||
#include "gui_data.hpp"
|
#include "gui/gui_data.hpp"
|
||||||
#include "gui.hpp"
|
#include "gui/gui.hpp"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
std::ios::sync_with_stdio(false);
|
std::ios::sync_with_stdio(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user