Compare commits
No commits in common. "58a16c68e48202466dc6d38bbd52e5f312ec4b09" and "c7b6b870058b382246246c4481ee9508acb38015" have entirely different histories.
58a16c68e4
...
c7b6b87005
10 changed files with 20 additions and 64 deletions
|
@ -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/gui.hpp
|
include/gui.hpp
|
||||||
include/gui/gui_data.hpp
|
include/gui_data.hpp
|
||||||
include/gui/window.hpp
|
include/window.hpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SOURCE_HEADERS
|
set(SOURCE_HEADERS
|
||||||
|
@ -19,15 +19,14 @@ 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/gui.hpp
|
include/gui.hpp
|
||||||
include/gui/gui_data.hpp
|
include/gui_data.hpp
|
||||||
include/gui/window.hpp
|
include/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
|
||||||
include/characteristic/endurance.hpp
|
include/characteristic/endurance.hpp
|
||||||
include/characteristic/chance.hpp
|
include/characteristic/chance.hpp
|
||||||
include/gui/menu.hpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SOURCE_FILES
|
set(SOURCE_FILES
|
||||||
|
@ -38,14 +37,13 @@ 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/gui.cpp
|
src/gui.cpp
|
||||||
src/gui/gui_data.cpp
|
src/gui_data.cpp
|
||||||
src/gui/window.cpp
|
src/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
|
||||||
src/characteristic/chance.cpp
|
src/characteristic/chance.cpp
|
||||||
src/gui/menu.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SOURCES
|
set(SOURCES
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
#ifndef BILLYSHEET_MENU_HPP
|
|
||||||
#define BILLYSHEET_MENU_HPP
|
|
||||||
|
|
||||||
|
|
||||||
namespace gui {
|
|
||||||
class GuiData;
|
|
||||||
|
|
||||||
class Menu final {
|
|
||||||
private:
|
|
||||||
GuiData &data;
|
|
||||||
public:
|
|
||||||
Menu() noexcept = delete;
|
|
||||||
|
|
||||||
explicit Menu(GuiData &data) noexcept: data(data) {}
|
|
||||||
|
|
||||||
~Menu() noexcept = default;
|
|
||||||
|
|
||||||
void gui() const noexcept;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif //BILLYSHEET_MENU_HPP
|
|
|
@ -2,11 +2,8 @@
|
||||||
#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;
|
||||||
|
|
||||||
|
@ -16,9 +13,6 @@ 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/gui.hpp"
|
#include "gui.hpp"
|
||||||
#include "gui/gui_data.hpp"
|
#include "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 "gui/window.hpp"
|
#include "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,13 +0,0 @@
|
||||||
#include "gui/menu.hpp"
|
|
||||||
#include "imgui.h"
|
|
||||||
|
|
||||||
void gui::Menu::gui() const noexcept {
|
|
||||||
if (ImGui::BeginMainMenuBar()) {
|
|
||||||
if (ImGui::BeginMenu("File")) {
|
|
||||||
|
|
||||||
|
|
||||||
ImGui::EndMenu();
|
|
||||||
}
|
|
||||||
ImGui::EndMainMenuBar();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "gui/gui_data.hpp"
|
#include "gui_data.hpp"
|
||||||
#include "gui/window.hpp"
|
#include "window.hpp"
|
||||||
|
|
||||||
gui::Window &gui::GuiData::get_window() const { return window; }
|
gui::Window &gui::GuiData::get_window() const { return window; }
|
|
@ -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 "gui/window.hpp"
|
#include "window.hpp"
|
||||||
#include "gui/gui_data.hpp"
|
#include "gui_data.hpp"
|
||||||
#include "gui/gui.hpp"
|
#include "gui.hpp"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
std::ios::sync_with_stdio(false);
|
std::ios::sync_with_stdio(false);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "gui/window.hpp"
|
#include "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);
|
Loading…
Add table
Add a link
Reference in a new issue