mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-19 20:11:59 +03:00
Restructure source and resource files (#46)
importantly, res is now res/res and css is now res/css
This commit is contained in:
committed by
GitHub
parent
d88079000a
commit
a51a54bc59
27
src/state.hpp
Normal file
27
src/state.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include <vector>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "discord/snowflake.hpp"
|
||||
|
||||
struct ExpansionState;
|
||||
struct ExpansionStateRoot {
|
||||
std::map<Snowflake, ExpansionState> Children;
|
||||
|
||||
friend void to_json(nlohmann::json &j, const ExpansionStateRoot &m);
|
||||
friend void from_json(const nlohmann::json &j, ExpansionStateRoot &m);
|
||||
};
|
||||
|
||||
struct ExpansionState {
|
||||
bool IsExpanded;
|
||||
ExpansionStateRoot Children;
|
||||
|
||||
friend void to_json(nlohmann::json &j, const ExpansionState &m);
|
||||
friend void from_json(const nlohmann::json &j, ExpansionState &m);
|
||||
};
|
||||
|
||||
struct AbaddonApplicationState {
|
||||
Snowflake ActiveChannel;
|
||||
ExpansionStateRoot Expansion;
|
||||
|
||||
friend void to_json(nlohmann::json &j, const AbaddonApplicationState &m);
|
||||
friend void from_json(const nlohmann::json &j, AbaddonApplicationState &m);
|
||||
};
|
||||
Reference in New Issue
Block a user