Begin to prototype many things.
This commit is contained in:
parent
42530ce824
commit
84450d25af
14 changed files with 176 additions and 9 deletions
|
@ -7,9 +7,14 @@
|
|||
#include "characteristic/habilete.hpp"
|
||||
#include <random>
|
||||
|
||||
namespace gui {
|
||||
class Gui;
|
||||
}
|
||||
|
||||
namespace character {
|
||||
class CharacterSheet final {
|
||||
private:
|
||||
friend gui::Gui;
|
||||
std::mt19937_64 engine{ std::random_device{ "rdseed" }() };
|
||||
|
||||
std::string caractere{};
|
||||
|
@ -70,7 +75,7 @@ namespace character {
|
|||
}
|
||||
};
|
||||
|
||||
void to_json(json &j, const CharacterSheet &billy) {
|
||||
static void to_json(json &j, const CharacterSheet &billy) {
|
||||
j["caractere"] = billy.get_caractere();
|
||||
j["adresse"] = billy.get_adresse();
|
||||
j["endurance"] = billy.get_endurance();
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace character::characteristic {
|
|||
}
|
||||
};
|
||||
|
||||
void to_json(json &j, const Adresse &adresse) {
|
||||
static void to_json(json &j, const Adresse &adresse) {
|
||||
to_json(j, static_cast<Characteristic>(adresse));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace character::characteristic {
|
|||
}
|
||||
};
|
||||
|
||||
void to_json(json &j, const Chance &chance) {
|
||||
static void to_json(json &j, const Chance &chance) {
|
||||
to_json(j, static_cast<Characteristic>(chance));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace character::characteristic {
|
|||
}
|
||||
};
|
||||
|
||||
void to_json(json &j, const Characteristic &charac) {
|
||||
static void to_json(json &j, const Characteristic &charac) {
|
||||
j["base"] = charac.get_base();
|
||||
j["carac"] = charac.get_carac();
|
||||
j["materiel"] = charac.get_materiel();
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace character::characteristic {
|
|||
}
|
||||
};
|
||||
|
||||
void to_json(json &j, const Endurance &endurance) {
|
||||
static void to_json(json &j, const Endurance &endurance) {
|
||||
to_json(j, static_cast<Characteristic>(endurance));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace character::characteristic {
|
|||
}
|
||||
};
|
||||
|
||||
void to_json(json &j, const Habilete &habilete) {
|
||||
static void to_json(json &j, const Habilete &habilete) {
|
||||
to_json(j, static_cast<Characteristic>(habilete));
|
||||
}
|
||||
}
|
||||
|
|
10
include/controller.hpp
Normal file
10
include/controller.hpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef BILLYSHEET_CONTROLLER_HPP
|
||||
#define BILLYSHEET_CONTROLLER_HPP
|
||||
|
||||
|
||||
class Controller {
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif //BILLYSHEET_CONTROLLER_HPP
|
|
@ -18,7 +18,7 @@ namespace gui {
|
|||
|
||||
menu::Menu menu;
|
||||
|
||||
fs::path font;
|
||||
const fs::path font;
|
||||
|
||||
bool initialized{ false };
|
||||
public:
|
||||
|
|
22
include/imgui/imgui_stdlib.h
Normal file
22
include/imgui/imgui_stdlib.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
// dear imgui: wrappers for C++ standard library (STL) types (std::string, etc.)
|
||||
// This is also an example of how you may wrap your own similar types.
|
||||
|
||||
// Compatibility:
|
||||
// - std::string support is only guaranteed to work from C++11.
|
||||
// If you try to use it pre-C++11, please share your findings (w/ info about compiler/architecture)
|
||||
|
||||
// Changelog:
|
||||
// - v0.10: Initial version. Added InputText() / InputTextMultiline() calls with std::string
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace ImGui
|
||||
{
|
||||
// ImGui::InputText() with std::string
|
||||
// Because text input needs dynamic resizing, we need to setup a callback to grow the capacity
|
||||
IMGUI_API bool InputText(const char* label, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);
|
||||
IMGUI_API bool InputTextMultiline(const char* label, std::string* str, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);
|
||||
IMGUI_API bool InputTextWithHint(const char* label, const char* hint, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue